Simply put...
why does
setTimeout(\'playNote(\'+currentaudio.id+\', \'+noteTime+\')\', delay);
work perfectly, calling the function
Try this.
setTimeout(function() { playNote(currentaudio.id,noteTime) }, delay);