Beat Detector

I’ve attempted to tackle the tricky problem of beat detection. While this is not a perfect solution, it mostly does work, although it’s best to use ‘easy’ music sources, such as techno, funk, or anything with loud kick at regular intervals.

Simply, it takes the music input (in this case, the audio device in, set to stereo mix, for web streaming), converts it to ffts, looks for the bins with the highest amplitude, then looks for interval regularity. Once a regular interval is detected, it spawns a timer that cycles to that interval. Multiple timers can be generated. From these, the most robust is chosen to set the global beat timer (which drives the beat chop).

This is a fairly rough attempt, but now that its mostly working, I want to release it into the wild so that someone else may use it or even better, improve it and repost. Long live the collective evolution~!

happy beat boxing
Thomas
BeatDetectionAlpha.toe (23.1 KB)

I tried to optimize a portion of it. I think the results are the same.
maxAmpBin.tox (1.94 KB)