Hi
Can anyone confirm … can loadBytes() only be used in preload() ?
If I try in setup() or anywhere else (e.g. in a new class) it doesn’t work.
let data;
function preload() {
data = loadBytes('assets/kick.wav');
}
function setup() {
//putting loadBytes() here doesn't seem to work?
//data = loadBytes('assets/kick.wav');
for (let i = 0; i < 5; i++) {
console.log("bytes[" + i + "] = " + data.bytes[i]) ;
}
}
function draw() {
}