Audio on the Web

Contents:

Basic Digital Audio Concepts
Using Existing Audio
Preparing Your Own Audio
Streaming Audio
Web Audio Formats
Choosing an Audio Format
Adding Audio to a Web Page
For Further Reading

Simple audio files found their way onto the Web in its earliest days when they could be linked to and downloaded like any other file. The drawback to this technique is that traditional audio files are generally quite large and may take a prohibitively long time to download. As the Web evolved, we've seen some major breakthroughs in web audio. First, streaming audio (files that play as they download) made long-playing audio and even live broadcasts possible. Then the MP3 format exploded into popularity around 1999. MP3's ability to crunch audio files to one-tenth their original size while maintaining very good quality made it a perfect solution for sharing music over the Internet.

Obviously, audio, even specialized for the Web, is a rich and complex topic that cannot be thoroughly treated in a single chapter of a Nutshell reference tutorial. If you are interested in learning about all the ins and outs of creating professional-quality audio for a website, I recommend starting with Designing Web Audio by Josh Beggs and Dylan Thede (Anonymous, 2001). It contains information on recording, editing, and optimizing audio content, as well as in-depth discussions of popular web audio formats.

This chapter introduces general audio concepts and a number of popular web audio file formats, including WAV, AIFF, MP3, QuickTime, MIDI, RealAudio, Windows Media, Liquid Audio, Flash audio, and Beatnik's Rich Media Format. It also discusses the many options for adding audio to a website. It begins with an introduction to basic audio terminology that will be useful to know when it comes time to create and optimize sound files.

Basic Digital Audio Concepts

In order to distribute recorded speech or music over the Internet, an analog signal must be converted to digital information (described by bits and bytes). This process is called encoding . It is analogous to scanning a photograph to a digital bitmap format, and many of the same concepts regarding quality and file size apply. Some audio file formats (such as MPEG) are compressed in size during encoding using a specialized audio compression algorithm to save disk space. In the encoding process, you may be asked to provide settings for the following aspects of the audio file.

Figure 24-1

Figure 24-1. Audio wave after lowering sample rate and bit depth

It stands to reason that before you can put your own audio files on the Web, you first need to create them. Your options are to find existing audio resources (such as from a royalty-free CD) or to record them yourself.