I have been looking all over, but I can not seem to find a simple Player example for midi.js http://mudcu.be/midi-js/ .
The Player example is so complex I cannot get it to work in my page....What am I missing?
<script src="./js/MIDI/AudioDetect.js" type="text/javascript"></script>
<script src="./js/MIDI/LoadPlugin.js" type="text/javascript"></script>
<script src="./js/MIDI/Plugin.js" type="text/javascript"></script>
<script src="./js/MIDI/Player.js" type="text/javascript"></script>
<script src="./js/Window/DOMLoader.XMLHttp.js" type="text/javascript"></script>
<!-- extras -->
<script src="./inc/Base64.js" type="text/javascript"></script>
<script src="./inc/base64binary.js" type="text/javascript"></script>
<script type="text/javascript">
MIDI.Player.loadFile("start.mid",MIDI.Player.start);
MIDI.Player.start();
</script>
You missed some imports. For a midi player, you should use the
script
tags from the demo-MIDIPlayer.html file.Also, you need to load the plugin, before you can start playing a file.