Implementing Sound Files

The two most commonly used audio file formats used on the Web are WAV and MIDI. There are other common formats, such as the RealNetworks .ram, .rmm, .ra, and .rm file formats. With the RealPlayer plug-in, users can listen to streaming music that at times can be broadcasted live.

MIDI files are entirely instrumental. They are composed using MIDI keyboards and are sometimes termed “computer music.” They are generally quick-loading files.

WAV files typically take a longer time to download and its important to keep file size down to the minimum, especially when combining the files with roll-over effects on clickable buttons, etc.

The file formats developed by RealNetworks generally initiate fairly quickly but require special configuration on the resident server for them to operate. For this reason, many Web developers find it cost-efficient to simply link to other files on the Web (provided they receive legal permission). But the disadvantage always exists where the file could be changed or taken offline, causing an error on your Web site. It may be worthwhile to take the investment of purchasing the files or the service that sets the capability for RealAudio files to run on your site.

Probably the easiest method to set-up a sound file on your site is to insert the appropriate code to your HTML.

To do this, you simply copy the code provided below and modify it to your specifications. Do you want the sound file to automatically load when a user visits the page? Maybe you want to give him or her some options as to what they would like to listen to (or listen to anything at all). If you want the sound file to automatically load, leave the code as it is. If you would like to give the user an option, replace the “true” attribute with “false” in the “NOJAVA” and “AUTOSTART” attributes.

<EMBED src=”thesoundfilename” WIDTH=”0″ HEIGHT=”0″ NOJAVA=”true” AUTOSTART=”true”>

Example (for a locally-stored file): <EMBED src=”techno.mid” WIDTH=”0″ HEIGHT=”0″ NOJAVA=”true” AUTOSTART=”true”>

The above format starts automatically and a user has no immediate options. The following modification displays a virtual music jukebox with options that starts manually.

<EMBED src=”thesoundfilename” AUTOSTART=”false”>

Example (for a locally-stored file): <EMBED src=”techno.mid” AUTOSTART=”false”>

Side Note: Notice how the height and width dimensions are deleted. This allows different audio plug-in dimensions to display accurately and not have a compressed (or enlarged) appearance. The attribute “NOJAVA” is also removed in the case a user has a favorite audio plug-in they use (such as Beatnik, for example).

This entry was posted in Putting your Creativity to Work. Bookmark the permalink.

Leave a Reply