Supports MIDI 1.0 SMF and MIDI 2.0 Clips
See the demo...
npm install jzz-gui-player --save
or yarn add jzz-gui-player
or get the full development version and minified scripts from GitHub
https://github.com/jazz-soft/polymer-midi-player
https://github.com/jazz-soft/react-midi-player
<script src="https://github.com/jazz-soft/JZZ-gui-Player/raw/master/JZZ.js"></script>
<script src="https://github.com/jazz-soft/JZZ-gui-Player/raw/master/JZZ.midi.SMF.js"></script>
<script src="https://github.com/jazz-soft/JZZ-gui-Player/raw/master/JZZ.gui.Player.js"></script>
//...
<script src="https://cdn.jsdelivr.net/npm/jzz"></script>
<script src="https://cdn.jsdelivr.net/npm/jzz-midi-smf"></script>
<script src="https://cdn.jsdelivr.net/npm/jzz-gui-player"></script>
//...
<script src="https://unpkg.com/jzz"></script>
<script src="https://unpkg.com/jzz-midi-smf"></script>
<script src="https://unpkg.com/jzz-gui-player"></script>
//...
var JZZ = require('jzz');
require('jzz-midi-smf')(JZZ);
require('jzz-gui-player')(JZZ);
//...
import { JZZ } from 'jzz';
import { SMF } from 'jzz-midi-smf';
import { Player } from 'jzz-gui-player';
SMF(JZZ);
Player(JZZ);
//...
require(['JZZ', 'JZZ.midi.SMF', 'JZZ.gui.Player'], function(JZZ, smf, player) {
// ...
});
Please check the API Reference !
<div id=player></div>
<script>
var player = new JZZ.gui.Player('player');
var data = ... // load MIDI file as a string or a buffer
player.load(new JZZ.MIDI.SMF(data)); // MIDI 1.0, or
// player.load(new JZZ.MIDI.Clip(data)); // MIDI 2.0
player.play();
</script>
Please visit https://jazz-soft.net for more information.