xxxxxxxxxx
18
let sound;
function preload(){
sound = loadSound("ragtime.mp3");
}
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw() {
background(220);
}
function mousePressed(){
if (sound.isPlaying()) sound.pause();
else sound.loop();
}