MIDI.js: MIDI.Player.loadFile not working,
MIDI.noteOn and MIDI.noteOff are working, but in the same onsuccess function, the MIDI.Player.loadFile does nothing. I’m on Chrome 51.0
I am passing the file name of the midi file directly to loadFile. Is that correct?
MIDI.loadPlugin({ soundfontUrl: “soundfont/”, instrument: “acoustic_grand_piano”, onsuccess: function() { var delay = 0; // play one note every quarter second var note = 50; // the MIDI note var velocity = 127; // how hard the note hits // play the note MIDI.setVolume(0, 127); MIDI.noteOn(0, note, velocity, delay); MIDI.noteOff(0, note, delay + 0.75);
MIDI.Player.loadFile("mysong.mid");
MIDI.Player.start();
}
About this issue
- Original URL
- State: open
- Created 8 years ago
- Comments: 18
On 20/07/16 11:36, gkfrog wrote:
The default example code overrides the tempo (dumb). Set MIDI.Player.BPM = 0 before loading your file.