MIDI.Player.loadFile not working,
See original GitHub issueMIDI.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();
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:18
Top Results From Across the Web
Javascript MIDI File player [closed] - Stack Overflow
It event allows interacting with MIDI hardware devices! Loading a file is as simple as: MIDI.Player.loadFile("file.mid", callback);. Playing a file is even ...
Read more >Developers - MIDI.Player.loadFile not working, - - Bountysource
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.
Read more >midi-player-js - npm
MidiPlayerJS is a JavaScript library which reads standard MIDI files and emits JSON events in real time. This player does not generate any...
Read more >MIDI.js - Sequencing in Javascript.
Player.start(); // start the MIDI track (you can put this in the loadFile callback) MIDI.Player.resume(); // resume the MIDI track from pause ...
Read more >Midi-player-js NPM - npm.io
MidiPlayerJS is a JavaScript library which reads standard MIDI files and emits JSON events in real time. This player does not generate any...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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.
This is an exceptional program you’ve put together. Exactly what I needed! I am impressed.
Thanks.
Gary
On Wed, Jul 20, 2016 at 3:37 PM, Gary Harber gkharber@gmail.com wrote: