submission by carlpoper for fast fourier transforms - playing with sound (View the other submissions)
var fft,mic;
function setup(){
  var myCanvas = createCanvas(displayWidth,displayHeight); //you must keep this line unmodified
  band_count = 64
  fft = new p5.FFT(0,band_count);
  ellipse(400,400,50,50)
  colorMode(HSB,100)
  spectrums=[]
  mic = new p5.AudioIn();
  mic.start();
  fft.setInput(mic);

  last_time = millis()
}

function recurse(x,y,v){
  fill(v,v%100,100)
  ellipse(x,y,v,v)

}

function draw() {
  background(0,5)
  //noStroke()
  ellipse(mouseX,mouseY,20,20)
   s = fft.analyze()
   //console.log(s.length)
   d= sqrt(band_count)
   //console.log(d)
space = width / d
   for(i=0;i<d;i++){
   for(y=0;y<d;y++){
     //console.log(d*i+y)
         r=map(s[d*i+y],0,255,0,10)

     recurse(i*space,y*space,s[d*i+y])
   // ellipse(i*space,y*space,r,r)
   }
  }
}