xxxxxxxxxx
var sound, amp;
function preload() {
sound = loadSound('MyDilemma.mp3');
}
function setup() {
createCanvas(windowWidth, windowHeight);
background(100);
sound.play();
amp = new p5.Amplitude();
amp.setInput(sound);
}
function draw() {
background(0);
translate(width/2,height/2);
ellipseMode(CENTER);
// rect(0,0,amp.getLevel()*500,50);
// rect(0,100,amp.getLevel()*200,50);
fill(255);
noStroke();
ellipse(0,0,amp.getLevel()*500,amp.getLevel()*500);
noFill();
stroke(255);
ellipse(0,0,amp.getLevel()*800,amp.getLevel()*800);
}