Fundamental of Sound and Audio Signal
Open in the Padhaiko app1.1 Physical acoustic: Wave propagation, frequency, amplitude, phase
Sound originates as a mechanical disturbance that travels through an elastic medium (air, water, or solids) as a longitudinal pressure wave. Unlike transverse waves on a string, particles in air oscillate back and forth parallel to the direction of wave propagation, creating alternating regions of high pressure (compressions) and low pressure (rarefactions) relative to ambient atmospheric pressure.
Sinusoidal Acoustic Wave and Wave Speed
A pure-tone acoustic pressure variation at time and position is modeled by a harmonic traveling wave:
where:
- is the peak pressure amplitude (),
- is the frequency (), with period and angular frequency ,
- is the wavelength (), with wavenumber ,
- is the initial phase ( or degrees),
- is the speed of sound, related to frequency and wavelength by the fundamental wave relation:
In dry air at , the speed of sound is (increasing by roughly per rise, approximated by ).
Core Physical Parameters of Sound
- Wave Propagation: Sound requires a material medium; it cannot propagate in a vacuum. As an acoustic wave expands from a point source in free space, its wavefronts spread spherically and its energy distributes over an area , causing pressure amplitude to decay as and intensity as (inverse square law). Propagation is further affected by reflection, absorption, refraction (temperature/wind gradients), and diffraction around obstacles comparable in size to .
- Frequency (): The number of complete pressure cycles per second (). The nominal human audible range spans to . Frequencies below are infrasound, and those above are ultrasound.
- Amplitude () and Sound Pressure Level (SPL): Amplitude measures the maximum pressure deviation from equilibrium. Because human hearing spans over six orders of magnitude in pressure, amplitude is expressed logarithmically in decibels () relative to the threshold of hearing :
For a pure sinusoid of peak amplitude , the root-mean-square pressure is .
- Phase (): Phase specifies the instantaneous position within a periodic cycle ( to or to ). A pure time delay corresponds to a frequency-dependent phase shift:
- Constructive interference occurs when two coherent waves arrive in phase (), reinforcing amplitude ().
- Destructive interference occurs when waves arrive () out of phase (), canceling each other (). Combining a signal with a slightly delayed copy creates periodic notches across frequencies known as comb filtering.
1.2 Psycho acoustic: Pitch, loudness, timbre, dynamics and intensity
Psychoacoustics studies how the human auditory system (outer ear, middle ear ossicles, cochlea/basilar membrane, and auditory cortex) translates physical sound waves into subjective sensations. The mapping between physical parameters and perceptual attributes is strongly non-linear and coupled.
| Attribute | Physical Parameter | Perceptual Correlate | Key Relationship / Scale |
|---|---|---|---|
| Spectral Rate | Fundamental frequency ( in Hz) | Pitch | Logarithmic; doubling raises pitch by one octave (Mel / Bark scales) |
| Energy / Pressure | Sound pressure () and Intensity () | Loudness | Frequency-dependent; measured in phons and sones (Fletcher–Munson contours) |
| Waveform / Spectrum | Harmonic amplitudes, spectral envelope, transients | Timbre | Distinguishes instruments at identical pitch and loudness |
| Level Range | Peak-to-noise or max-to-min intensity ratio | Dynamics | Expressed in dB; e.g. human auditory dynamic range |
Key Psychoacoustic Attributes
- Pitch: The perceived highness or lowness of a tone on a musical scale. Pitch correlates primarily with the fundamental frequency () of a periodic wave, though loudness causes minor pitch shifts at extreme levels. Human pitch perception is roughly logarithmic: equal ratios of frequency correspond to equal musical intervals (e.g., is an octave, is a perfect fifth). Remarkably, when is removed from a harmonic complex (e.g., over a small telephone speaker), the brain infers from the spacing of higher harmonics—a phenomenon called the missing fundamental (virtual pitch).
- Loudness: The subjective perception of sound strength. It depends not only on Sound Pressure Level () but heavily on frequency, as mapped by Fletcher–Munson equal-loudness contours:
- The ear is most sensitive between and (resonance of the ear canal) and much less sensitive at very low () and very high () frequencies.
- Phon: A logarithmic loudness-level unit equal to the of a reference tone judged equally loud.
- Sone: A linear perceptual loudness scale where ; doubling the sones doubles perceived loudness (roughly / at mid frequencies).
- A-weighting (): Filters SPL measurements to approximate the -phon ear sensitivity curve.
- Timbre (Tone Color): The quality that distinguishes a flute from a violin or clarinet playing the exact same note at the same loudness. Timbre arises from:
- Harmonic spectrum and spectral envelope (relative strengths of overtones and formants),
- Temporal envelope (ADSR: Attack, Decay, Sustain, Release—a plucked string has a sharp attack and fast decay, whereas a bowed violin has a gradual attack),
- Micro-variations (vibrato, tremolo, onset noise/breath transients, and inharmonic partials).
- Intensity and Dynamics:
- Sound Intensity (): Acoustic power passing perpendicularly through a unit area ():
where is the characteristic acoustic impedance of air at . Relative to the threshold intensity , the Sound Intensity Level is:
- Dynamics (Dynamic Range): The ratio between the loudest undistorted signal and the quietest audible signal (noise floor), measured in . A symphony orchestra has a dynamic range of , whereas modern pop mastering often compresses dynamic range below .
1.3 Fundamental of digital audio
Digital audio represents a continuous-time, continuous-amplitude analog voltage as a discrete sequence of finite-precision binary numbers using Pulse Code Modulation (PCM).
ADC Pipeline: Sampling, Quantization, and Encoding
Converting an analog audio signal into PCM digital audio proceeds through four stages:
- Anti-Aliasing Filter: An analog low-pass filter removes frequency components above before sampling so they cannot fold back into the audible band.
- Sampling (Time Discretization): Captures instantaneous signal values at uniform intervals , yielding , where is the sampling rate ().
- Quantization (Amplitude Discretization): Maps each continuous sample value to the nearest of discrete levels for a bit depth of bits.
- Encoding: Represents each quantized level as a -bit binary word (typically signed two's-complement integers or IEEE 754 floats).
Nyquist–Shannon Sampling Theorem and Aliasing
Nyquist–Shannon Sampling Theorem
A band-limited continuous-time signal containing no frequency components at or above can be exactly reconstructed from its uniform samples if and only if the sampling rate satisfies:
The minimum rate is the Nyquist rate, and is the Nyquist frequency (the highest frequency unambiguously representable at sampling rate ).
When a signal contains a frequency , sampling causes aliasing: the high frequency impersonates a lower frequency inside given by the folding formula:
Quantization Noise, SQNR, and Dithering
For a uniform -bit quantizer over a full-scale peak-to-peak range , the quantization step size is . Modeling the rounding error as independent white noise uniformly distributed on yields quantization noise power:
For a full-scale sine wave of peak amplitude (signal power ), the Signal-to-Quantization-Noise Ratio (SQNR) is:
Each additional bit adds approximately of dynamic range.
1.4 Audio file format: WAV, AIFF, FLAC, ALAC, MP3
Digital audio files fall into three families based on compression strategy: uncompressed PCM, lossless compressed, and lossy perceptually compressed.
| Format | Compression | Codec / Container Details | Typical Bitrate / Size (CD Stereo) | Primary Use Case |
|---|---|---|---|---|
| WAV | Uncompressed | RIFF chunked container; little-endian linear PCM (Microsoft/IBM) | () | Studio editing, Windows mastering, archival masters |
| AIFF | Uncompressed | IFF chunked container; big-endian linear PCM (Apple) | () | macOS/Logic Pro workflows, broadcast production |
| FLAC | Lossless | Linear prediction + Rice coding; open-source; MD5 checksum | ( reduction) | Hi-res distribution, lossless archiving, streaming |
| ALAC | Lossless | Linear prediction + adaptive Golomb-Rice in MP4/M4A container (Apple) | ( reduction) | Apple Music lossless, iOS/macOS ecosystem |
| MP3 | Lossy | MPEG-1/2 Layer III; hybrid polyphase + MDCT + psychoacoustic masking + Huffman | ( reduction) | Portable playback, web audio, legacy compatibility |
How Each Format Works
- WAV (Waveform Audio File Format): Uses the Resource Interchange File Format (RIFF) with a -byte header (
RIFF,fmtchunk specifying , channels, and bit depth, anddatachunk) storing raw little-endian PCM samples. Standard WAV uses -bit chunk sizes, capping files at (RF64 extends this). - AIFF (Audio Interchange File Format): Structurally similar to WAV but based on Electronic Arts' IFF standard and stores PCM samples in big-endian byte order. Supports uncompressed PCM (and
AIFCfor compressed variants). - FLAC (Free Lossless Audio Codec): Splits audio into frames, removes inter-channel correlation (mid/side stereo), fits a linear predictive coding (LPC) polynomial to predict samples from past values, and encodes the small prediction residual using Rice (Golomb-Rice) entropy coding. Decoding restores the bit-for-bit identical PCM waveform.
- ALAC (Apple Lossless Audio Codec): Employs the same mathematical principle as FLAC (frame blocking, stereo decorrelation, linear prediction, adaptive Golomb-Rice residual coding) wrapped inside
.m4a(ISO Base Media / MP4) containers, natively supported across Apple devices. - MP3 (MPEG-1 Audio Layer III): Achieves to compression by discarding audio components deemed inaudible by a psychoacoustic model:
- Frequency (Simultaneous) Masking: A loud tone raises the hearing threshold in neighboring critical bands, masking quieter nearby frequencies.
- Temporal Masking: Loud transients mask softer sounds shortly before (pre-masking, ) and after (post-masking, ) the event.
- Encoding Pipeline: Splits the signal into sub-bands via a polyphase filterbank followed by MDCT (Modified Discrete Cosine Transform) for finer frequency resolution, quantizes spectral coefficients using noise-shaping loops guided by the masking threshold, and packs the quantized values with Huffman coding.
1.5 Practical audio quality: Sample rates (44.1khz, 48khz, 96khz) and bit depths
Selecting sampling rate and bit depth balances fidelity, anti-aliasing filter headroom, DSP stability, and storage/bandwidth cost.
| Setting | Nyquist / Dynamic Range | Why This Standard Exists |
|---|---|---|
| Red Book CD standard; gives a guard band () for practical analog anti-aliasing filters and fits NTSC/PAL video frame rates of early PCM tape adapters | ||
| Standard for film, TV, broadcast, DVD, and studio interfaces; divides cleanly by common video frame rates ( → exact integer samples per frame) | ||
| High-resolution recording/mastering; relaxes anti-aliasing filter slope (less phase shift in audible band), lowers round-trip ADC/DAC latency, and prevents aliasing in non-linear DSP (saturation/distortion) | ||
| Final consumer delivery (CD); exceeds practical room listening dynamic range when paired with noise-shaped dither | ||
| Recording & mixing standard; provides generous headroom ( nominal level) above the analog microphone/preamp noise floor | ||
| total (-bit mantissa + -bit exponent) | Internal DAW signal path & field recorders; virtually eliminates internal digital clipping even if intermediate tracks exceed |
Worked Examples
1.1
A pure tone propagates through air at (, ) with an RMS sound pressure of at a distance of from a point source. Calculate:
- The wavelength and period of the wave.
- The Sound Pressure Level () using .
- The acoustic intensity () and Sound Intensity Level ().
- The new if the listener moves to from the source in a free field.
Wavelength and period: Using and with :
Sound Pressure Level ():
Acoustic intensity () and intensity level ():
Effect of doubling distance ():
- ,
- ,
- At ,
1.2
A digital audio interface samples a stereo signal at with -bit linear PCM.
- What is the Nyquist frequency, and what is the theoretical maximum of a full-scale sine wave?
- If an un-filtered tone accidentally enters an ADC running at , at what aliased frequency will it appear?
- Calculate the uncompressed file size (in , where ) of a -minute () stereo recording at .
Nyquist frequency and theoretical SQNR at :
Aliased frequency for at :
Uncompressed stereo file size (, ):
- ,
- Uncompressed size ()
1.3
Compare the storage efficiency of WAV, FLAC (achieving of original WAV size), and MP3 ( CBR) for a -minute () stereo music track in standard CD format (, -bit).
WAV bit rate and size (decimal ):
FLAC size (lossless, of WAV):
(Average bitrate , with exact bit-for-bit PCM recovery.)
MP3 size ( CBR, lossy) and compression ratio:
For the -minute CD-quality stereo track: WAV requires (), FLAC requires (lossless, ), and MP3 requires (lossy, ).
Exercises
Practice Exercises — Fundamentals of Sound & Digital Audio
Distinguish between physical acoustics and psychoacoustics, explaining how frequency, intensity, and harmonic spectrum map to pitch, loudness, and timbre. Briefly explain the missing fundamental phenomenon.
Physical acoustics vs. psychoacoustics:
- Physical acoustics treats sound objectively as mechanical pressure waves propagating through an elastic medium, characterized by measurable quantities: frequency (), sound pressure (), intensity (), wavelength , and phase .
- Psychoacoustics studies the subjective human auditory perception generated by the ear and brain in response to those physical waves.
Mapping physical quantities to perceptual correlates:
- Frequency Pitch: Pitch rises logarithmically with fundamental frequency (a frequency ratio corresponds to one octave).
- Intensity / Pressure Loudness: Loudness increases non-linearly with intensity/SPL and depends strongly on frequency, as shown by Fletcher–Munson equal-loudness contours (maximum sensitivity around ).
- Harmonic Spectrum & Envelope Timbre: Timbre (tone quality) is shaped by the relative amplitudes of harmonics, spectral envelope, and temporal ADSR attack/decay transients, allowing listeners to distinguish instruments playing the same pitch and loudness.
Missing fundamental (virtual pitch): When a harmonic complex has components at without physical energy at , the auditory system detects the common harmonic spacing and the periodicity of the waveform envelope on the basilar membrane, perceiving pitch at .
Physical acoustics measures objective wave properties (, , , ), whereas psychoacoustics describes subjective perception (pitch from , loudness from weighted by ear sensitivity curves, and timbre from spectral harmonics and ADSR envelope). The missing fundamental occurs when the brain perceives pitch from the uniform spacing of higher harmonics even when itself is absent.
Two coherent sound waves of frequency travel in air () from two loudspeakers to a listener.
- Find the wavelength and period .
- What minimum path difference causes complete destructive interference ( phase difference) at the listener?
Wavelength and period:
Minimum path difference for destructive interference: A phase difference of () corresponds to a path difference of half a wavelength:
- , .
- Minimum path difference for destructive interference is ().
Solve the following acoustic and digital audio problems:
- A loudspeaker produces an RMS sound pressure of . Find its Sound Pressure Level in ().
- Calculate the theoretical maximum of a -bit uniform PCM system for a full-scale sine wave.
- A ultrasonic component is sampled at without an anti-aliasing filter. Find the aliased frequency.
Sound Pressure Level:
Theoretical SQNR for bits:
Aliased frequency: Since , folding around with gives:
Compare WAV, FLAC, ALAC, and MP3 in terms of compression type, underlying encoding principle, and audio quality. Explain why MP3 relies on psychoacoustic masking while FLAC/ALAC do not.
Format classification and encoding principles:
- WAV: Uncompressed linear PCM inside a RIFF container (little-endian). Stores exact raw samples without compression.
- FLAC / ALAC: Lossless compressed formats. Both predict each sample using Linear Predictive Coding (LPC) and encode the small prediction residual using Golomb-Rice entropy coding, guaranteeing bit-exact reconstruction of the original PCM stream.
- MP3: Lossy compressed format using a polyphase filterbank + MDCT, psychoacoustic masking, non-uniform quantization, and Huffman coding.
Role of psychoacoustic masking: MP3 discards spectral components that fall below the human masking threshold (simultaneous frequency masking and pre/post temporal masking), trading irreversible waveform changes for smaller files. FLAC and ALAC cannot discard any information because they must reconstruct every sample bit-for-bit identically, so they rely purely on statistical redundancy removal.
WAV stores uncompressed PCM; FLAC and ALAC compress losslessly ( size reduction) via linear prediction and Rice residual coding with exact recovery; MP3 compresses lossily ( reduction) by using MDCT and a psychoacoustic masking model to discard perceptually masked spectral energy.
A studio records minute () of uncompressed stereo audio at PCM.
- Compute its bit rate in and file size in decimal ().
- Compare this size against minute of CD-quality () stereo audio, and state two practical engineering advantages of recording at despite the larger file size.
Bit rate and size at stereo:
Comparison with stereo:
Practical advantages of in production:
- -bit depth yields dynamic range, giving engineers ample recording headroom without raising quantization noise into the audible signal.
- sampling widens the anti-aliasing transition band () for gentler, lower-phase-distortion filters and prevents high-order harmonics generated by non-linear plugins (distortion, saturation, compression) from aliasing back into .
- Bit rate ; -minute size .
- It is larger than CD audio (), but provides wide -bit headroom and reduces aliasing/filter phase distortion during non-linear studio processing.