Try this and see what you think... It's based on a standard FFT vis for music, but the way the sound is filtered means the bars better represent what you really hear.
import ddf.minim.analysis.*; import ddf.minim.*;
// Tripsel 14 Sept 2010 // Replace string in loadFile for your mp3 // Put the mp3 in the data folder // Run it - use the number keys 1-9 to change the bar height // Bars only show if they are persistant but not background // This works best with melodic, tonal songs, not distortion or drums.
Minim minim; AudioPlayer jingle; FFT fft; float [] harmMag; float [] harmVLP; int BUFFSIZE = 1024*1; float HARMFILT = 0.001; float BANDFILT = 0.02; int n, volume;
void setup() { size(256, 200); minim = new Minim(this); jingle = minim.loadFile("test1.mp3", BUFFSIZE); jingle.play(); fft = new FFT(BUFFSIZE, 0); fft.window(FFT.HAMMING); n = (fft.specSize()-1)/4; harmMag = new float[n]; harmVLP = new float[n]; colorMode(HSB,n); noStroke(); volume = 4; }