HELP: playMode('sustain') is not working

Hi to all… here’s my code. I can’t figure out why playMode(‘sustain’) is not working… I’ve point to it inside a conditional and maybe could be the problem but I don’t find the solution.

https://editor.p5js.org/carpece/sketches/6kZI80Owh

Any help?

Thanks!

Seems like after you load the sound but try to do create audio. I a presume that loadSound and createAudio point to creating different objects.

Hence this line was causing the issue:

sonido2 = createAudio('audios/Re.mp3');

Guess it was making it an ‘audio’ object rather than a ‘sound’.