technique
Loudness for games
How to make every music track and sound effect sit at a consistent level, with headroom so nothing clips when sounds overlap.
Before this
This page assumes you are comfortable with:
Why you need this
Every clip a model hands you comes out at whatever level the model happened to produce. Put three of them in a game and the player reaches for the volume button every time the scene changes. This page is the last step of stage 4 of the pipeline: before any file is exported, every music track and every sound effect is brought to a planned level, with room left over so that sounds playing together do not clip.
The idea
Three level words do all the work here, so here they are again:
- dBFS (decibels relative to full scale) measures a sample's level. 0 dBFS is the largest value a file can hold; everything else is negative. A peak is the highest sample level in a clip.
- LUFS (loudness units relative to full scale) measures how loud a whole clip sounds to a person, averaged over its length. That average is called integrated loudness. Like dBFS, it is negative, and closer to zero is louder.
- dB on its own is a change in level. A gain of +3 dB makes a clip louder; -2 dB makes it quieter.
Normalize by loudness, not by peak. Peak normalization raises a clip until its single loudest sample touches a ceiling. A drum hit with one sharp spike and a smooth pad with no spikes both end up with the same peak but sound wildly different in loudness. Loudness normalization instead measures each clip's integrated LUFS and applies whatever gain brings it to a target. The rule is one subtraction:
With small numbers: a clip measured at -16 LUFS and a target of -18 LUFS needs dB. A clip at -21.5 LUFS needs dB.
Keep a peak ceiling below 0 dBFS. Raising a quiet clip also raises its peaks. If a peak goes past 0 dBFS, the sample values are cut off flat (clipping), which sounds like a crackle. A lossy encoder can also push peaks slightly higher than they were in the master. So a ceiling a little below zero is standard. The level a meter estimates between samples is called true peak, written dBTP.
Published guidance exists, and it is guidance. The most cited game-specific numbers come from Sony's Audio Standards Working Group recommendation ASWG-R001 (version 1.10, August 2013). It recommends normalizing the average loudness of a title to -24 LUFS, plus or minus 2, for home consoles and -18 LUFS, plus or minus 2, for portable systems, with true peak not exceeding -1 dBTP. Two details matter. First, it measures the game's whole mix as played, "for as long as is practical and for a minimum of 30 minutes", not each file. Second, it is one company's recommendation for its own platforms, not a law or a store requirement for a web game. Treat it as a sensible reference point: a game played on phones and laptop speakers sits closer to the portable figure.
Sounds add up. Two sounds playing at once are added sample by sample. If both peak at the same moment with the same sign, their peaks add as amplitudes. Two sounds at the same loudness that are unrelated (not playing the same waveform) raise the combined loudness by about 3 dB, because their energy adds rather than their peaks.
Worked example
The clips and readings below are illustrations, not measurements of real files. Suppose the Lumen Clash team picks -18 LUFS as the music target, chosen to match the ASWG-R001 portable figure because the game is mostly played on phones and laptops, with a true-peak ceiling of -1 dBTP.
A loudness meter that reads integrated LUFS and true peak gives these readings for three takes:
| Clip | Measured | Gain to -18 LUFS | Linear factor | True peak before | True peak after |
|---|---|---|---|---|---|
| Lobby loop | -16.0 LUFS | -2.0 dB | 0.794 | -1.5 dBTP | -3.5 dBTP |
| In-match loop | -21.5 LUFS | +3.5 dB | 1.496 | -4.0 dBTP | -0.5 dBTP |
| Win stinger | -13.2 LUFS | -4.8 dB | 0.575 | -0.3 dBTP | -5.1 dBTP |
The linear factor is what the samples are multiplied by: . For the lobby loop, .
The in-match loop is the problem row. Raising it 3.5 dB puts its true peak at -0.5 dBTP, above the -1 dBTP ceiling. You have three honest choices: run it through a limiter (a processor that holds peaks under a ceiling while leaving the rest alone) set to -1 dBTP, accept it 0.5 dB quieter at -18.5 LUFS, or regenerate a take with fewer sharp peaks. All three are fine; clipping it is not.
Now the overlap. A card-play sound peaks at -6 dBFS and a button click peaks at -9 dBFS. In linear terms those are 0.501 and 0.355. If the player clicks at the exact moment a card lands and the peaks line up:
That still fits. Two copies of the card-play sound landing together give , which is +0.02 dBFS: over the top. Four overlapping copies sum, in the worst case, to about +6 dBFS, so each would need to peak at about -13 dBFS to stay under -1 dBFS. Worst case means every peak aligned, which is rare, but card games deal several cards at once, so it is not rare enough to ignore.
The fix is headroom planned in advance: leave short effects well below the ceiling, and let the game's mixer turn effects down a little when many are playing.
In a game's audio pipeline
Loudness is the last shaping step in stage 4, after seamless loops, stingers, and edited effects are cut. Gain is applied to the lossless master, then Exporting game audio encodes from it. Record each gain change in the file's provenance record (see Licensing and provenance) so a regenerated take can be brought to the same place.
Three habits inside the game itself:
- Separate music and effects volume settings. Players turn music down to listen to their own, or turn effects down at night. Give each its own slider, and apply the slider as a gain on the whole group.
- Effects relative to music, by ear. There is no single published number for how far effects should sit above or below music. Set music to its target, then set each effect group by playing the game, and write the resulting gain down.
- Check on phone speakers. A phone speaker reproduces almost nothing in the low bass. A loop that sounds balanced on headphones can vanish on a phone, while a bright click cuts through. Play the build on the smallest speaker your players will use.
Common mistakes
- Peak-normalizing everything. Symptom: the soft pad loop is fine, but the drum-heavy loop is much quieter after "normalize to 0 dB", or the reverse.
- Normalizing a stinger as if it were music. A short clip's integrated LUFS is dominated by its loudest second. Symptom: the win stinger jumps out at the player. Judge short cues against the loop they interrupt, by ear, after measuring.
- No ceiling. Symptom: a faint crackle on the loudest beat after export, even though the master looked fine. Lossy encoding raised the peak over 0 dBFS.
- Forgetting overlap. Symptom: every effect sounds clean alone, but dealing a hand of cards crackles.
- Mixing on headphones only. Symptom: on a phone the music disappears and the click is piercing.
- Normalizing the wrong file. Symptom: the level changes after you re-export. Apply gain to the master and record it, never to an already compressed copy.
Cost
The arithmetic is free; the time goes to measuring and listening. Measuring integrated loudness reads the whole clip once, so it takes time proportional to the clip's length, and on any recent machine a minute of audio measures in a moment. Applying gain is one multiplication per sample. The real cost is the maker's listening time: setting effect levels by playing the game, and checking on two or three different speakers. Expect it to take longer than generating the clips did. File size does not change with gain. Limiting can change how a loop sounds if pushed hard, which is a reason to regenerate rather than squeeze.
Going further
- Sony's ASWG-R001 recommendation, for the whole-mix measurement method and its reasons.
- ITU-R BS.1770, the international standard that defines how integrated loudness and true peak are computed.
- EBU R 128, the European broadcast loudness recommendation whose unit name, LUFS, this cluster uses.
- Dynamic mixing in game engines: ducking (lowering music under important effects) and voice limits (capping how many copies of one sound may play at once).