Web Page Sound

HTML



 WHAT'S NEW 
 HTML FORUM 
 SITE MAP 
 REQUEST HELP 
 TRADE LINKS 
 FREE LINKS PAGE 






WEBMASTERS
Earn Money
Per Click!




SmallDot.com


BraveNet


TrafficSwarm


Submit9000


CodeBrain


Color Schemer


FlashBanger


123TurnKey.com


Web Page Templates


SourceGuardian


Dynamic Drive


Home
General
HTML
Java Applets
Javascript
Wizards
Contact


The Html Help Guide


Sounds



Sound Files
There are quite a few types of sound files used on the web including au, midi, mp3, ra, rm, and wave. The au format is used mainly with java applets as sound effects. Midi files are usually small in file size and are good for web page background music. The mp3 format is the most popular type with great sound quality in relation to file size. The ra and rm files are RealAudio sound and work very well when "streamed" from a web site. Wave files are very large and should be used only for short sound clips.


Background Music With The Midi Format
It's very easy to locate and download a large variety of midi files. It's also very easy to embed them into a web page as background music. Below are several configurations that can be copied and pasted into a web page. They should be place right above the </body> tag of the source code. Replace the two instances of sound.mid with your sound file name. Don't forget to upload the midi file to the same directory that contains your web page.

Display a control box, start playing automatically, and play the sound continuously.
<embed src="sound.mid" autostart=true loop=true width=144 height=74><noembed><bgsound src="sound.mid" autostart=true loop=infinite width=144 height=74></noembed>

Display a control box, start playing automatically, and stop after playing once.
<embed src="sound.mid" autostart=true loop=false width=144 height=74><noembed><bgsound src="sound.mid" autostart=true loop=1 width=144 height=74></noembed>

Display a control box, require the play button to be clicked, and stop after playing once.
<embed src="sound.mid" autostart=false loop=false width=144 height=74><noembed><bgsound src="sound.mid" autostart=false loop=1 width=144 height=74></noembed>

Start playing automatically and play the sound continuously.
<embed src="sound.mid" autostart=true hidden=true loop=true><noembed><bgsound src="sound.mid" autostart=true loop=infinite hidden=true></noembed>

Start playing automatically and stop after playing once.
<embed src="sound.mid" autostart=true hidden=true loop=false><noembed><bgsound src="sound.mid" autostart=true loop=1 hidden=true></noembed>


RealAudio
These are .ra or .rm files that you can download from the web or create by converting wav or mp3 files with the RealProducer available from http://www.real.com. The best way to play these from your site is to stream them by creating .rpm file. This is simply a text file containing the web path to the .ra or .rm file. Here's what you do.

Upload the .ra or .rm file that you plan to use to your main online directory.

Open windows notepad, or some other text editor, and type the path to the file. For example: If your site is
http://username.tripod.com/
and the sound file is named mysong.ra
then you would type
http://username.tripod.com/ mysong.ra

Now save the file as mysong.rpm to a folder on your computer. Upload this file to the same directory that contains the mysong.ra file.

Place the line below into the body section of any of your pages that you want to play the music from.

<embed src="mysong.rpm" width=250 height=35 controls=controlpanel autostart=true>


Wave Files
As I stated earlier, wave files are too large to use for anything but short sound clips. To play them you can simply link directly to the file.
<a href="sound.wav">Click Here To Play</a>




Join the Html Help Guide mailing list
Enter your email address.
Subscribe    Unsubscribe