in src/app/keyboard.component.ts [55:69]
playMelody(melody: [string, number, number][], start = 0) {
this.noteReleased();
if (start >= melody.length) {
return;
}
const current = melody[start];
this.notePressed({
note: current[0],
octave: current[1],
frequency: this.octaves[current[1]][current[0]]
});
setTimeout(() => {
this.playMelody(melody, start + 1);
}, current[2]);
}