SHARE
TWEET

Untitled

a guest Apr 25th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. import processing.sound.*;
  3. import ddf.minim.*;
  4. import ddf.minim.analysis.*;
  5.  
  6. //Sound listener
  7.  Minim minim;
  8.  AudioPlayer jingle;
  9.  AudioInput input;
  10.  ddf.minim.analysis.FFT fft;
  11.  int[][] colo = new int[300][3];
  12.  Float rand;
  13.  
  14.  
  15.  
  16. void setup(){
  17.    fullScreen();
  18.  
  19.  
  20.   noCursor();
  21.  
  22.  
  23.   minim = new Minim(this);
  24.  
  25.  
  26.   input = minim.getLineIn();
  27.  
  28.   fft = new ddf.minim.analysis.FFT(input.bufferSize(), input.sampleRate());
  29.  
  30. }
  31.  
  32.  
  33.  
  34. void draw(){
  35.   background(0);
  36.   stroke(255);
  37.   fft.forward(input.mix);
  38.  
  39. for(int i = 0; i < width; i++){
  40.   rand = random(255);
  41.   fill(255,0,0);
  42.     ellipse(i, height/2, 7, fft.getBand(i)*10);
  43.    
  44.   }
  45. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top