Forums > MaxMSP

Finding BPM of an Audio File

June 26, 2009 | 3:31 pm

I am pretty new to max so i dont know weather this is going to be a stupid question or not but please bear with me Smile

I am trying to build (as part of a bigger patch) a beat finder and BPM calculater that works out the tempo of the audio being passed through it.

at the moment i am just passing a sine wave through. using the greater than box to out put a bang when the audio is louder than a specified volume (i use a knob to adjust sensitivity)

But the problem i am having is that every time the numbers change its outputting bangs and as its a constantly moving wave this is obviously a problem. With the the [>] box it means it only outputs bangs then its above my specified number (not meaning to insult any ones intelligence i just want to be clear) but even then it out puts several where as i only want one.

Setting my sensitivity to the highest value played would only out put one bang but this is impractical, as if its real audio then this could be always changing.

I have included a picture so you can see what i have done! If i have gone a really silly way about this please say so, and prefferably suggest other ways … or if there are any exsisting patches that do this job?!

Thank you very much!

June 26, 2009 | 4:07 pm

Using the [change] object in between [>] and [select] should cause a single bang to be output when the signal’s value rises above a set number. Take a look at the [thresh~] object and other MSP objects- when working with signals it’s best to not convert them into ints and floats, which causes their sampling rate to greatly diminish. Stick with MSP objects when working with signals.


June 28, 2009 | 11:41 am

There are also several 3rd-party beat-detection objects out there, like op.beatitude~ and beat~. look at

June 28, 2009 | 5:01 pm

Select the counter, open the inspector, and change "Carry Flag Output" from numeric to bang.

Or, send your counter the message "carryflag 1"


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