xxxxxxxxxx
20
let sound;
function setup() {
createCanvas(400, 400);
sound = loadSound("dramatic.mp3");
}
function draw() {
background(220);
}
function mousePressed(){
if (sound.isPlaying()) {
sound.stop
} else {
sound.play();
}
}