Results 1 to 5 of 5

Thread: Detect Beats per minute (BPM)

  1. #1

    Thread Starter
    Hyperactive Member RS_Arm's Avatar
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    282

    Detect Beats per minute (BPM)

    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

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Detect Beats per minute (BPM)

    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.
    Last edited by LaVolpe; Nov 3rd, 2007 at 01:34 PM.

  3. #3

    Thread Starter
    Hyperactive Member RS_Arm's Avatar
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    282

    Re: Detect Beats per minute (BPM)

    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?

  4. #4
    Cumbrian Milk's Avatar
    Join Date
    Jan 2007
    Location
    0xDEADBEEF
    Posts
    2,448

    Re: Detect Beats per minute (BPM)

    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.

  5. #5
    New Member
    Join Date
    Dec 2007
    Location
    Australia
    Posts
    1

    Re: Detect Beats per minute (BPM)

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width