Forums > MaxMSP

Detect a spike in amplitude

October 9, 2012 | 2:23 pm

Hey there,

I’ll outline what I’m trying to do and what I’m struggling with;

The patch I’m trying to create will activate an audio file on the fall of a signal (after the input of a signal is above a certain threshold and the current audio file is not playing). This works with a mic strapped to a pipe to detect the flow of water.

My problem comes when the pipe is ‘hit’ or basically the mic picks up one off knocks and bangs. With this in mind I’d like to be able to differentiate signals that peak for a sustained time and then fall rather than those signals that peak for under a second (which i wish to exclude).

If I could some how read a value, start a timer and then read it again after a short period to see if it is still above my threshold then it would work.

Thanks in advance,


– Pasted Max Patch, click to expand. –
October 10, 2012 | 7:54 pm

Have a look at this patch of mine, I think it does exactly what you need.

– Pasted Max Patch, click to expand. –
October 11, 2012 | 10:17 am

That is fantastic :) Many thanks for helping me with that!


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