My experiment works locally but crushes when I try to run it online.
I get this error message
and it says that the error is in this section of the code:
pieces = [pic1, pic2, pic3, pic4];
polygons = [polygon1, polygon2, polygon3, polygon4];
excerpts = ["p1.mp3", "p2.mp3", "p3.mp3", "p4.mp3"];
util.shuffle(excerpts);
console.log(excerpts);
excerpt1 = new sound.Sound({ "win": PsychoJS.window, "name": (folder + excerpts[0]), "hamming": true });
excerpt2 = new sound.Sound({ "win": PsychoJS.window, "name": (folder + excerpts[1]), "hamming": true });
excerpt3 = new sound.Sound({ "win": PsychoJS.window, "name": (folder + excerpts[2]), "hamming": true });
excerpt4 = new sound.Sound({ "win": PsychoJS.window, "name": (folder + excerpts[3]), "hamming": true });
excerpts = [excerpt1, excerpt2, excerpt3, excerpt4];
Specifically, it fails on this line:
excerpt1 = new sound.Sound({ "win": PsychoJS.window, "name": (folder + excerpts[0]), "hamming": true });
Any idea on what’s wrong here?