Hello,
I’m just learning to work with sound and I can’t get my sketch to work.
Here’s the code:
let mySound;
function preload() {
soundFormats('mp3');
mySound = loadSound('doorbell.mp3');
}
function setup() {
mySound.setVolume(0.1);
mySound.play();
}
I’m using openprocessing.org as my IDE. I’ve uploaded a file called doorbell.mp3. I get an error that says: “Uncaught ReferenceError: soundFormats is not defined”
How do I define a function that p5 made, and not me?
