Controls: '1' switches to "SOUND_ENERGY" mode, '2' switches to "FREQ_ENERGY" mode. You'll need to click in the applet before it responds to these keystrokes.

In "SOUND_ENERGY" mode the graphs are the result of calling drawGraph() in each frame and the circle appears every time isOnset() is true. In "FREQ_ENERGY" mode the bars along the bottom of the app are the result of calling drawGraph() in each frame (a bar appears if the corresponding frequency band registers an onset, red bars are every eighth band) and the circles from left to right correspond to isKick(), isSnare(), isHat() and isOnset().

If you don't see any activity it's because you aren't giving it input. You can give it input by plugging a CD player or iPod into the line-in jack of your computer and pressing play on the plugged device, turn up the volume if it seems unresponsive. Alternatively, you can set the record source of your soundcard to "stereo mix" or similar and then play an mp3 in your player of choice.

To view this content, you need to install Java from java.com

Source code: spectrum_live beat_detect

Built with Processing