If you have been thinking about adding music to your web site
pages, this article will guide you by showing you how to do it.
Basically there are two ways a music file can be used on a
page. The first is as a hypertext link that can be clicked on
and than plays. The second is as an embedded file such as background
music which plays automatically when the page is loaded. Embedded
files are loaded along with the rest of the page, so the sound
file is downloaded to the user's computer whether or not the
user chooses to do so. This is not a preferred way as some users
will avoid going to that page. Music files can slow down downloading
of the page. For a slow computer the user may not want to take
the time to wait and may go on to another web site. If you choose
this offer your view a choice or warning from the home page that
there will be music played when they enter into a linked page.
A good practice is not to use music on your home page. If you
have an audience which expects music than use it sparklingly
on the home page.
The following HTML code adds MIDI to your site. If you use
a Web page editor such as Front Page or Macromedia you may not
deal directly with HTML code. However, I strongly urge you to
learn the basics of it, since you can exert much more control
over your pages this way. Make sure that the music MIDI file
is uploaded to the same directory where you keep your Web pages.
Use this code: <A HREF="filename.mid">.
Add your midi, wav or mp3 file in place of filename.
When playing music in the background use this code: <EMBED SRC="filename.mid" WIDTH="142"
HEIGHT="58" AUTOSTART="TRUE" REPEAT="TRUE">
This is what the code means for playing music in the background
EMBED SRC="filename.mid" is the specifies MIDI file.
WIDTH and HEIGHT are the size of the control panel that appears
on the page. Useing the values 142 and 58, or you can experiment
with making the player larger or smaller. To make a small player
panel look better, add the code CONTROLS=SMALLCONSOLE before
the WIDTH and HEIGHT values. For small consoles, consider using
You can hide the player by setting WIDTH="0" HEIGHT="2"
This way, the music plays in the background but the viewer of
the page cannot stop or restart it.
AUTOSTART="TRUE" this is the default setting, which
makes playback to begin automatically whenthe page is opened.
If you set AUTOSTART="FALSE" playback will start only
when the play button in the player panel is pressed.
REPEAT="TRUE" causes playback to loop until the
stop button is pressed. If you set REPEAT="FALSE" or
leave this code off entirely, the song will stop after it has
played back once.
These codes will work on both Netscape and Internet Explorer
browsers. Internet Explorer also can use the tag called "background
sound" . For example, you can use <BGSOUND="surfing.mid">
to play the file in the background without displaying a play
panel. Do not however, use this tag with Netscape. Since many
internet surfers use both web browsers it is strongly recommended
to use the EMBED=SRC method since it works with both. Do not
use both EMBED and BGSOUND tags together. This will cause some
versions of Explorer to play the file twice at the same time
When using FrontPage editor you have to add this code manually,
because entering a file name in the "background sound"
dialogue box will use the Explorer-only code. Other wise the
user may be propted that a plug-in is needed. In this case I
recommend using Crescendo or Beatnik. Netscape really doesn't
need a plug-in, but you can use either of these).
Once the music file has been uploaded to the server along
with your web site. The file needs to be test to hear if the
music plays correctly. If you have a problem, the browser displays
text instead of playing music, your server may not be configured
If this is the case you will have to ask your administrator
to check for the following settings.
MIME type = audio/midi or audio/x-midi
action = binary
suffix = .mid
type = midi
Music sample - go