Not signed in (Sign In)

Categories

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

Radiologik - Accessible Radio DJ'ing and Automation is available from macinmind.com

  1.  

    Does anybody have any recommendations for silence alarms on webstreams?

    An engineer friend of mine has software setup on their streaming (PC) that sends an alert via email if the webstream runs lower than a threshold for a certain amount of time. Actually, I believe it was this, or something similar. Is there a plugin for Nicecast or something else that would do something similar? I've found some things related to the Jack, but it seems messily complicated to be going down that road.

    • CommentAuthorLane
    • CommentTimeDec 30th 2009
     

    I haven't really looked for any sort of silence detection solution, as radiologik DJ has been pretty solid for me. Only my hands touch the software, so human error isn't a large factor as it might be for someone with a lot of volunteers etc. using it. DJ has some features that make accidental silence fairly unlikely in automatic mode. But anything is possible.

    I was originally going to do a hardware based solution, where I used a compressor with a side chain set so that when when silence happened, a continuously playing alternate sound source would gate up and be heard. When main audio returned, it would be clamped down again and be inaudible. I haven't found this necessary to pursue yet, since DJ/Scheduler have been very stable.

    All that said, I think it would be a good thing to have, especially if I can get an alert on my phone for example. And I'm going to be so bold as to suggest that Jay consider coding a wee stand alone program he could release as freeware, which can be a good way to attract some attention to his other products. If you're reading this Jay, maybe you can chime in on how easy a task it might be. Could be quite simple. Merely have it listen to an input for audio below X dB for Y seconds, and then execute some user chosen/defined applescript. Could come with some examples.

    I'll also see if I can maybe write something. If it can be done completely in applescript, or python, or maybe even Forth or some other program I have some experience in, I'll consider doing it. I'll google a bit to see what sort of audio functions are present in those options and will respond here if I think I can do it.

  2.  

    The gate idea is very clever. I may look into setting something like that up at our station, though it would mostly be as a curiosity, not an actual fix.

    The alert by phone can (I think) be done by email using SMS, depending on your carrier. Most carriers have an email setup like yourphonenumber@verizon.com or whatever your carrier is. The "yourphonenumber" is your 10 digit number. The common carriers and their numbers are listed here.

    • CommentAuthorLane
    • CommentTimeDec 31st 2009
     

    One thing I might try is the actual software you linked that runs on windows. A person can run WINE on mac, so they can run windows programs. There is something called, um, wine bottler, that makes a wine installation simple. I'd set up emulation for the minimum specs required by that application, and see if it works. Another WINE option that costs money is CrossOver, the wine bottler is free.

    • CommentAuthorLane
    • CommentTimeJan 1st 2010 edited
     

    I have a working theory on how I might create a silence alarm. There are a couple of useful command line utilities that can be employed to detect silence. All my tests were done with AIFF files.

    afrecord is something that comes with the mac os x developer tools for leopard (probably snow leopard too) that does the very simple (not really) task of recording audio. As a command line tool, it's easily added to a script. I've compiled it and tested it on my leopard system, and successfully recorded audio from the default input.

    sox is a useful swiss army knife of audio processing. It can be used to detect silence in audio files. Basic use involves reading a file, doing some processing, and writing the output. For our purposes, it only writes audio when there is actual audio content, and not when there is silence. I've tested this on sample audio files of various lengths, it successfully stripped out all content below a certain level. If the entire file was too quiet, it wrote a very short .aif container file.

    Those two key things give me what I need to do silence detection.

    When I have some time, I'll begin writing an applescript that calls those two functions, and that contains logic to work as a silence detector to live audio. The basic logic flow would be something like this.

    • Grab a short audio sample, perhaps 1/5th of a second.
    • Run a sox command as described above, that removes all silence.
    • Test file size of the result file for size.
    • If it's larger than what a silent file would be, conclude it is not silent, and return to the beginning to test again.
    • Build that cycle to repeat every second or so.
    • If the result file is the size a silent file would be, and record a longer sample (perhaps 10 seconds
    • test longer sample for silence.
    • If true, send silence alarm

    In addition to that rough logic flow, there would need to be a silence detected flag that would prevent us from sending a silence alarm more than once during a silent period. It would operate by moving to a new mode of operating after a silence is detected, continually monitoring audio until it is no longer silent, where it then resets the silence detected flag and returns to normal monitoring.

    The idea would be for me to write this as an apple script contained in a folder with sox and afrecord and any other support files needed. A person would double click the script to run it. I'd probably require the user to edit some values either at the start of the script, or in a separate file so they could adjust the length of silence it detects, and maybe enter an email address to send a notification. Other notification options could be explored, but emailing strikes me as fairly universal.

    Now, when will I get to this? hmm. busy right now, not sure.

  3.  

    I like the idea of using Wine... I'd never heard of WineBottler until now.

    Actually, I've managed to get the PiraCZ app to run using Wine alone on my computer. I just can't seem to get the Bundle from Winebottler to pick up audio... at least on my computer. I'm going to upload it via FTP to our station, and see if I can get it to work there... it's audio I/O is rigged a little different.

    I'll have to wait to test it on the Station Computer. I don't have a fast enough connection where I am to do a remote connection and transfer the files in any reasonable amount of time.

    I can at least verify that the email alarm part works.

    Your app sounds like it would work, but the amount of recording it would be doing raises a few concerns. Wouldn't all that activity eat up system resources?

    I'm no programmer... I can only tweak HTML. But I would think there should be a way to monitor audio levels from an input source without recording it. Then again, I don't know.

    • CommentAuthorLane
    • CommentTimeJan 2nd 2010 edited
     

    It wouldn't be eating much in the way of resources. Basically just a 1/5 of second blip, and gets replaced with each sample. Nothing will accumulate. Things are being written to the hard drive all time by all sorts of programs on your computer. Radiologik itself is often writing files to the hard drive. In my test routines, it was near instant, and didn't raise an eyebrow to the resource monitor. It's possible I can pipe them together to reduce one of the writes, but I don't know if afrecord supports standard output. Disk caches also reduce actual calls to the drive. This is relatively simple stuff that OS's cope with quite easily. A more self contained program might avoid writing to the drive, but then again, it might not.

    An offshoot of this is that I'll also be writing an audio logger. We have a legal requirement here to have a recording of all audio for 4 weeks. It's main purpose will be to work 24/7, writing audio files, automatically segmenting them into hours, filenames coded by date and time etc. It's quite likely that I'll do that on an old linux box instead of a mac, but I'll probably write and test for both of those computers.

  4.  

    Ah, well, the way you say it makes sense. I hadn't thought about the constant amount of system data that is already going on. It's really quite clever, since you plan on putting the audio logger in as well.

    I've done okay with the WineBottler so far... even if it isn't practical, this is something I want to do just for myself. The only catch is that I can currently only get the application to detect audio through the internal microphone. I'm going to have to try and get WINE to make it select the correct sound drivers.

    • CommentAuthorLane
    • CommentTimeJan 3rd 2010 edited
     

    the application might only be listening to default audio input. what happens if you change that in the mac system preferences?

    What you do work out that you think works well, a nice guide on how to do it here would be appreciated! :)

  5.  

    Well, I've managed to get it to work with audio coming in through the audio input jack on my computer. It doesn't monitor plain system audio yet (like if you were running RLDJ on a standalone computer) but it is a start.

    I did my testing by hooking my iPod into the system input. seems to work well. I suppose it could also be done by using a cable to connect the headphone out with the main system audio, but you wouldn't be able to hear it in the studio or anything.

    Anyhow, the problem was selecting the sound driver for Wine to tell the program to use. If you don't check anything in the list, it will use the microphone, and nothing else. If you Select "CoreAudio", then it will listen to at least the input jack. I don't know if it will interact with our studio, though, since that uses an Mbox through a USB interface. I'll have to test it there.

    If anything else, it Just occurred to me that we do have some ancient windows computers that are unusably slow. However, they could manage to listen to a stream and run the Pira CZ Silence Detector.... and then I wouldn't have the problem of the Windows/Mac sound drivers not matching up. Plus, the old machines would see another few years of use.

    I'll keep experimenting and see what I can do. The Winebottled file is around 500 megs - half a gig. I'll gladly post instructions on how to do this once I'm sure of how it works. Maybe even make a screencast... we'll see.

    • CommentAuthorLane
    • CommentTimeJan 3rd 2010
     

    cool stuff!

    you use nicecast right? just thinking off the top of my head, you could probably make use of soundflower, and have an extra output in nicecast effects play to one of the soundflower channels. if the silence detector can be set to listen to that soundflower channel, then you'd have your internal to mac monitor. or maybe there is an even simpler way than I just described as well.

  6.  

    At my college, we are forming a chapter of the Audio Engineering Society. One of our grad students gave a presentation on Max Msp, a Visual Programming Language. About halfway through, it occurred to me that I could make a silence detector for OS X! I'm doing an independent study this semester where I am re-routing audio of the station, and this could easily be added into it.

    If I get fruits to my labors, I'll be sure to share them!

    • CommentAuthorLane
    • CommentTimeFeb 26th 2010
     

    hey, cool stuff sunnysidesound!

    and now I'm off to check out max msp. :)

  7.  

    Update:

    I spoke with the Grad who gave the presentation, Josh Gumiela. He wrote a test code where you can select an audio file to play, and then pause it. When the system notices the lack of sound, it triggers an adjustable countdown until the alarm is triggered, at which point it runs a javascript to send an email. The email currently only works with gmail, though.

    I'm tinkering with input settings, and I think I've got it set to pick up an audio coming into the system. It has a drop-down menu where you can select which driver to use, and then another where you can select which input. However, I think this may only work with audio that is coming in through external sources... in other words, if your system is setup without an external mixer, then it probably won't work. (For example, it doesn't pick up iTunes) Gotta work on that.

    • CommentAuthorLane
    • CommentTimeMar 7th 2010
     

    If you make use of soundflower, you can probably make it work with an app output. The idea being you play itunes through a soundflower channel, and have the silence detector listen to that. Or if you use nicecast, it basically does a similar thing. Nicecast can be set to listen to iTunes, and be set to play to soundflower, or whatever. You can mix and match these things a wee.

  8.  

    Soundflower seems to work great.

    Today, I implemented a threshold for the silence indicator. After all, sometimes there is a bit of noise when you're working with hardware, and so you can't have absolute zero as the trigger for silence.

    Further, any Ideas on what this thing should be called? DeadAir? I dunno.

    • CommentAuthorLane
    • CommentTimeMar 8th 2010
     

    names huh. that's always important right!

    I think only you can name your baby. :)

  9.  

    Everything I've tested so far seems to work beautifully, but I have one snag.

    MaxMSP does not play well with the Digidesign Hardware. Since one of our stations uses an Mbox as it's I/O with the Console, this is a problem for me. I've done some reading on Cycling74, and tried an alternative where you route the Mbox through Soundflowerbed. The problem is that even Soundflower doesn't want to hook directly in with the Mbox. It causes a crash if I do a direct hookup... I've seen a workaround where you can use the mbox as the main system I/O, but that would eliminate the separation that keeps the system audio (think the trashcan emptying sound, safari noises, error windows, etc) from going on air.

    Update
    Actually, it appears that I may be able to do this without interfering with system audio. I used the Midi/Audio preference pane to alter how the Mbox inputs, and specified it as the system input. The settings allowed me to keep system audio separate. It works with a microphone, and mbox, and my macbook... the question is, will it work in the station? Maybe I'll know by the end of the week.

    We're really only using the Mbox because we have nothing else, and it would work. But, money is money, and we don't really have alternatives right now. I'm going to tinker with soundflower and see if I can get something working.

    I've also been thinking about the name some more. Maybe Vidarr. Vidarr is a silent norse god, brother of Thor, that is associated with restoring order, since he destroys Fenrir at the end of Ragnarok. The name sounds video-realated though, so maybe I"ll go with a different Anglicization of it.

    • CommentAuthorLane
    • CommentTimeMar 17th 2010
     

    I like the name!

  10.  

    Here are a few screenshots of the interface:

    I'm meeting with the Grad student whom developed this with me on Tuesday night. Hopefully, we'll be releasing soon.

    Edit: actually, the dark grey interface is actually much lighter now, and the "to" entry is taller to accommodate multiple entires.

    • CommentAuthorLane
    • CommentTimeMar 28th 2010
     

    awesomely cool!

    • CommentAuthorJRobelen
    • CommentTimeMar 31st 2010
     

    This is an exciting development. Are you accepting beta applications yet? I could get you some feedback on this....

  11.  

    I was considering opening for true beta testing, but I'm an impatient one...Plus, my demo copy of Max is running out... I only have 5 days left.

    I'll be actually releasing Vidarr within a few days. The release version will be 1.4.5, though really that is a fairly arbitrary number from our development process.

    I've been running a version of the system in both our studios at WIDB, and to all appearances, it has been managing. I've given a fairly thorough test-through on about 4-5 Mac systems... my 4-year-old Macbook Running Snow Leopard, a few older Leopard systems, and some brand new iMacs. I've gotten it running with Digidesign hardware (the hardest thing to do), as well Soundflower, regular Microphone & system input, and a plug-and-play Behringer phono I/O connection. It is really a very simple program, and the only real issues I'm guessing could arise from driver issues... which neither I nor my partner in this project think will be a problem. Still, you never know!

    Anyhow, I'll make a post here when it happens. Feel free to use this thread for problems and so on.

    Since I feel like it would be disappointing to find out that I'm not doing offical betas, I'll give you this updated image of the interface (I learned tabs the other day, it makes the GUI a lot slicker!)

  12.  
    • CommentAuthorLane
    • CommentTimeApr 1st 2010
     

    Excellent work SunnySideSound. I would like to thank you for contributing to the community in an extremely useful way.

    I'm testing!

    Lane

    • CommentAuthorLane
    • CommentTimeApr 1st 2010
     

    oh, um, gmail only?

  13.  

    Sorry, but Yeah, sadly. That's something I am still working on. The code for getting smtp to work on other servers has been a bit nasty. I couldn't find a solution amongst the MaxMSP form either.

    As soon as it can, that'll be fixed.

  14.  

    Actually, thinking on it, you could try editing the java sourcecode for the email, and get that to work... but I can't guarantee.

    • CommentAuthorLane
    • CommentTimeApr 1st 2010 edited
     

    does it use smtp? i have an issue not uncommon with isp's, who block port 25 except to their own site.

    OS X has a built in mail function (in a terminal, type mail to see usage details). Can you call that? same issue for port 25 blocked people though.

    I'd prefer it have the ability to launch an applescript routine. I could customize all sorts of response actions that way. If it did that, other users could post help applescript routines. Hey man! no pressure! :)

    • CommentAuthorLane
    • CommentTimeApr 1st 2010
     

    loving it btw. watching it go 'warning' over and over. pretty cool!

  15.  

    It might be possible, but I'm having trouble finding any resources on Max executing applescript. It seems like there is (or should be) a way, but I just can't find it.

    Edit: I have found one applescript connection (part of a pack), but it is $99 to be able to get a version I can compile into a standalone. Eughh...

    • CommentAuthorLane
    • CommentTimeApr 1st 2010
     

    can you execute a command line program?

  16.  

    There appears to be a way to execute a unix shell, which could in turn run an applescript. I'm not really sure about setting it up for sure... but I have a good guess. Essentially, it is the same as running it through terminal, so I tried running a simple applescript that would 'beep' and bring up a window that would need to be clicked. It generated an error though... Error: No user interaction allowed. (-1713). I don't know a ton about applescript, but I assume that this kind of error only happens because it requires user input. It nags me though, since it could pose a problem later. Further, if there were applescript that needed data like usernames or passwords, it could be a problem, since information would need to be passed from Max to Unix and then to Applescript... and I am no programmer.

    School is getting into a crunch now too, so I'm having less and less time to devote to doing this. If anything else, I'll only be working over the summer, so I may be able to do another release then. Until then, it's only tinkering in my spare time.

    • CommentAuthorLane
    • CommentTimeApr 2nd 2010 edited
     

    sunnysidesound,

    if you could give a user a box to enter their own single command line instruction, that would be sufficient to let a user do all sorts of things. it will be up to them to make sure the command works. not you. :) we could then call our own applescript using that. or we could have it do something else. if you added that, I think it would be super useful, and I'd be happy to post some applescript examples for folks.

    Whatever you can work out is appreciated, and you are thanked for your effort to date. Well done!

  17.  

    I did some quick work, and got it so it will accept terminal commands. 3 days left on my Max Demo, so I hope this works.

    erp, have to make a fix...
    back in a bit.

    • CommentAuthorLane
    • CommentTimeApr 2nd 2010
     

    link didn't work. i guess around a bit, and found it at http://sharebox.sunnysidesound.com/Vidarr/Vidarr%201.5B.zip

    • CommentAuthorLane
    • CommentTimeApr 2nd 2010
     

    and testing looks good!

  18.  

    Okay, here we go.

    Fixed the filepath, and in this version, it doesn't launch textedit when the alarm goes off by default.

    Sorry for the haphazard posting and such. I'm rushing to get this done.

    • CommentAuthorLane
    • CommentTimeApr 2nd 2010
     

    Your efforts are appreciated. :) You're a good man. Assuming you're a man.

    Now I can do a bit of exploring on things we can get it to do.

  19.  

    Thanks!

    Feel free to put it through the paces. It may be some time before I can fix bugs, but at least I'll be ready when I get the chance.

    Oh, a note I should share: I don't think it should be a major issue, but the word "text" in scripts can cause problems. Let me clarify:

    In a filepath, like:
    /directory/folder/location/text.txt or /directory/folder/text/program.app it will not be a problem, because it will be seen as one big phrase.

    However, you something like:
    display "The text you entered is incorrect"
    it will appear as:
    display "The set you entered is incorrect"

    The difference is that there is a space around the word text. Basically, there is a part of the coding where when the message is passed between two parts, I have to set a "replace a with b" command so that the command lines get sent correctly. This is side effect, and I'm hoping that it won't create any major issues.

    Keep me updated as to what you find! If I can, I'll make this an official version sometime soon.

  20.  

    Update:
    In order to try and get the project more publicity, as well as organization and so on, I've added a Sourceforge page: https://sourceforge.net/projects/vidarr/