Frequency Masking Simulator
Play with a masker and a probe tone and see the psychoacoustic masking math: the asymmetric spreading function, the Bark / critical-band boundaries, the absolute threshold of hearing, and the pre/post temporal masking curves. Then press Play and hear whether your ear agrees with the model.
Masker (green)
Probe (red when masked)
Verdict
Listen
Temporal: masker + probe
Output volume
Frequency Masking in Five Minutes
Masking is the perceptual phenomenon where a louder sound makes a softer one inaudible. It's not a quirk — it's the foundation of every lossy audio codec (MP3, AAC, Opus, every voice codec). The encoder analyses the audio for what the listener would not be able to hear behind louder content, and discards exactly that. Without masking there would be no streaming music as we know it.
Two flavours
Simultaneous masking (the top plot) is when a masker tone hides probe tones playing at the same time. The shape of what's hidden is described by the spreading function: a curve that radiates outward from the masker's frequency with characteristic asymmetric slopes.
Temporal masking (the bottom plot) is when a loud sound hides quieter sounds before and after it in time. Pre-masking is short (~20 ms) — your brain hasn't finished processing the sudden quiet thing before the loud one slams in and steals the attention. Post-masking is longer (100–200 ms) — the cochlea's response to the masker is still ringing down.
The upward spread of masking
Look at the yellow threshold curve on the top plot. The slope above the masker is much gentler than the slope below it (about 17 dB/Bark up vs 27 dB/Bark down). That asymmetry is real and biological: a high-amplitude tone "spreads" upward along the basilar membrane farther than it spreads downward, so it hides higher frequencies more effectively than it hides lower ones. This is why a loud bass note can mask a midrange vocal line, but a loud whistle doesn't hide the bass.
The Bark scale
The pink dotted lines mark critical band boundaries on the Bark scale — 24 perceptual frequency bands roughly proportional to where the cochlea's hair cells are spaced. Tones within the same critical band interact strongly; tones in different bands are processed semi-independently. Most masking calculations work in Bark space because that's what the ear cares about, not linear Hz.
Why does the probe look "above" the threshold but I still can't hear it?
The model is an approximation. The exact threshold depends on individual hearing, the test environment, masker bandwidth (tones vs noise vs music are different), and time integration. The plot shows the textbook tone-on-tone spreading function with a ~15 dB tone-masking-tone offset. Real audibility margins of ±5–8 dB are normal. Where the model is most reliable: when the probe is many dB above or below the threshold curve, you're confidently audible or confidently masked.
How is this used in codecs?
An MP3/AAC/Opus encoder runs an FFT on each frame, computes a per-band masking threshold from the louder content using essentially the same spreading function shown here, then quantises each band only as finely as needed to keep the noise below that threshold. The compression ratio comes from spending fewer bits on frequencies where the listener wouldn't hear the noise anyway.