[PD] problems with an "outburst" recorder
lsutton at libero.it
Thu Jun 10 18:06:48 CEST 2010
> hello. Im fairly new to pd, and am trying to write a patch that when a
> volume threshold is broken (from the built in laptop mics), it i will
> record audio for duration x, and save it as a file, however if the
> threshold is broken again during duration x, duration x is reset and
> only saves out the file until the threshold isnt broken for duration
> x. when the file is done recording, and the threshold is broken again,
> I would like it to start recording another file. the reason I'm making
> this is because ive been made aware that i've been saying strange
> things in my sleep (that i dont remember), and I wanted to try and
> record them. Eventually with the onboard webcam too, but just audio
> for now.
I'm not sure I'd want to know if *I* I say strange things during sleep :)
> I'm sure there are simpler ways to do what im doing, and I'm open to
> suggestions (or if there are other patches out there like this).
> The three problems Im having at the moment are:
> 1) I had "del" or "delay" working for awhile, but then it mysteriously
> stopped working. even when i delete it and repatch it. if you click
> "resets counter" there's a bang both before and after the "del 5000"
> on the lower right. i have no idea why or how to fix it.
There should be a [sel 1] between the [<= 1] and the [delay] otherwise
the [delay] gets a 0 or a 1
> 2) I'm having a hard time figuring out how to keep the file recording
> when the threshold is broken during duration x. The problem is that
> the way I have it set up, is that if the threshold is broken again, it
> will initialize a new file to be written, which I
You have to set it up so that once the threshold is broken you ignore
further breaks, unless the signal goes back down. Look at [spigot] for
example. In this case though you may also want to add a 'hold' time
before resetting this when the threshold goes down especially if the
signal can be very uneven or with abrupt bursts.
Have a look at this trigger I made (it does something different but the
basic principle is the same: do something if a volume threshold is
> can't figure out how to bypass. Perhaps "load banging" an open message
> for the initial file to be written, and then the subsequent ones can
> be initialized after the previous has finished writing? However I
> think it would be better is:
> 3) So far I've only devised a very wonky way of recording the next
> file. If you click on "pd recordingsel" in the upper left, you can see
> how I've set it up with switches and a limited amount of files ready
> to be made. I know there must be a better way to do this, so that it
> will just continuously record new files with virtually no limit.
Yes: look at [makefilename] and attach a counter to it something like
[f 0]X[+ 1]
This will generate sybols sleeprecord00.wav, sleeprecord01.wav etc. at
each bang at the [f]
> Thanks for helping a newbie!
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
More information about the Pd-list