xxxxxxxxxx
var input;
var analyzer;
var multiplier = 10000;
var threshold = 5;
function setup() {
createCanvas(windowWidth, windowHeight);
input = new p5.AudioIn();
input.start();
}
function draw() {
background (100, 100);
var volume = input.getLevel();
//print(input.getLevel());
if (volume*multiplier > threshold)
{
fill (200, 20, 20);
ellipse (windowWidth/2, windowHeight/2, volume*multiplier, volume*multiplier);
}
}