Detect a spike in amplitude

Oct 9, 2012 at 2:23pm

Detect a spike in amplitude

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. –
Oct 10, 2012 at 7:54pm

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

– Pasted Max Patch, click to expand. –
Oct 11, 2012 at 10:17am

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



You must be logged in to reply to this topic.