import processing.sound.*; SoundFile song; Amplitude analyzer; float[] history; int index = 0; // enlarge the bars float scale = 1; // for beat.aiff //float scale = 4; // for vibraphon.aiff void setup() { size(640, 360); song = new SoundFile(this, "beat.aiff"); //song = new SoundFile(this, "vibraphon.aiff"); song.loop(); analyzer = new Amplitude(this); analyzer.input(song); // create an empty array of size equals width history = new float[width]; } void draw() { background(255); // update (shift array to the left) for (int i=0; i