[linux-audio-dev] Radio Scanner Recorder

ian esten deviant at custard.org
Sat Aug 27 04:09:48 UTC 2005

not that i know of. i'd love something like this too (as long as it was
a jack client!). i almost wrote a jack client to do this a while ago. if
this was done as a jack client, it would be pretty easy to modify the
existing jackrec (i think that's the one) example client. jackrec works
roughly like this:
- opens a file to record to
- process gets n samples, which it copies to a record ringbuffer
- a worker thread sleeps until it has got some samples from process. it
wakes up and writes them to the file
- repeat the last 2 steps until done, then close the file and exit

here's how i think the client you describe would have to be designed.
instead recording all the time, your write thread would not write until
the signal level crossed a certain level threshold. to track this you
would need an envelope follower with a fast attack and a long release on
the signal. when the signal level exceeds the threshold, you start
writing to the already opened file. when it falls back down below the
threshold you stop writing and close the file. if your program was
really smart, it would already have a second file open ready to write to
so that if the signal rose above the threshold before it was able to
close the old file and open a new one, it would be able to write to the
new file without interruption. if it were less smart it would
immediately open the new file after closing the old one, and with a big
enough ringbuffer that may be ok.

good luck!

On Fri, 2005-08-26 at 21:47 -0400, Guillaume Filion wrote:
> Hi all,
> I'm pretty new to the world of audio on linux, so please excuse the 
> "newbeeness" of my question. :-)
> I'm a in the process of making a police/EMS/fire radio recorder. At 
> first, I tought of doing a program similar to ScanRec(1) from the 
> windows world -- that is not record when the sound is below a certain 
> threshold. This could easily be done with ecasound's -ge parameter.
> However, I started thinking and found that it would be better to have a 
> different file for each segment. For example, if there is
> - 45 seconds of speech, followed by
> - 3 minutes of silence,  followed by
> - 2 minutes of speech
> I would get two files, one 45 seconds long and one 2 minutes long.
> Does such a program allready exists, and if not, what would be the 
> best/easiest way of doing it?
> 1: http://www.davee.com/scanrec/
> Thanks a lot,
> GFK's
ian esten <deviant at custard.org>

More information about the Linux-audio-dev mailing list