audio
by Workshop, 8 July 1998why use audio?
Modern Human communication involves three fundamental components - text, sound and visual elements. Web pages are typically composed of textual and visual information but not sound. Adding sound to a web page enables all three human communication components allowing the web page message to be communicated as effectively as possible.
why not use audio?
The use of sound should compliment the visual component of the web page and not detract the visitor's attention from the visual contents of the page. For example, it would be difficult to concentrate on the contents of a page if there was an annoying "ditty" that was looped continuously.
Sound should be used constructively to provide "aural" clues and compliments for the visual contents to re-enforce the visual content. For example, a company may have a jingle that they currently use in their T.V. commercials and so it may be effective to play this sound ONCE when the company home page is loaded. Another use of sound would be to play a "button click" sound when the visitor clicks a button to provide "aural feedback" in response to their action of clicking a button.
The best advice is "less is more". If in doubt with the use of audio, leave it out.
audio file formats
There are three main audio file formats used on the Internet. The file formats and their advantages and disadvantages are presented in a table below.
| file format | advantages | disadvantages |
| .wav | High quality sound. Good for short sound effects. Will play on most Windows platforms. Multiple channels. | Large file sizes. |
| .au | Suitable for medium length sounds. Compression removes frequencies that can not be heard by the human ear. smaller file size than .wav | Compression involves discarding sound information. Only single channel (mono). |
| .mid | Smaller file sizes than .wav and .au Suitable for sounds of long duration. Stores high level representation of notes and instruments rather than actual sound itself. | Unsuitable for storing human speech. Only suitable for storing music. |
browser and platform considerations
In order for the sound in your web page to be played when someone visits your page, their computer must have a sound player that is capable of playing your sound.
The sound file formats we have presented here are generally supported by the default sound player on most platforms. However, the visitor must have their browser set up to launch the default audio player to play these sounds. Information on doing this can be found in the browser's online help.
As well as these considerations, each browser has their own way in which they think that a sound should be played. For example, Netscape uses the <EMBED> tag whereas Microsoft uses the <BGSOUND> tag. Later versions of browsers can usually support both methods of playing sounds. To alleviate these platform considerations, a audio plug-in may be used.
how to use sound
NOTE: Please ensure that your browser is set up to use your system audio player to play .wav files. Please consult the online help in your browser to do this.
In Netscape Navigator 3.0 upwards, sound is played using the <EMBED> container tag. In Microsoft Internet Explorer 3.0 upwards, sound is played using the <BGSOUND> container tag.
An HTML example of the <EMBED> tag.
<EMBED SRC="car.wav">