![]() |
This shows how to add user selected MIDI or WAV sounds to your page.An example of incorporating the playing of a MIDI sound/music file in your home page.
![]() The MIDI du jour is The Eagles Hotel California (my personal favorite). This will work with Netscape 3+ and Internet Explorer 3+ browsers. To add a MIDI play to your page like this, place the MIDI file into your directory and include the HTML shown below, substituting the name of your selection.
Note that the selection will keep on playing even though you navigate off the page where you selected the MIDI. When you have had enough, you can close the pop-up. If you want, you can repeat the playing of the selection from that pop-up. The HTML used to start this selection is: A viewer can copy your selection to their own PC by right clicking on the link and selecting Save Link As.... If that is your intent, then adding this instruction to your page would be a good idea. Many home pages automatically start some MIDI selection as soon as the page is loaded. While this seems like a good thing, I personally do not like background selections that Autostart. First, it requires that you wait until the selection downloads to see the whole page. This can significantly increase the load time for a page. If you still want to have a background sound, here is an HTML example that will work for all browsers (since Netscape doesn't recognize the BGSOUND tag and Internet Explorer doesn't recognize the EMBED SRC= tag). If you want simple code without having to worry whether someone is using Netscape or something else, here it is:
Specifying HIDDEN=TRUE prevents a player plug-in control from showing up on your page. If you want to give the viewer control over the player, you can specify a HEIGHT and WIDTH parameter for the "console". Using WIDTH=145 HEIGHT=35 allows the console shown above to be displayed (don't forget to leave the HIDDEN=TRUE parameter out to display a console). Charles Belov's page (referenced below) has some guidelines for sizing for different console options. The above tags will play the music once. If you want the music to play forever (not recommended) place a LOOP=INFINITE parameter in the tag. In order to play a MIDI file, you must have the selection stored in your server directory. MIDI selections are available for download from many sources. Search engines (using midi as the key) will give you a lot of pointers. (One good starting point is Yahoo's MIDI Archives page.)
A great resource for MIDI related topics, including tests you can run as well as a lot of helpful information, is Charles Belov's MIDI Web Tips and World Rock Site. I have found his info to be of great help in this area.
|
If you want to use this page as a template to start your own page, use File, Save As.. to save a copy of the HTML (what you see if you select View, Document Source) and then use an HTML editor (like Homesite) to customize it on your own computer. |
Copyright © 1999 Jim Hanson
This Page was created with Homesite.
Most recent revision Sept. 1999