Adding Midi Files to your Webpage December 24, 2009
Large music files can cause a webpage to load slowly. Using midi files for background music on a webpage can solve this problem
The most asked question I get is about midi files, “How do I put midi files on my page?” Here is an example of an embedded midi file I have on one of my webpages. ( EMBED src=”midifile.mid” width=145 height=30 autostart=true loop=true ). surrounded by brackets
In the example, the midi file (midifile.mid) is the name of the midi file you have saved on your server. Width and height determine the size of the media player displayed on the page. If you do not want a player to display on your web page but want the music to play, use a width and height of 1 or 2 (0 width and height sometimes causes problems with some players).
autostart=true means the file will play automatically when the page loads. autostart=false would not start the file automatically
loop=true causes the file to play and loop, loop=false plays a file once.
Your WWW Browser can access MIDI files (or any files for that matter) and play them within Internet Explorer, or other browsers. In Internet Explorer, you can determine which program will play a midi file on the web Look in the “Programs” tab (under “Tools”, then “Internet Options…”). Select “Internet Programs/Set Programs/”Associate a File Type or protocol with a program”. You will see a list, look for “.mid or .midi” in the “Name” column. From those entries, you can see the program in the “Current Default” column. This determines what program will be used to play your midi when you click on a MIDI file on a www page.
Some midi files are “zipped” files to make then easy to download. If you are using “Winzip”, or another file zip utility program the zipped file can be played without a lot of trouble. Make sure your unzip program is the default application to open .zip files. Then, you just click the mid file when your unzip program show the contents, and it plays!
Also, If you set up your Helper Apps to “play” the midi song when selected with a particular program, you can always save it (download it) instead of playing it by right clicking on a file and choosing the “Save Target as” to save the file to your hard drive. That way, you don’t have to delete your “Helper apps” entry for .mid files if you want to save it or have to hunt through your Temporary Internet Files directory, to find the file (which might have a temp name, like “GK8DETHN” or something)
Midi expert Cliff Odenkirk is a well known internet musician. Webmaster for Midicity.com music and entertainment news as well as an accomplished midi musician. You can find more music news and articles at Midicity.com music and entertainment articles
Leave a Reply