Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import processing.sound.*;
- import ddf.minim.*;
- import ddf.minim.analysis.*;
- //Sound listener
- Minim minim;
- AudioPlayer jingle;
- AudioInput input;
- ddf.minim.analysis.FFT fft;
- int[][] colo = new int[300][3];
- Float rand;
- void setup(){
- fullScreen();
- noCursor();
- minim = new Minim(this);
- input = minim.getLineIn();
- fft = new ddf.minim.analysis.FFT(input.bufferSize(), input.sampleRate());
- }
- void draw(){
- background(0);
- stroke(255);
- fft.forward(input.mix);
- for(int i = 0; i < width; i++){
- rand = random(255);
- fill(255,0,0);
- ellipse(i, height/2, 7, fft.getBand(i)*10);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement