I'm working on a Processing project for an art class and my plan was to make an audio visualizer where circles would appear from the amplitudes from the audio file. My main problem is that I'm trying to achieve a ripple effect where the circles would expand and ripple outward beyond the window after generating, but all of my circles stay put. Here's my draw function:
void draw(){
int n = 1000;
fft.forward(song.mix);
for (int i = 0; i <fft.specSize(); i++ ) {
z = fft.getBand(i) * 20;
if (n < 150){
stroke(colors [(int)random(0,9)]);
strokeWeight(random(50, 300)); //bigger strokes towards the middle
ellipse(x, y, z, z); //basic lines and shapes
z ++;
}
else{
stroke(colors [(int)random(0,9)]);
strokeWeight(random(10));
ellipse(x, y, z, z); //basic lines and shapes
z ++;
}
}
}
I'm not sure where I'm going wrong since I am incrementing z, so as far as I know each ellipses should expand.