As we all know, HTML5 audio tag can support WAV, WEBM, MP3, OGG, ACC and other formats, but there is a very important music file format midi (extension mid) But there is no built-in support in the major browsers, Because the mid file does not record the sound's sampled information like other sound files, it records the instrument's performance instructions, which differ in principle. The most prominent bit of the mid file format is that the file is extremely small, and a few minutes of music may only
As we all know, HTML5 audio tag can support WAV, WEBM, MP3, OGG, ACC and other formats, but there is a very important music file format midi (extension mid) But there is no built-in support in the major browsers, Because the mid file does not record the sound's sampled information like other sound files, it records the instrument's performance instructions, which differ in principle.
Mid file format the most prominent is a little file, a few minutes of music may only a few K file size, MP3 and other formats are at least a few more than a few m, so MIDI in the mobile phone and the web has a great advantage, especially suitable for doing a variety of ringtones, background music.
The label is obsolete and many browsers are no longer supported.
Both standard organizations and browser vendors advocate the use of audio files for playback.
Given the wide range of calls for support for MIDI, the website has designated a draft web MIDI API, but the draft is also very new and browsers are not yet supported.
In order for MIDI to play on HTML5 audio, you need to use JavaScript to handle it.
I recommend here 3 very good JavaScript implementations of audio playback MIDI:
Midi.js-sequencing in Javascript.
This is a JS library that encapsulates a number of interfaces to facilitate web developer calls to play mid music files.
Color Piano V2
This is a color piano, you can play it manually, or you can automatically play a dynamically loaded mid file.
Audiotool
This is a powerful electronic music synthesis tool, without a bit of instrumental knowledge, may not understand the basic use, such as me.
This article from Cuixiping's blog, the original address: http://blog.csdn.net/cuixiping/article/details/7826138