We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have 8 seperate sound files for 8 different screens (Want to play the first one for screen 1, the second one for screen 2 etc), however it's playing them all at once in every screen?
Currently I have this in a function called chooseSong(); (for all 8 sound files):
if(screen === 1){
song1.loop();
song1.play();
} else {song1.stop();
}
if(screen === 2){
song2.loop();
song2.play();
} else {song2.stop();
}
What am I doing wrong lol, I'm just a beginner with p5 so I have no clue :)