mino audio
in
Core Library Questions
•
1 year ago
hello. I'm trying to move an object around the stage with the sound that is captured by thesystem. but he can only go to one side.
how can I do?
I've been working on this code ...
how can I do?
I've been working on this code ...
import ddf.minim.*;
Minim minim;
AudioInput in;
float x = 10;
float y = 10;
void setup()
{
size(600, 200);
minim = new Minim(this);
in = minim.getLineIn(Minim.MONO, 1024);
}
void draw(){
som1();
}
void som1(){
background(0);
float ruido = in.mix.level()*600;
x=x+in.mix.level()*100;
fill(255,255,255);
rect(x,y,20,20);
}
void stop()
{
in.close();
minim.stop();
super.stop();
}
thank you
1