Auditory Masking Simulator: Critical Bands & Perceptual Coding

simulator intermediate ~10 min
Loading simulation...
Masked threshold = 52 dB at 1200 Hz by 1000 Hz masker at 70 dB

A 70 dB masker at 1000 Hz raises the hearing threshold at 1200 Hz to about 52 dB — any probe below this level is completely inaudible, demonstrating simultaneous frequency masking.

Formula

CB(f) = 25 + 75 × [1 + 1.4·(f/1000)²]^0.69 (critical bandwidth)
z = 13·arctan(0.00076·f) + 3.5·arctan((f/7500)²) (Bark scale)

When Sounds Disappear

Auditory masking is the phenomenon where one sound renders another inaudible — not by physically canceling it, but by overwhelming the neural response in the cochlea. When you cannot hear your phone ring in a noisy restaurant, that is masking at work. The effect is frequency-dependent: a 1 kHz tone at 70 dB can completely hide a 1.2 kHz tone at 50 dB, even though 50 dB is well above the absolute threshold of hearing.

The Masking Pattern

A single pure tone produces a characteristic masking pattern: the threshold elevation is greatest near the masker frequency and falls off on both sides, but asymmetrically. The upward spread (toward higher frequencies) is broader than the downward spread, and both slopes become shallower at higher masker levels. This pattern mirrors the excitation pattern on the basilar membrane.

Critical Bands: The Ear's Frequency Resolution

The cochlea decomposes sound into approximately 24 overlapping frequency bands (critical bands or Bark bands). Within a single critical band, energy is summed before masking is computed. Two tones within the same critical band interact strongly; tones in separate bands are largely independent. This frequency resolution — about 1/3 octave at mid frequencies — sets the fundamental limit on spectral detail the ear can resolve.

Perceptual Audio Coding

The entire MP3 revolution rests on masking. By computing which spectral components are masked and therefore inaudible, perceptual codecs allocate bits only to audible components. A 1411 kbps CD signal can be compressed to 128 kbps with near-transparent quality because roughly 90% of the spectral detail is perceptually irrelevant. This simulation lets you explore the masking patterns that make modern audio streaming possible.

FAQ

What is auditory masking?

Auditory masking occurs when the presence of one sound (the masker) makes another sound (the probe) inaudible or harder to hear. Simultaneous masking happens when both sounds occur at the same time; temporal masking occurs before (backward) or after (forward) the masker. This is a fundamental property of the cochlea's frequency analysis.

What are critical bands?

Critical bands are the frequency resolution bands of the auditory system, determined by the mechanical filtering of the basilar membrane. Each critical band is about 1 Bark (roughly 100 Hz wide below 500 Hz, and proportionally wider above). Sounds within the same critical band interact strongly; those in different bands are processed relatively independently.

How does masking relate to audio compression?

MP3, AAC, and Opus codecs use psychoacoustic masking models to identify frequency components that are inaudible due to masking. These masked components can be removed or quantized coarsely without audible quality loss, achieving 10:1 or better compression ratios. The masking model is the core innovation in perceptual audio coding.

Why is masking asymmetric?

Upward spread of masking (a low frequency masking a higher one) is stronger than downward masking because the basilar membrane's traveling wave moves from base to apex. A low-frequency excitation pattern extends broadly toward the apex, overlapping with higher-frequency regions. The reverse is not as effective.

Sources

Embed

<iframe src="https://homo-deus.com/lab/psychoacoustics/masking-effect/embed" width="100%" height="400" frameborder="0"></iframe>
View source on GitHub