Skip to content

Instantly share code, notes, and snippets.

@tomerweller
Created July 5, 2014 15:41
Show Gist options
  • Save tomerweller/7ffb247991f4e3f8e24f to your computer and use it in GitHub Desktop.
Save tomerweller/7ffb247991f4e3f8e24f to your computer and use it in GitHub Desktop.
read RMS amplitude of input audio stream
import ddf.minim.*;
Minim minim;
AudioInput in;
void setup()
{
minim = new Minim(this);
in = minim.getLineIn();
}
void draw()
{
println(in.mix.level());
}
void stop()
{
in.close();
minim.stop();
super.stop();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment