For browsers not not yet supporting W3C Web Audio API the MIDI.js library falls back to conventional plugin-based methods to play MIDI files. However, some of the advanced features of MIDI.js are not supported or even cannot be supported in fallback mode.
Advantages of MIDI.js
Include MIDI.js into your website
Using MIDI.js to play MIDI files on your website is as easy as this. Lets assume you have a MIDI file "hinematov.mid" on your website in a directory named "midi".
There are just two steps to let it play:
1. Include the following script statement into your page's header
2. Create a link to play the file
<a href="#" onClick="MIDIjs.play('midi/hinematov.mid');">Play hinematov.mid</a>
Optinal: Provide a link to stop playback at any time
<a href="#" onClick="MIDIjs.stop();">Stop MIDI Playback</a>
More Detailed MIDI.js API Description
Browsers where MDI.js works with Web Audio API
The following browsers have been positively tested. If version x of a browser works you may assume, that version x+1 also works. These are the positive cases. However, I did not make a comprehensive test of all browsers and operating systems that exist.
- Safari on iPhone and iPad on iOS 7
- Google Chrome 31 on iOS 7
The following browsers are not supported by MIDI.js. If version x does not work you may assume, that version x-1 also does not work.