Forums > MaxMSP

How to recorder regarding to the input sound level

March 10, 2010 | 12:52 pm

I’m new to MAX/MSP and I would like to do a command where depending of the sound level, recording will start and stop if the sound go above or under a certain level. Any ideas? Thanks


March 10, 2010 | 2:05 pm

Hello.
You have to define a threshold.


March 10, 2010 | 5:00 pm

Try something like this:

– Pasted Max Patch, click to expand. –

This takes a microphone input, takes its absolute value (that’s the general procedure for any amplitude-follower), puts out its peak value every millisecond and checks if it’s above a certain level (in this case 0.2) or below a certain different level (in this case 0.03). Using -two- thresholds like that, in contrast to only one, makes the whole thing "flicker" a bit less. I.e. you need a somewhat higher amplitude to trigger it to ON, after which it stays ON until it actually gets -significantly- quieter.

Often, you’ll also want to expand this a bit, for example you might consider adding a minimum time for the toggle to stay on after it has been activated, before it can be deactivated again. (Again, to reduce possible "flickering" of the toggle when you’re dealing with certain sounds that rise and fall quickly in amplitude.)


Viewing 3 posts - 1 through 3 (of 3 total)