Continuous Media: Audio
Sound Waves
Sound is produced by vibrations in a medium, usually air. Sound travels when the disturbance at the source is transmitted to neighboring molecules and propogated in the form of a wave.

Notice that it's the disturbance that moves, not the actual particles.
For more information, see Dan Russell's description of waves.
Waveforms
The resulting pattern of oscillating pressure is called a waveform. It can be represented by a graph where the vertical axis represents displacement or amplitude (i.e. strength of the wave) and the horizontal axis represents distance or time.
- Wavelength is the distance between analagous points on the graph, representing a full cycle.
- Waves can also be measured by the time it takes to complete a cycle, or its period.
- Frequency represents the number of cycles per second.

And so, a sound is characterized by frequency, amplitude, and duration:
- Frequency (wavelength)
- Measured in hertz (Hz) or cycles per second
- Humans can hear 20 Hz - 20 kHz
- Frequencies below human hearing range are infrasonic
- Frequencies above human hearing range are ultrasonic
- Frequency is perceived as pitch
- Amplitude
- Measures displacement of air pressure wave from its mean
- Measured in decibels: dB = 20 log10(A/B)
- Amplitude vs. loudness
- Duration is the length of time the sound lasts
For more information, see Dan Russell's description of wave motion in time and space
Sounds
Sounds can rarely be represented by a single sine wave. Instead, they are often combinations of waves. Combinations of waves are additive.

Musical sounds are periodic or repeating. Noise is aperiodic.

Timbre is the quality that gives a periodic waveform its unique sound, e.g. a trumpet vs. a clarinet

For more information, see Dan Russell's description of superposition of waves. and Doug Davis' characteristics of sound.
Analog Sound Recordings
Analog signals are continuous and analogous to the original physical phenomenon.
- Microphones generate an electrical current that is corollary to the original sound
- Tape recordings are represented by variations in magnetization of the tape
- Analog sounds are played back by a speaker, which has a diaphragm that vibrates according to the analog signal
Digital Sound Recordings
Digital signals are measurements taken at discrete time/space intervals.

- Sampling rate
- Measured in hertz (Hz) or samples per second
- Nyquist rate = 2x the maximum frequency
- Aliasing results from too low sampling rate
- Quantization
- Bit depth = number of bits used to represent each sample
- Quantization error caused by lack of precision
- Conversions
- Analog to Digital Converter (ADC) samples analog signal, filters components
above the Nyquist frequency
- Digital to Analog Converter (DAC) produces signals from numbers, may oversample
for better sound
- Examples
- Voice-quality audio is recorded at 8 kHz, 8 bits per sample
- CD-quality audio is recorded at 44.1 kHz, with 16-bit linear Pulse Code
Moduloation (PCM) encoded value
For more information about sampling and quantization, see the fine art of analog signal sampling.
Digital Audio Formats
- Sampled Sound Files
- Size of (monaural) digital audio = sample rate * sample time * bit depth
- AIFF and WAV are uncompressed
- MP3 is lossy, using psychoacoustic models to identify "less-important" frequencies
- Synthesized Sound
- MIDI = musical instrument digital interface, composed of messages
For more information about lossy and lossless audio formats, see this.
Also see ...