Sound World

Digital audio for your Web site and more

By: Jackie Dove

May 18, 2005

You already have a great looking Web site. It has a compelling design and expressive graphics. So why would you consider adding audio to the mix? How would audio help your organization or make your Web site even more appealing?

Audio allows you to present unique content to your viewers, and it is increasingly employed by all kinds of Web sites. Sound can make your site more dynamic and effective. Sound can reveal more about your organization’s character and mission. You can tape an interview with your executive director, record a press conference, present testimonials from satisfied clients, or tutorials for your staff. You might even think about adding something fun, like a musical selection visitors can download or stream.

This article introduces you to the basic concepts of digital audio, computer sound file formats, and compressed formats that are popular on the Web. We also include some resources outlining where you can find sound recording and editing programs and links to tutorials that will guide you through the process of creating audio for your Web site.

What Is Audio?

Audio is sound that falls within the acoustical range of your eardrums -- something you can hear. In your computer, sound is handled by a piece of hardware called a sound card. A sound card can receive input from your computer's microphone, or from external sources like a tape deck, radio, or CD player. On that card is an analog-to-digital converter (ADC) that translates the analog sound waves that you hear into digital numeric values or binary code (ones and zeroes). This is called encoding. The result is raw audio data that can be saved in various file formats, edited, manipulated, and played back. To play the sound, the card's digital-to-analog converter (DAC) translates the digital audio data back through the speakers into an analog waveform that you can hear.

What's In a Sound File?

Sound files contain large amounts of data, and uncompressed, they are huge. A sound file generally has both audio data -- the sound that you hear -- and metadata, which can include the name of the sound file, its size, duration, number of channels, resolution or sample size (in bits), sampling rate (in kilohertz), type of compression, information about licensing or streaming, special instructions, or other text or graphics.

That was an earful, so let's break it down. Like computer graphics, digital audio is created at different resolutions and bit depths. The higher the resolution, and the greater the bit depth, the better the sound quality, and the larger the file.

A channel is a stream of audio. A sound file with one channel is in mono; two channels (left and right) are stereo. Some newer file formats such as MPEG 4 allow many more channels to accommodate surround sound.

A digital recording of an analog sound wave cannot capture and reproduce the exact wave. Instead, it takes snapshots of the sound wave at a certain rate per second, which produces a digital approximation of the analog sound wave. The term "sample" refers to the number of snapshots of a sound wave taken per second. The more snapshots per second, the higher the sound fidelity -- the similarity between the original and the reproduced signal. Some standard sampling rates are 8, 11.025, 22.025, 44.10 (CD quality), and 48 kHz (DVD quality).

Sample resolution, measured in bits (bit depth), determines how accurately a range of sound can be reproduced in each sample. The more bits, the more accurate the sound will be. Sound samples usually contain 8, 16, or 24 bits per sample. An 8-bit recording is noisier (less accurate) than a 16-bit or 24-bit recording because the sound wave doesn't record as precisely. An 8-bit recording has a maximum of 256 recording values, a 16-bit recording has a maximum of 65,536 values, and a 24-bit recording has a maximum of 16,777,216 values -- much more precise. The higher bit depths are better for music, which generally has a large dynamic range -- the difference between the loudest and softest sounds. An 8-bit recording is fine for spoken word recordings.

In general, sound samples vary from 8-bit mono, 8-bit stereo, 16-bit mono, 16-bit stereo, to newer 24-bit stereo (found in high-definition audio like SACD and DVD-Audio). The higher the bit depth, the better the quality, and the larger the file. File size is important both for storing sound files in your computer and for downloading them from the Internet; large music files may fill up your hard drive when you store them and take too long for users to download.

When you combine different sample resolutions with sampling rates, you will hear variations in the quality and the file size of uncompressed sound. A general rule is to record at CD-quality bit depth and sampling rate (16 bit at 44.1 kHz), and then use the high-quality file as a basis for compression. However, if you are producing a voice recording, as opposed to a CD-quality song, you can save on file size by recording in mono rather than stereo. That automatically cuts your file size in half even before you apply compression.

This chart gives you an idea of the file sizes for various levels of uncompressed audio for a one-minute recording.

  44.1 kHz 22.050 kHz 11.025 kHz
16-bit stereo 10.01 MB 5.05 MB 2.52 MB
16-bit mono 5.05 MB 2.52 MB 1.26 MB
8-bit stereo 5.05 MB 2.52 MB 1.26 MB
8-bit mono 2.5 MB 1.26 MB 630 KB

Sound File Formats

A sound file is just like any other electronic file. A file is a portable electronic document created with a computer program. You can e-mail it, put it on a ZIP or floppy disk, burn it onto a CD-ROM or DVD, or you can place it in an HTML document for use on a Web site. Below are the major file formats used for audio files on the computer and on the Web.

Uncompressed sound is fine for your computer (if you have enough storage space or the file is on removable storage media such as a CD-ROM or an external hard drive), but if you want to place a sound file on your Web site, you must compress it. Compression means reducing the file size of a sound file without significant (or any) loss of information or quality.

Uncompressed File Formats

The following are the major uncompressed sound file formats native to their specific operating systems. This list does not represent every single format in existence, but covers some of the major ones that you are likely to encounter.

AIFF (Audio Interchange File Format):
A common audio file format used by the Apple computer operating system. Its file extension is .aiff or .aif. (It also has a compressed variation AIFC. The file extension is .aifc or .aic)
WAV (Waveform Audio file format):
The default format for digital audio on Windows PCs. It was developed by Microsoft and IBM and built into Windows 95. Its file extension is .wav.
AU (Audio file format):
The default sound format for Sun Microsystems. Its uncompressed version is called PCM or Pulse Code Modulation. Its compressed version is µ-law (pronounced mew-law), the International Telecommunication Union standard for compression of voice frequencies). µ-Law, as a term, is derived from the Greek letter µ. This format, generated by the Unix operating system, was dominant in the past. Today it is much less common, not only because Macs and PCs account for most operating systems, but also because their sound quality is much better. AU files have the file extension .au.
MIDI (Musical Instrument Digital Interface):

Compressed File Formats

As in computer graphics, audio files are compressed to allow big chunks of data to pass through the narrow Internet pipe quickly and easily. Compression calls for a pair of algorithms, a formula that both compresses and decompresses a sound file. That codec (which stands for COmpression/DECompression) allows the file to be compressed on the creator's end while allowing the listener to hear a decompressed-quality sound. There are two types of audio compression -- lossy, which throws out information, and lossless, which retains all information. Lossy audio compression discards frequencies on the high and low ends of the spectrum and removes unnecessary data with a technique called perceptual encoding. The listener generally does not perceive that information has been lost. Lossless compression squeezes sound data into smaller packets of information without discarding anything. It removes data temporarily, but replaces it later according to its decompression algorithm. It features better sound quality, but less compression, and results in larger files.

You may come across the term "bit rate" to describe the amount of compression applied to audio files. Many music files you'll find on the Internet are encoded at 128-160 kbps (256 Kbps is generally regarded as CD-quality). This measurement refers to the amount of data that the file transfers per second; the higher the number, the more information and the better the quality -- and the larger the file.

Streaming

We refer to streaming audio and video when discussing compressed audio technologies because many compression technologies also facilitate streaming from the Internet. Streaming takes the file you recorded and plays it while it is downloading. That means you don't have to wait for the entire file to download before you can hear it.

Streaming works by compressing the audio file and then breaking up the data into small packets, which then are sent through the Internet. When the packets reach the listener's computer, they are stored in a buffer for several seconds before beginning to play. As additional packets of data move through the Internet, they are queued up to play behind the ones already delivered, thus creating a smooth sound. Streaming can let you download a file to your hard drive, but some streaming technologies only facilitate listening to a file as it plays and not downloading the physical file.

Streaming audio can be difficult to listen to on low-bandwidth dial-up such as 56K and slower connections to the Internet. Compressed files can be subject to intrusive network traffic and buffering that interrupt and mar the sound. Streaming protocols such as the User Datagram Protocol (UDP), RealTime Streaming Protocol (RTSP), and RTP (Real Time Transfer Protocol used with Apple's QuickTime) have made streaming more efficient and continuous, providing a better experience for the listener at lower data transfer rates.

MPEG Layers 1,2,3

MPEG, short for Motion Picture Experts Group, is a compression technology standard originally developed by the film industry for audio and video so that broadcast quality signals could be distributed by CD-ROM, over networks, and the Internet. MPEG audio refers to a family of open standards for compressed audio that includes MPEG 1, MPEG 2, MPEG 1 Layer 3 (MP3), and MPEG 4.

MPEG is a lossy compression scheme based on a psychoacoustic analysis of human hearing. MPEG engineers analyzed what the ear and brain actually perceive when listening to a range of frequencies and determined which information could be removed before compression in order to shrink the file size. Compression is applied after a substantial amount of information is cut. MPEG has several variations, or layers, based on the complexity of the compression formula. The higher the layer, the better the compression ratio, and the smaller the file.

MPEG 1 is the least complex format and compresses files at a 1:4 ratio. It is the standard for video and CD-ROM. MPEG 2 is associated with DVD and digital TV technologies and compresses files at a 1:6 to 1:8 ratio. MPEG 1 Layer 3, better known as MP3, jump-started the Internet music craze of the late 1990s, and compresses at a ratio of 1:10 to 1:12. MP3 compression is designed to maintain CD-quality sound. Learn more .

MPEG 4 Audio: AAC

A newer MPEG standard, MPEG 4, was finalized in 1999. MPEG 4, which delivers high-quality audio and video over the Internet and networks, as well as cell phones, set top boxes, wireless devices, game consoles, and TV, is designed as an "author once, play anywhere" model. The new standard can capture, author, edit, encode, distribute, play back, and archive. It is based on Apple's QuickTime audio/video format.

Advanced Audio Coding (AAC) was developed by the MPEG group to take advantage of advances in perceptual audio coding and compression. These improvements feature high quality sound at lower data transfer rates and smaller file sizes. This format, which forms the core technology of MPEG 4, supports up to 48 full frequency channels (for surround sound) and up to 96 kHz sampling rate. AAC is said to provide more efficient compression than MP3 while delivering audio quality comparable to uncompressed CD. Its file extension is .mp4.

For more information about MPEG 4, see the MPEG 4 Industry Forum .

Other Sound Formats

Real Audio:
A proprietary streaming compression standard designed for Real Audio players. If you encode a sound file with Real Audio, the listener must have a Real Audio player on which to listen to it. The Real Audio player also supports the MP3 format. Its file extension is .ra or ram. See Real.com for more information and to download a free cross-platform player.
Windows Media Audio:
This proprietary format from Microsoft has both Windows and Macintosh versions. Its file extension is .wma. Visit the Microsoft's Windows Media page for more information and the Windows Media Download Center for a free cross-platform player.
QuickTime:
A multimedia format that supports streaming audio and video. It supports MP3, CD playback, and Flash, and forms the basis of MPEG 4. Its extension is .qt or .mov. Visit Apple's QuickTime site for more information and to download a free cross-platform player.
Ogg Vorbis:
An audio compression format for the Linux operating system developed by the Xiph.org. It is free, Open Source, and unpatented. Ogg is the name of the format and Vorbis is the name of the compression scheme. Vorbis is designed for compressing music and general audio. Its file extension is .ogg. For more information see Vorbis.com .
FLAC (Free Lossless Audio Codec):
This lossless compression format is also part of Xiph.org. It is billed as similar in sound quality to MP3, except that it does not discard information. FLAC is free and can play on most operating systems. For more information visit the FLAC project Web site. Its file extension is .flac.
SHN:
A lossless compression scheme, SHN (Shorten) offers 2:1 compression. It has gained popularity among people who record concerts and share them on the Internet. For more information see etree.og’s explanation . Its file extension is .shn.

What to Do

Now that you know the basics of how sound files are created and stored both in your computer and online, you have enough information to determine how you want to present audio on your Web site.

There are a huge number of sound recording and compression programs you can use, as well as tutorials on the Web that get you started in creating, compressing, and posting sound files to your Web site. We do not recommend any particular program, but encourage you to decide what kind of sound file you want to produce, what operating system you are working on, and then try out some of the following sound programs to see which one is right for you.

Sound Recorders and Editors

  • GoldWave Digital Audio Editor (Windows)
    GoldWave
    $40 (free demo version)
    This audio editing program lets you play, edit, mix, and analyze audio as well as apply special effects. Use it to digitally re-master and restore old recordings with noise reduction and pop/click filters, or record audio from cassettes, vinyl records, and radio. Record dictation through a microphone or play dictation back at a slower speed for transcription. Save to various formats such as WAV, MP3, OGG, AIFF, AU, and even raw binary data.
  • GarageBand (Mac)
    Apple Computer
    $79
    Apple’s easy-to-use audio capture and editing software is part of its iLife suite. You can capture sound from a mic or instruments, or you can use the sound loops to create music without playing a chord. The visual editing interface lets you cut, copy, and paste sections of the digital audio.
  • Adobe Audition (Windows)
    Adobe
    $249 (pro)
    Use Audition to record music, voice, or other audio. Edit your sound, mix it with other audio or musical parts, add effects, and master selections for burning to CD, posting on your Web site, or e-mail. Convert files from one format to another. Formerly Cool Edit from Syntrillium Software, the software was purchased by Adobe in 2003.
  • Sound Forge Audio Studio (Windows)
    Sony
    $70
    Sound Forge Audio Studio is a sound recorder that gives you editing tools, audio effects, support for multiple file formats, and a free sound effects library. It includes editing tools such as cut, paste, move, delete, mute, reverse, crossfade, trim, normalize, fade, pan, resample, enhance, insert silence, and more. It supports many popular audio and Web formats, including WAV, Windows Media Audio and Video, QuickTime, RealAudio, and MP3. Use it to create streaming media for the Web.
  • Audacity (Windows/Mac/Linux)
    Source Forge
    Free
    This audio editor lets you record, play, import, and export in WAV, AIFF, MP3, and OGG. You can also use the program to edit sound files. It comes with a number of built-in effects such as bass boost, noise removal, and supports plug-in effects. The program was developed by volunteers using the Open Source model.
  • Peak Pro/ Peak LE (Mac)
    Bias
    $599/$99
    Use Peak Pro or Peak LE to record and edit audio. The program reads and writes multiple file formats including MP3 and AAC. It features DSP (Digital Signal Processing) tools such as fade in/out, normalize, gain envelope, reverse, invert, change sample rate, mix, change pitch, and more. The LE version contains fewer DSP tools and features, but it gives you the basics to record and edit sound files.
  • Toast with Jam (Mac)
    Roxio
    $200
    Toast with Jam is a CD and DVD burning utility that comes bundled with Bias Peak Express sound editing software. Use the package to adjust tone, enhance vocals with concert reverb, soften dynamic peaks, and create other special effects. Create DJ-quality cross-fades between tracks, automatically normalize tracks, and manipulate your sound file. It supports AIFF, WAV, MP3 and other formats. When you are finished creating your master CD, send the project to Toast to burn in the background while you use your computer for other tasks.
  • Sound Studio (Mac)
    Felt Tip Software
    $50
    Sound Studio is an audio recording and editing application that lets you digitize vinyl and tapes, record live audio, edit new and pre-existing digital audio files, and save your audio in AIFF, WAV, or Sound Designer II formats to be used in other audio programs. Use it to create your own mixes with crossfades, apply digital effects, and more. It supports AIFF, WAV, MP3, ACC, and more.
  • GramoFile (Linux)
    Debian
    Free
    This Open Source program lets you record audio from analog sources in the WAV format. Several filters that come with the program let you refine the ticks and scratches of vinyl and gramophone records and apply other special effects. Use it to split long sound files into separate tracks and to make CDs. The newest version is located at http://packages.debian.org/stable/sound/gramofile.html.
  • Cdex (Linux)
    Source Forge
    Free
    This Open Source sound recording and editing program supports a large number of file formats such as WAV, MP3, OGG, and others. Use it to create playlists, normalize, and record from analog sources. It also extracts digital audio data from CDs.
  • Shareware Music Machine is an excellent resource for low-cost shareware audio programs.
  • The MP3 Converter is a utility that converts audio files across formats including WAV, MP3, and OGG.

Media Players

The following are software media players that you and your Web site visitors can use to hear streaming Internet audio or downloaded sound. These are in addition to the QuickTime, Real Audio, and Windows Media Players mentioned above. Most players have a free version and some offer an enhanced paid version.

  • Musicmatch Jukebox (Windows)
    Musicmatch
    The basic (free) version of this software lets you listen to audio CDs, MP3s, and Internet streams. A built-in recorder lets you convert CDs into MP3, WAV, or Windows Media files. Use it to burn CD or data files and to keep track of your music collection.
  • iTunes (Mac/Windows)
    Apple
    Thanks to its famous music store, iTunes is now synonymous with digital music playback for many users. It started life as a Mac digital audio utility that could convert AIFFs to MP3 format. It does that and more now as a cross-platform application, and it added support for the ACC Apple Lossless formats.
  • WinAmp (Windows)
    Nullsoft
    Free
    This player sits on your desktop with controls such as play, pause, stop, forward song, previous song, and select new file. It gives you track information, author, title, bit rate, sample rate, and time. Additional controls include position slider, volume, shuffle, repeat, and crossfade. You have instant access to the equalizer, media library, and playlist editor.
  • RealPlayer (Mac/Windows)
    Real Networks
    Free
    Real’s free jukebox aims to be a jack-of-all-trades. It plays streaming video and DVD video as well as digital music formats such as MP3, AAC, and RealAudio. You can encode to MP3 or RealAudio formats and burns CDs, too.
  • If you are working in Mac OS X, this page gives you a list of applications for every audio need: http://www.apple.com/downloads/macosx/audio/

Tutorials

Some tutorials on how to create Web-based sound files are located at the following links: