xxxxxxxxxx
var mic, color;
function setup() {
createCanvas(windowWidth, windowHeight);
background(100);
mic = new p5.AudioIn();
mic.start();
color = 0;
}
function draw() {
background(color, 0, 0);
fill(color, 0, 0);
if (map(mic.getLevel(), 0.01, 1, 0, 10) > 0) color += map(mic.getLevel(), 0.01, 1, 0, 10);
if (color > 255) color = 0;
ellipse(windowWidth/2, windowHeight/2, map(mic.getLevel(), 0.01, 0.6, 0, 400));
}