Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP & DBC] Average BPM Calculator

Author
Message
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 29th Apr 2010 17:36
I had to mix a number of MP3s together for the radio station I work for and each one had to merge nicely into the next. As it was to be used for people to dance to, I needed to find tracks with a similar BPM.

I had a play around with various pieces of software which claimed to be able to display the BPM of an MP3 by analysing it, but none ever gave the same figure. Even the Winamp plugin varied huge amounts while the songs were playing.

So I decided to write a small routine to do it myself - tapping the spacebar to the beat of the music. Testing it against a freeware metronome program, it's fairly accurate.

Note: When you run the program, it averages out the tapping speed of ten taps of the spacebar, so you need to tap it more than ten times when you start, (or after changing the tempo), before a correct readout is displayed.



TDK

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 29th Apr 2010 23:33 Edited at: 29th Apr 2010 23:34
Pretty cool TDK!

Perhaps implement a toggle so if the space key is held down too long, it only registers as 1 tap; and eliminate the repeat until pause in the procedure:



Enjoy your day.

Login to post a reply

Server time is: 2024-04-25 16:29:19
Your offset time is: 2024-04-25 16:29:19