xxxxxxxxxx
var d1,d2, amplitude;
function setup(){
createCanvas(200,200);
background(200);
amplitude= new p5.Amplitude();
d1= loadSound("drum.mp3", keyPressed);
d2= loadSound("drum1.mp3", keyPressed);
}
function keyPressed(){
if(key === 'A'){
d1.play();
}
else if (key === 'B'){
d2.play();
}
function draw(){
fill(0);
stroke("
ellipse(100,100,100,100);
}
}