sound tech

 

 

 

import ddf.minim.*;
import ddf.minim.analysis.*;

Minim minim;
AudioPlayer song;
FFT fft;
void setup() {
size(600, 300);
minim = new Minim(this);
song = minim.loadFile(“gt.mp3”, 512);
song.play();
fft = new FFT(song.bufferSize(), song.sampleRate());
}
void draw() {
background(0);
fft.forward(song.mix);
stroke (128, 0, 30, 255);
for (int d = 0; d < fft.specSize(); d++)
{
fill(255, 0, 0);
ellipse(45, 100, 120, height+fft.getBand(d)*5);
ellipse(600, 100, 120, height+fft.getBand(d)*5);
ellipse(300, 200, 40, height*fft.getBand(d)*5);
fill(255);

rect(d, 50 + song.left.get(d)*50, d+1, 50 + song.left.get(d+1)*50);
stroke(19,91,239);
rect(d, 280 + song.left.get(d)*100, d+1, 50 + song.left.get(d+1)*100);
ellipse(300, 180 + song.left.get(d)*50, d+1, 50 + song.left.get(d+1)*50);
}
}
}

Advertisements
This entry was posted in Time-Based and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s