Installing A MIDI or WAV File



Here's a basic code for putting a MIDI on your page:

<BGSOUND SRC="XXXX.mid" LOOP=INFINITE>

<embed src="XXXX.mid"align="center" height="60" width="144" autostart="true"repeat=true loop=true>

It will look like this when you're done:

See where it says XXXX.mid? You'll notice it in two places. That's because there are two codes, one for Netscape users and one for I.E users, so that everyone will be able to hear the music. Just replace the XXXX.mid with the name of the MIDI that you want to use and then just copy and paste the entire code above into your webpage where you want the small music box to show up. The only bad thing about this code is that it will sometimes casue the Midi file to keep playing even after the visitor has turned it off.

If you want your visitor to always be able to turn off your music, try this code:

<embed src="yoursong.mid" width=275 height=25 autostart="true" loop="true">

It will look like this:

If you want to use a sound file (WAV) instead you can, but keep in mind that sound files are far larger than MIDI (.mid),so you'll only want to use WAV's for special occasions.
To install a music wav file, just use the codes above for MIDI, but subtitute the name of your WAV file for the XXXX.mid.

If you want to put a sound on your page that plays only once, a simpler code is needed. The above code will play the MIDI repeatedly: note the "LOOP=INFINITE" and the "repeat=true" "loop=true" settings.
This simple code set below is all you need to install a single playing sound or music file that will be heard in almost any browser.

<BGSOUND SRC="XXXX.wav">
<embed src="XXXX.wav">
This is what your sound box will look like:



Back to Main Index


These pages produced by Ariel