Uneven loudness and silence in sound effect variations
A game picks footstep_01 to footstep_12 at random. If one take is much quieter, or starts a beat late, players hear it at once. Here is how to catch that before a pack ships.
Why it happens
Variations are often recorded or edited in different sessions. Each one can end up at its own level, and an export can leave a short gap before the sound starts. In a list of files nothing looks wrong. You only hear it when the takes play one after another.
So check every take in a family against its siblings, on two things: how loud it is, and how long it waits before the sound begins.
Fix 1, free: measure with ffmpeg
The volumedetect filter prints the mean volume (root mean square) and the maximum volume of a file, in decibels. Run it on each take in a family:
for f in footstep_*.wav; do echo "$f"; ffmpeg -i "$f" -af volumedetect -f null - 2>&1 | grep -E "mean_volume|max_volume"; done
Takes whose mean_volume sits well away from the rest are the ones to listen to. The docs also explain the histogram it prints: if the largest sample is at -4 dB, raising the volume by 4 dB causes no clipping.
For late starts, silencedetect logs any stretch below a noise level that lasts at least a set time. Its default time is 2 seconds, which is too long for short effects, so set it:
ffmpeg -i footstep_04.wav -af silencedetect=noise=-50dB:d=0.05 -f null -
A silence that starts at 0 is a gap at the head of the file. To change levels rather than just measure them, the loudnorm filter does EBU R128 loudness normalisation. Source for all three: FFmpeg filters documentation.
Fix 2, free: Audacity
- Measure: Measure RMS reads the RMS level of a selection. It is off by default; turn it on in Analyze > Plugin Manager (manual).
- Find gaps: Analyze > Label Sounds marks sound and silence against a threshold, in 10 ms steps (manual).
- Fix levels: Effect > Volume and Compression > Loudness Normalization can target perceived loudness or an RMS level (manual).
- Do it in bulk: a Macro with "Apply Macro to: Files" runs the same steps over many files. The manual advises no more than 500 files at a time (manual).
Normalising every take to one target is quick. It is not always right: a soft footstep may be meant to be soft. Measure first, then decide.
Fix 3, paid: one report for the whole pack
I make SFX Variation Proof ($9). You drop in the WAVs. It groups them by cue name and compares each take with its family. It flags RMS outliers, quiet starts, families that mix sample rates or channel counts, and full-scale peaks. You set the limits, filter to the takes that need a listen, and export a CSV with every measurement and the limits used. In the built-in synthetic sample it flags switch_04: 12.3 dB under its family and starting 112 ms late.
It only reads 16-bit PCM WAV, up to 100 files per run. It flags problems and does not fix levels or trim audio, so you still need Fix 1 or 2 for the edit. RMS includes silence, so a take with a long silent tail reads quieter. It runs in desktop Chrome. There is no free demo, so if the ffmpeg loop already suits you, keep using it.
Which one to use
- Comfortable in a terminal: Fix 1.
- Prefer a window and want to fix as you go: Fix 2.
- Many families per pack and you want one table of what to re-check: Fix 3, then fix the flagged takes with Fix 1 or 2.