Beat detection, revisited.

After some chit chat with Ryan Alexander, I decided to give beat detection another go. My attempts to make a decent beat detector in the past have been quite basic and generally useless unless the conditions were perfect. After seeing what Mr. A had done with one of his projects, things seemed a little clearer. So I sat down to do a little coding and this is what I ended up with.

I have broken the FFT into zones and are dealing with them instead of individual frequencies. Probably should have been doing that from the start, but oh well, live and learn.

Each zone is assigned a threshold. This threshold is based on the average of the FFT frequencies with its zone. The if the average is greater than the threshold, a beat will trigger. I then assign the threshold a value slightly greater than the peak average that triggered the beat in the first place. After a short duration, the threshold slowly lowers until another beat is triggered.

This is still not ideal. Ryan has read that averaging the last few frames of FFT would make for a more consistent result, but I havent gotten around to implementing that just yet.

Vimeo: Magnetosphere
Vimeo: Pixellate

And there are a few high res details over on my Flickr Page.

5 Responses to “Beat detection, revisited.”

  1. Manuel Dahm says:

    Akufen Magnetosphere jields a broken link – would love to see this :)

  2. flight404 says:

    Ah, right. I took down the video. Its still up on Vimeo though, so you can check that link to see the smaller version.

    I have a new large video of the Magnetosphere project with much better resolution so check this post.

  3. [...] You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your ownsite. [...]

  4. [...] Beat detection, revisited – blogged by Robert Hodgin [...]

  5. Kenshi says:

    I’ve found that using median filters for beat detection is great (as they are less susceptible to noise).

    Also, you may want to try low-pass filtering the last few frames of the FFT windows instead of averaging.