class Anemiko{ int cycles; float rotation, faktor, ratio; int fkounter = 0; String ticker; String txt = ""; float txtslide = 0; int bars = 65; int bpm = 117; int fps = 30; int maxframes = (3*60+22)*30+1; int daframe = 0; int oldbeat = -1; Anemiko(){ rotation = 0; cycles = zpectral.bufferSize; faktor = .8; ratio = width*.75; } void draw(){ pushStyle(); colorMode(RGB, 255); background(0); translate(width*.5, height*.8); pushMatrix(); rotateZ(rotation); float percent=max(0,(zpectral.myFFT.max-zpectral.minLimit)/zpectral.limitDiff); scale(1+percent/100); float raw_milisec = floor(daframe*1000/fps); float secs = floor(raw_milisec/1000); float mins = floor(secs/60); int s_frames = int(daframe%fps); int s_secs = int(secs%60); float raw_mins = raw_milisec/(1000*60); float raw_beat = 1+floor(4*bpm*raw_mins); int beat = 1+int((raw_beat-1)%16); int bar = 1+int((raw_beat-beat)/16); int step = 1+int((beat-1)/4); //if(oldbeat!=bar)randomSettings(); oldbeat = bar; daframe++; for(int i=0; i0 && i%3!=0){ scale(faktor); translate(0,sign*ratio*.25*.9); } else{ scale(.95); } float spc = 1+zpectral.myFFT.spectrum[i]; ellipse(0,0,2*ratio*spc,2*ratio*spc); } rotation+=PI/30; if(bar%4==3 && beat>=12)fkounter++; popMatrix(); popStyle(); } }