I'm trying to create a variation of the color piano site at http://mudcu.be/piano/ and am really struggling to find a good working example of how to parse a MIDI file, drawing graphical elements and playing MIDI notes.
Does anyone know how the color piano site was created?
I'm first just trying to get a specific midi file playing - with no luck.
The code below doesn't do anything and it doesn't show an error.
<!DOCTYPE html>
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<!-- polyfill -->
<script src="static/Base64.js" type="text/javascript"></script>
<script src="static/Base64binary.js" type="text/javascript"></script>
<script src="static/WebAudioAPI.js" type="text/javascript"></script>
<!-- midi.js package -->
<script src="static/audioDetect.js" type="text/javascript"></script>
<script src="static/gm.js" type="text/javascript"></script>
<script src="static/loader.js" type="text/javascript"></script>
<script src="static/player.js" type="text/javascript"></script>
<script src="static/event.js" type="text/javascript"></script>
<script src="static/plugin.audiotag.js" type="text/javascript"></script>
<script src="static/plugin.webaudio.js" type="text/javascript"></script>
<script src="static/plugin.webmidi.js" type="text/javascript"></script>
<!-- jasmid just in case-->
<script src="static/stream.js"></script>
<script src="static/midifile.js"></script>
<script src="static/replayer.js"></script>
<!-- utils -->
<script src="static/dom_request_xhr.js" type="text/javascript"></script>
<script src="static/dom_request_script.js" type="text/javascript"></script>
</head>
<body>
<script type="text/javascript">
window.onload = function () {
MIDI.loadPlugin({
soundfontUrl: "static/",
instrument: "acoustic_grand_piano",
callback: function() {
MIDI.Player.loadFile("static/mario.mid", MIDI.Player.start);
}
});
}
</script>
</body>
</html>