xxxxxxxxxx
var mic;
function setup() {
createCanvas(500, 500);
// Create an Audio input
mic = new p5.AudioIn();
mic.start();
}
function draw() {
background(255, 210, 140, 10);
noFill();
stroke(131, 80, 0);
let r = map(mic.getLevel(), 0, 0.7, 0, height);
ellipse(width/2 , width/2, 300 , r, r); //position x, y, width, height
noFill();
stroke(0, 216, 255);
ellipse(width/2 , width/2, 200 , r, r); //position x, y, width, height
//translate(r, 50);
//rotate(r);
}