I am using p5.js in a rather unconventional way where having sounds in an array would help a lot. Is it possible to do something like,
function preload(){
for(i = 0; i < songLocations.length; i++){
p5SongList[i] = loadSound(songLocations[i])
}
}
or is this the only current way to load sounds,
function preload(){
sound = loadSound(songList[0]);
sound1 = loadSound(songList[1]);
sound2 = loadSound(songList[2]);
sound3 = loadSound(songList[3]);
sound4 = loadSound(songList[4]);
}
Thanks!