Some discoveries about adding sound
My preference for most purposes is to make a clickable hyperlink with a description of the music you will hear if you select the link. This way visitors can choose to play the music if they wish on the player their browser supports and then turn it off when they do not want to listen anymore. Here is the way to make make the link
<a href="voi.mid" >Listen to Bach</a> and it works like this Listen to Bach. Linking is another way to play the same midi file that I use in the examples here. People have discovered there is a "bug" with some versions of Win98 and IE right so that this method is not working for them.
NOTE: There are new elements in HTML5 to handle media content. HTML5 New Elements. The content here doesn't reflect the changes. The embed tag produced invalid HTML prior to HTML 5. More research is needed for the new elements: audio (and allowed attributes), video, source, embed and track. w3schools summarizes the new tags and attributes. HTML5 audio tag, the control attribute adds audio controls, like play, pause, and volume. HTML5 embed Tag
Examples Using EMBED
On this page in the example just above where the music does not load automatically and the example on the next page which has the music load automatically, I embedded sound to fiddle with Belov's Cross-Browser Background Music Tips, an excellent resource that is no longer online. His troubleshooting tips to test for problems on the ISP end also, especially that the server is sending the correct MIME types. Belov kept adding more tips as he got reports from users or tests on multiple browsers and MIDI players. Belov's email signature even carried the following advice: "Top reason MIDI doesn't work on your browser: You downloaded a small version of your browser from the web, and there's no MIDI plug-in in your plug-ins folder." and "Top reason MIDI doesn't work on your web site: The ISP is sending out the wrong MIME type for your MIDI files."
Zonie (fellow VU classmate who also assists with classes) advises from what he has learned through newsgroups and sources that a page loads more quickly and smoothly when you put the code for music at the very bottom of the web page. Belov confirmed that "this is true, although I [Belov] have had reports and confirmed myself that for at least one version of the QuickTime plug-in, the console must be visible on screen at the time the file loads or it will be impossible to play it. *Sigh*."
This is the code which should give most visitors a choice to turn on the music if they wish used above
<embed src="voi.mid" width="200" height="80" autostart="false" DISPLAY="SONG">
and the coding for the example I sent you to on the other page where the music loads automatically and shows a console for some visitors.
<embed src="voi.mid" width="200" height="80" autostart="true">
The code I used for the sound to load automatically works in Netscape and for friends using Microsoft Internet Explorer 3.01 and later or WebTV. Belov notes that the quotes are required around the attributes for WebTV now. The noembed tag set around the bgsound src="voi.mid" (thanks Sal for letting me borrow your Mozart) will still allow MSIE 3.0 and earlier to interpret the bgsound.
While a console shows up for me in Netscape 3.04, WebTV and some versions of MSIE will not show a control console. I want people to be able to turn off the sound if they wish. Reading further into the console tips, Belov suggested using width="200" height="80" for the console size that may not look good in some browsers but will not crash a system or cause unexpected results because it is too small. The size is really not that much bigger than what many people on the web have used for the console size of the plug-in installed with Netscape 3 on their pages who might not have known before. Notice also that you should not include use HIDE="false" in your HTML coding when you do this as this is not a valid option and you may "crash" some visitors if you use it.
Netscape documentation about sizes depending on the browser version may not be applicable across Netscape plug-ins either. If you set the size too small, besides taking a chance on crashing some browsers or causing unexpected results, only one button to turn off the sound may show (or not enough to even do that) and you will not be able to turn it back on. If you do not set a size, MSIE does not get the console at all.
Since you made it this far, here is the code to hide the control console and load automatically. (the one that some of you already do not see here.) I would make sure that your music is important to the page and not too long before using this version. Or consider the alternative of making a clickable link.
<embed src="voi.mid" hidden="true" autostart="true">