xxxxxxxxxx
24
let input;
let col;
function setup() {
createCanvas(400, 400);
input=new p5.AudioIn();
input.start()
}
function draw() {
//background(220);
let vol=input.getLevel();
col=map(vol,0,1,random(20,100),random(10,150))
fill(col*2,col*20,150,100)
stroke(col,20)
let ellipseWidth=map(vol,0,1,50,width)
let ellipseHeight=map(vol,0,1,50,height)
ellipse(width/2,height/2,ellipseWidth, ellipseHeight)
}