How to add sound to your site


By popular demand, this page has been created to help you add sound to your page.
Hear that? I thought so...that's because I've set this page to start playing music as soon as you visit it. If you don't hear anything, you're probably using Netscape, which doesn't recognise the same sound commands - sound can be complicated!
I'll explain more about this in just one minute.

Step 1: Getting sound files

The first step in adding sound to your page is to get the sound files. All the codes on this page will work for either .mid or .wav files. Although all the codes use .mid, you can use .wav files by just substituting the file names - the code will still work! I got my sound of a CD, but there are tons of places on the Internet where you can download sound files. Try The Midi Farm. Just make sure that if you use somebody's sound files you ASK first and then give them credit on your site!

Step 2: Transfering the files onto your server

Once you have the sound files stored on your hard drive, you can easily transfer them to the Geocities server by using the EZ Upload Facility provided in the File Manager.

Step 3: Adding the sound code to your site

First: One important piece of information about Internet sound. There are two ways of using it. With method 1, any visitor to your site will be able to hear the music. With method 2, the visitor will need to download a "plug-in" to their browser (like Crescendo).

Method 1: Using Helper Applications

This is the method used to play the background music on this page...it would play even if you didn't have any plug-ins.
If you're using Internet Explorer you get things really easy! If you want music to start playing as soon as a visitor goes to your page, you can just enter:

<BGSOUND SRC="filename.mid">

Where filename.mid is replaced by the name of your sound file.

Note: Visitors will only be able to hear this if they're using Internet Explorer!

If you want every visitor to be able to play music without installing a plug-in (regardless of which browser they're using), you'll have to use this code:

<a href="filename.mid">Click here for music</a>

Where filename.mid is replaced by the name of your sound file.

Note: this code is just like creating a link to a music file...it does require your visitor to click on the link before it plays music.

Method 2: Using Plug-ins

Using plug-ins allows you to do a lot more fancy stuff with your sound, but you must remember that unless your visitor has downloaded a plug-in, they're not going to hear anything!
If you'd like to download a plug-in, I recommend Crescendo (yes, it's free).

Here's the code to embed sound using plug-ins...

<EMBED SRC="filename.mid" autostart="true/false" width="145" height="55" loop="true/number" hidden="true/false">
</EMBED>

Note:
1. Replace filename.mid with the name of your sound file.
2. "Autostart" refers to whether or not you want the sound to start playing automatically. If you do, chose "true"...otherwise, chose "false".
3. This "height" & "width" is set for Crescendo, but you can change them to anything you like.
4. "loop" refers to how many times the sound file will play. If you chose "true", it will keep repeating itself. Otherwise you can just select a number of times it should play.
5. You don't HAVE to include the "hidden" bit, but this gives you the option of having the sound icon invisible. If you want the icon invisible, chose "true" (but the music must be autostart for this to work!). Otherwise, chose "false".

Have fun!

LinkExchange
LinkExchange Member Free Home Pages at GeoCities

This page hosted by GeoCities Get your own Free Home Page