Forums > MaxMSP

how to get the frequency of bangs

December 14, 2011 | 1:39 am

Hello.
I’m on a really simple thing I can’t solve.
I wanted to evaluate the frequency of an event, for instance , the space bar key presses.
This frequency would control the playback of a movie or a soundtrack.
So I tried to use a counter object but the result is not really efficient and playback is not smooth at all.
Do you have in mind any better solution to find the frequency of a bang?
Thanks

– Pasted Max Patch, click to expand. –

December 14, 2011 | 2:12 am
– Pasted Max Patch, click to expand. –

maybe something like that will help you.


December 14, 2011 | 2:16 am

Try using [timer]


December 14, 2011 | 2:22 am
– Pasted Max Patch, click to expand. –

December 14, 2011 | 3:39 pm

thanks everybody, I did not know about timer, which is pretty handy to get BPM (thanks chris)
I still have gliches in my playback, Tried to smooth it with a line object but it s a bit noisy.

– Pasted Max Patch, click to expand. –

December 14, 2011 | 4:36 pm

You might also want to try averaging the last few values so that you’re not changing so abruptly each time you press the space bar, something like this might help:

– Pasted Max Patch, click to expand. –

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