Closed 747745124 closed 1 year ago
The reason I'm doing this is trying to have arbitary number of instruments (from MIDI files), it seems like it won't produce a sound after the instrument is being pushed to the array
instruments = []; const instr = new Soundfont(context, { instrument: this.trackSettings[0].instrument }); instr.load.then(() => { this.instruments.push(instr); } this.instruments[0].start({ note: "C4", velocity: 80, time: 5, duration: 1 })
The reason I'm doing this is trying to have arbitary number of instruments (from MIDI files), it seems like it won't produce a sound after the instrument is being pushed to the array