Made with Processing. The circle reacts to the volume of sound, in real time. The size of the circles can be changed to be more or less sensitive to sound. Stroke color and Fill color can be altered using Random R G B and Alpha. Each color channel is either set to Random(255) or can be set to 0. The fade rate can be changed as well. Song is Fuel Head by Kromestar vs. Hatcha. This is the source code of a previous version, before I split it up into classes: _____________________________________________ import ddf.minim.*; Minim minim; AudioInput in; int sizex = 80; int beat = 150; float xpos = width/2; float ypos = height/2; float xspeed; float yspeed; float fadeRate = 20; float fRR; float fGG; float fBB; float fAA = 255; float sRR = 0; float sGG = 255; float sBB = 255; float sAA = 255; int xdirection = 1; int ydirection = 1; void setup(){ minim = new Minim(this); minim.debugOn(); in = minim.getLineIn(Minim.MONO, 64, 8000,8); background(0); size(1200,600); //size(screen.width,screen.height); frameRate(30); smooth(); xpos = width/2; ypos = height/2; } void draw(){ xpos = xpos + (xspeed * xdirection); ypos = ypos + (yspeed * ydirection); // if (xpos > width-sizex || xpos // xdirection *= -1; // } // if (ypos > height-sizex || ypos // ydirection *= -1; // } if (xpos > width-sizex){ xpos = 0; } if (xpos+sizex xpos = width-sizex; } if (ypos > height-sizex){ ypos = 0; } if (ypos+sizex ypos = height-sizex; } fill(0,0,0,fadeRate); rect(0,0,width,height); for(int i = 0; i ///////////////////////////STROKE COLOR if (key == 'u'){ sRR = random(255); } if (key == 'i'){ sGG = random(255); } if (key == 'o'){ sBB = random(255); } if (key == 'p'){ sAA = random(255); } ///////////////////////////STROKE COLOR /////////////////////////////FILL COLOR if (key == 'h'){ fRR = random(255); } if (key == 'j'){ fGG = random(255); } if (key == 'k'){ fBB = random(255); } if (key == 'l'){ fAA = random(255); } /////////////////////////////FILL COLOR stroke(sRR,sGG,sBB,sAA); fill(fRR,fGG,fBB,fAA); ellipse(xpos+sizex/2,ypos+sizex/2,sizex+in.left.get(i)*beat,sizex+in.left.get(i)*beat); } } void keyPressed(){ if (key == 'd'){ xspeed = xspeed + 1; xspeed = constrain(xspeed,-25,25); loop(); } if (key == 'a'){ xspeed = xspeed - 1; xspeed = constrain(xspeed,-25,25); loop(); } if (key == 's'){ yspeed = yspeed + 1; yspeed = constrain(yspeed,-25,25); loop(); } if (key == 'w'){ yspeed = yspeed - 1; yspeed = constrain(yspeed,-25,25); loop(); } if (key == CODED) { if (keyCode == UP) { sizex = sizex + 10; sizex = constrain(sizex,1,150); } } if (key == CODED) { if (keyCode == DOWN) { sizex = sizex - 10; sizex = constrain(sizex,1,150); } } if (key == CODED) { if (keyCode == RIGHT) { beat = beat+50; beat = constrain(beat,0,1000); } } if (key == CODED) { if (keyCode == LEFT) { beat = beat-50; beat = constrain(beat,0,1000); } } if (key == '1'){ fadeRate = 1; } if (key == '2'){ fadeRate = 5; } if (key == '3'){ fadeRate = 10; } if (key == '4'){ fadeRate = 20; } if (key == '5'){ fadeRate = 30; } if (key == '6'){ fadeRate = 40; } } void stop() { in.close(); minim.stop(); super.stop(); }
(Less)