Hello guys.
I would like to, given an audio file, detect the bpm.
Could anyone give me some suggestions? (like, if I should use DirectX, or other way to make it possible)
Thank you
Printable View
Hello guys.
I would like to, given an audio file, detect the bpm.
Could anyone give me some suggestions? (like, if I should use DirectX, or other way to make it possible)
Thank you
Neat idea. I have no knowledge in decoding audio files, but I think that would be the ideal step. Once decoded, you would be able to locate the beats and calculate the distance between them.
If there is code out there where you can "trap" sound signals destined for your sound card, then that might be a possibility too, but could be iffy because of other sounds played asynchronously on the system (say msn messenger pops up with its new message sound or AC/DC's Hell's Bells is playing in the bkg), and also, sounds sent to the sound card are probably lower priority to other cpu processes, so the beats could possibly be skipped, compressed, or spread apart a bit, but probably not far enough apart to effect bpm calcs.
Good luck, interesting indeed.
Thank you for your reply.
What I intend to do is not detect in real-time the audio file, but by opening the file in some sort of buffer.
What I think that it is possible is to build the spectrum graphic based on that buffer and then analyze it for peaks.
Could this be the right way?
It does sound right, but even if you are not playing the file you will have to have some code that understands the data in the buffer. Something that can use your existing audio codecs perhaps. Not sure how easy that would be as i imagine things are tailored to playback not analysis.
I am also very interested in this, I need to be able to find the bpm of recordings of the timing of a cars sparks. The analysis will be easy (I hope) once I have the wav file loaded into a buffer as the recording is just clicks.
So all i need to know is how to load the wave file into a buffer for analysis.
Thanks.