I made use of human vision residue to superimpose several random squares when the volume was high, forming a sense of mess. Also, I varied the color depth along with size of the cycle to create a hazy sense.
import processing.sound.; import processing.video.;
boolean playing = false;
SoundFile xs;
Amplitude analysis;
float tempt;
void setup() {
size(500, 500);
background(0);
xs = new SoundFile(this, “sample.aiff”);
//xs.cue(13.5);
analysis = new Amplitude(this);
//xs.amp(10.5);
analysis.input(xs);
xs.play();
}
void draw() {
background(255);
tempt = analysis.analyze();
tempt = map(tempt,0,1,0,width);
fill(tempt);
stroke(tempt/2);
strokeWeight(map(tempt,0,width,0,15));
ellipse(250, 250, tempt, tempt);
if (tempt>250){
float tempt2 = random(0,tempt/5);
fill(random(0,tempt2),random(0,tempt2),random(0,tempt2));
rect(random(width),random(height),tempt2,tempt2);
}
}
Leave a Reply
You must be logged in to post a comment.