But good General MIDI tracks do exist. And MIDI does have the advantage of very small file size. That's because the file specifies the notes and instruments rather than recording the actual sounds.
By itself, MIDI (Musical Instrument Digital Interface) doesn't specify any standard instrument sounds. The "General MIDI" specification adds standardized instruments so that a MIDI file made with one computer can be played back with predictable results on another computer— the piano will still be a piano, the guitar will still be a guitar.
Unfortunately, Flash won't do MIDI. But there's another solution that does work for MIDI. We can embed the MIDI player directly in the page, via the object element:
<param name="loop" value="10"/>
If you're seeing this, you don't have a MIDI player
on your computer.
This HTML code will embed the MIDI file mysong.mid directly in the page. This code assumes that mysong.mid is in the same folder with the web page. If not, just adjust the URL in the data attribute, just as you would if you were linking to another page.
The param name="loop" element specifies how many times the song will repeat. By setting the value attribute to 10, we repeat the song ten times.
Drawbacks of Embedded MIDIUnfortunately, not everyone has a MIDI player. And even if they do, not every web browser is set up to embed that player. Be aware that a small fraction of users will not be able to hear your MIDI music.
Got a LiveJournal account? Keep up with the latest articles in this FAQ by adding our syndicated feed to your friends list!