So I’m currently working on creating some music/sound responsive visuals in processing. Using this programming environment and it’s associated libraries, it’s possible to get FFT ( Fast Fourier Transform ) data live as sound is playing through the computer. So it’s quite simple to make objects react to the force or volume of sound, but to get actual *beat* detection is slightly harder ( as essentially, that’s what this will be used for in the end ).
I did some research, and found a variety of possible implementations. Most of the people who have attempted such a program have started by splitting the FFT data up into “zones”. Then looking at the average data in each of these zones. I whipped up a quick prototype over the last two days.
So let me quickly explain what’s going on here. On the far left, you’ve got two red bars, these red bars indicate the overal average volume, then the rest of the vertical lines make up the results from the spectrum analysis, which I’ve then split up into 7 “zones” ( green, blue, green, blue etc ). On each of these zones, I get the “average” of the values ( the white line ), and then I also have a “beat” line ( red ). The beat line falls at a steady rate, but if it hits the white line, a “beat” in that zone is detected. Basically, if the sound crosses a certain threshold. The white circle in the centre is displayed if 5 or more zones detect a beat.
It’s a little rough at the moment, and I need to do some fine tuning ( and replace that butt ugly circle with something prettier with a fade-out on it ( attack, and delay ) ). But I’ve uploaded the windows .exe version for people to play with, the browser based java version wont work. The program takes whatever is set to play through your recording device. ( microphone etc ). I have my computer set up so that the waveout, or “what u hear” is set to the default device on my microphone output. That way I can press play on my mp3 player, and voila, data!