nick /224 /minim_simple


import ddf.minim.*;

Minim minim;
AudioInput in;

float[] x = new float[75];
float[] y = new float[75];
float[] angle = new float[75];
float[] speed = new float[75];
float[] radius = new float[75];
float speedRan = 1;
float radRan = 150;
float circleColor = 255;

void setup(){

   minim = new Minim(this);
   minim.debugOn();

  // get a line in from Minim, default bit depth is 16
  in = minim.getLineIn(Minim.MONO, 75);

   size(500, 500);
   smooth();
   background(114, 168, 255);

}

void draw(){
   background(114, 168, 255);

     //draw circles
     circleColor = in.left.get(10);
     circleColor = map(circleColor, 0, 1, 0, 255);
     println(circleColor);
     fill(circleColor);
     stroke(140);
     strokeWeight(5);
     ellipse (width/2, height/2, 200, 200);
   }





void stop()
{
  // always close Minim audio classes when you are done with them
  in.close();
  minim.stop();

  super.stop();
}

Page Details
Contact DANM  |  Digital Arts and New Media  |  Arts Division  |  Grad Division
login