fabianmoronzirfas
8/4/2016 - 12:09 PM

minim_fiddle.pde

import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;
import ddf.minim.signals.*;
import ddf.minim.spi.*;
import ddf.minim.ugens.*;


Minim minim;
AudioInput in;

void setup(){
minim = new Minim(this);
in = minim.getLineIn(Minim.STEREO,512);
size(512,100);

}

void draw(){
  background(255);
  float overall = 0;
  
  for(int i = 0; i < in.bufferSize() -1; i++){
    overall += in.mix.get(i);
    line(i,height - in.mix.get(i) * 20,i,height);
  }
  
  ellipse(overall * width, height /2,10,10);
}