import krister.Ess.*; Channel myChannel; float laenge = 0.6; float schwellwert = 1.5; int spektrum_min = 25; int spektrum_max = 180; frequenz [] frequenzArray = new frequenz[spektrum_max+1]; // Array der Frequenzen int x_mitte = 150; int y_mitte = 600; float rotation = PI-0.5; boolean abspielen = true; // Farben PImage farb_bild; color[] farbe = new color[31]; ; void setup() { framerate(30); size (900, 700); smooth(); noFill(); background(0); // start up Ess Ess.start(this); // load "hello.aiff" into a new Channel myChannel=new Channel("beethoven-5th.wav"); myChannel.setupFFT(512); myChannel.play(); Ess.masterVolume(2); for (int i=spektrum_min; i schwellwert) { strokeWeight(1); // float farbwert = 0.3 * wert-10; // stroke(farbe[round(farbwert)]); stroke(255,183,0, 50); line (x, y, x+x2, y+y2); } else { strokeWeight(0.5); stroke(255, 255, 255, 40); line (x, y, x+x2, y+y2); } x = x+x2; y = y+y2; } } void channelDone(Channel ch) { abspielen = false; print("Fertig"); } public void stop() { Ess.stop(); super.stop(); }