What a game wall does to sound, measured in Web Audio
Earshot's thin wall is set to -6 dB, yet white noise through it came out 14.4 dB quieter, and its treble 23.7 dB quieter. A low-pass filter removes energy as well as brightness, so the gain setting understates how much a wall takes away. We rendered each of Earshot's default materials offline to get these numbers. They're white noise figures, so speech will differ.
| Path, 1 tile from the listener | Filter and gain setting | Loss overall | Treble loss |
|---|---|---|---|
| Clear | None | 0 dB | 0 dB |
| Thin wall | 2000 Hz, -6 dB | 14.4 dB | 23.7 dB |
| Solid wall | 1200 Hz, -12 dB | 22.5 dB | 38.5 dB |
| Thin and solid wall | 700 Hz, -18 dB | 30.9 dB | 54.0 dB |
Why the gain setting isn't the loss
The gain applies equally to every frequency. The low-pass filter applies on top and removes more the higher you go. White noise has equal energy per hertz, so most of its energy sits above 2 kHz, and a filter at 2000 Hz takes a lot of it away. That accounts for the 8.4 dB between the thin wall's setting and its overall loss.
Speech carries most of its energy lower down, so we'd expect a smaller overall loss for a voice. We didn't measure that here. Consonants sit higher, so a wall's treble loss says more about whether words survive than its overall loss does. We tuned the thin wall by ear until they did.
If you tune these values, change the two together. Lowering the cutoff also makes a wall quieter, so a darker wall may need less gain reduction than you'd first choose.
Reverb tails
Reverb shows up after the sound ends. We stopped the source at 3 s and measured from 3.2 s to 3.4 s:
| Setting | Level of the tail (the clear path reads -18.3 dB while playing) |
|---|---|
| No reverb | Silent |
| Room, 0.4 s, wet -18 dB | -90.6 dB |
| Cave, 1.8 s, wet -12 dB | -49.4 dB |
While the source played, the level stayed within 0.1 dB of the clear path in both, because Earshot keeps the dry signal and adds reverb to it. Each reverb is one shared ConvolverNode that every source in it feeds, because convolvers are expensive and a voice count shouldn't multiply them.
Method
The test is test/offline.mjs, and it runs as part of Earshot's test suite.
- Headless Chromium from Playwright, on
OfflineAudioContextat 48 kHz. - 3 seconds of white noise at 0.3 amplitude, fresh for each render, measured from 2 s to 3 s as RMS.
- The treble figure comes from a 4 kHz high-pass filter on a second channel of the same output. That filter is a 12 dB per octave biquad, so energy just below 4 kHz still counts.
- The tables come from one run, read to 0.1 dB. The noise and the reverb impulses are random, so figures move between runs: about 0.1 dB for the walls and 0.4 dB for the cave tail on a repeat.
We render offline because live audio is a poor measuring tool in a headless browser. The live AudioContext clock ran at about 0.8x real time in our runs, so anything timed against it drifts.
What this doesn't show
- Speech. All of this is white noise, which isn't how a voice spreads its energy.
- Real walls. The materials are game settings tuned by ear, with no acoustic model behind them.
- What people perceive. Decibels don't tell you whether a word is intelligible. We judged that by listening, without a formal listening test.
- Other browsers. Filters follow the Web Audio spec, but we measured Chromium only.
To run it yourself, clone debuffjp/earshot, run npm ci, npm run build and node test/offline.mjs, then change a material and see what moves.