Random Circles

[processingjs]
void setup() {
size(600,600);
background(0,200,100);
frameRate(6);
minim = new Minim(this);
in = minim.getLineIn();
beat = new BeatDetect();
}
//draw circles at random locations and colours when noise detected. Size of circle determined by volume on left channel (between 0-1)
void drawShapes(){

ellipse(50,50,50,50)

}

void draw() {
beat.detect(in.mix);
drawShapes();
//mouse press resets background colour
if (mousePressed){
float a = random(250);
float b = random(250);
float c = random(250);
fill(a,b,c);
rect(0,0,600 ,600) ;
}

}
[/processingjs]

Comments are closed.