Skip to content

True Peak Safety ​

True peak safety is the practice of leaving enough margin so a mastered file does not clip after reconstruction, codec conversion, or streaming playback.

Sample peaks only show the values stored in the digital file. Playback systems and encoders reconstruct a continuous waveform between those samples, and the part that rises above the stored peaks is an inter-sample peak (ISP). True Peak explains what that is and how it is measured; this page is about the margin you leave for it.

This matters most when:

SituationRisk
Lossy encodingMP3, AAC, or Opus conversion can create new peaks.
Loud limitingDense masters leave less room for reconstruction overshoot.
Streaming normalizationPlayback pipelines may transcode or process the file.
Consumer devicesSome playback chains handle near-0 dBFS material poorly.

Even when the sample-peak meter looks safe, codec conversion and device-side reconstruction can lift peaks. Right before release, check both the exported WAV and a quick render through the expected delivery codec, such as MP3, AAC, or Opus.

Practical Ceiling ​

The ceiling is the highest level the limiter will let through. A common release ceiling is around -1 dBTP — decibels true peak, the same decibel scale as dBFS but measured on the reconstructed waveform. Some workflows use -2 dBTP for extra codec safety; others use a tighter ceiling when the destination is known and controlled. The engine's club and cd delivery targets use -0.3 dBTP together with -9 LUFS, which trades codec safety for density; streaming, broadcast, and podcast targets use -1.

-1 dBTP is not a universal law, but it is a practical starting point because it leaves room for platform encoding and playback reconstruction. If raising the ceiling adds harshness or distortion after export, prioritize safety over a small loudness increase.

The ceiling is not a loudness target. It is a safety margin. You can have a quiet file with unsafe peaks or a loud file that stays within true-peak limits. It is also separate from the loudness target: raising the ceiling to gain LUFS buys a little level now and pays for it with clipping after conversion. If the target is out of reach, look at how much gain reduction the limiter is doing and fix it earlier in the chain (input gain, compression, low-end balance).

MAXIMIZER · TRUE PEAK LIMITERIDLE
True Peak limiter — drive in, ceiling out

The band clip driven into maximizer.truePeakLimiter with a −1 dBTP ceiling. Raise the drive: the input (rose) climbs past 0 dBFS, the output (teal) stays at −1.0 dBTP at every setting, and the gain reduction below deepens to take up the difference. The loudness bought shrinks as you push: 18 dB of drive raises the output RMS by only about 8 dB, and the rest is peaks pressed flat. Press play to hear the limited output.

Drive (input gain)
9 dB

Limiter Lookahead ​

A true-peak limiter needs time to react before the peak arrives. Lookahead gives the limiter that time. Too little lookahead can miss fast peaks. Too much lookahead can increase latency and may change transient feel.

The limiter's gain reduction starts lookaheadMs before the peak reaches the output and recovers over roughly releaseMs, so the output stays under the ceiling. The figure below shows it at the defaults listed further down. In offline mastering, a few milliseconds of lookahead is usually acceptable because playback latency does not matter. In live or interactive systems, latency matters more.

Gain reduction starts one lookahead early
level (dBFS)+60−6−12ceiling −1 dBTP peak enterspeak leavesgain (dB)0−1−2−3−40123456time (ms)lookahead 1 ms gain (dB), release0−1−2−3−4050100150time (ms)releaseMs 5063% back: 40 ms shortened on a sharp peak
  • input
  • output (delayed by the lookahead)
  • limiter gain
  • ceiling
A short peak to +2 dBFS over a −9 dBFS bed, through the limiter at its defaults. The gain drops as the peak enters the lookahead window; the output, delayed by 1 ms, carries the peak out exactly at the −1 dBTP ceiling. The gain then recovers, a little faster than the 50 ms setting, because the limiter shortens its release on sharp peaks.

The limiter's defaults:

SettingDefault
ceilingDb-1
lookaheadMs1.0
releaseMs50
oversampleFactor4

Measure it in libsonare ​

The meter (True Peak) and the limiter both oversample 4x by default and accept 1, 2, 4, 8 or 16. Limiting to a ceiling is a chain stage, maximizer.truePeakLimiter.

typescript
import { init, meteringPeakDb, meteringTruePeakDb, masteringChain } from '@libraz/libsonare';

await init();

const samplePeak = meteringPeakDb(samples, sampleRate);
const truePeak = meteringTruePeakDb(samples, sampleRate);      // 4x oversampling
const finer = meteringTruePeakDb(samples, sampleRate, 8);      // 1, 2, 4, 8 or 16

const limited = masteringChain(samples, sampleRate, {
  maximizer: { truePeakLimiter: { ceilingDb: -1, lookaheadMs: 1, oversampleFactor: 4 } },
});
// limited.samples holds the result; limited.outputTruePeakDbtp reads -1.0 for drum.wav
python
import libsonare as sonare

audio = sonare.Audio.from_file("song.wav")
sample_peak = audio.peak_db()
true_peak = audio.true_peak_db()                      # oversample_factor=4
finer = audio.true_peak_db(oversample_factor=8)

limited = sonare.mastering_chain(
    audio.data, audio.sample_rate,
    {"maximizer": {"truePeakLimiter": {"ceilingDb": -1, "lookaheadMs": 1, "oversampleFactor": 4}}},
)
bash
sonare-cli meter song.wav   # native CLI only: sample peak and true peak (--oversample sets the factor)
sonare mastering-processor song.wav --processor maximizer.truePeakLimiter \
  --params ceilingDb=-1,lookaheadMs=1 -o limited.wav

The mastering demo's Studio mode exposes the same ceiling and lookahead controls.

What to Check by Ear ​

True peak problems often appear where kick and bass hit together, where cymbals are loud in a chorus, or after saturation creates sharp peaks. Listen for small bursts of grit, splashy cymbals, or low-end clicks that were not present before limiting.

If lowering the ceiling barely changes the sound, choose the safer setting. If lowering it removes punch immediately, do not solve the whole problem at the limiter; revisit dynamics, saturation, or input level earlier in the chain.

Implementation notes

The safety check uses the same principle as true-peak metering: estimate the reconstructed waveform by oversampling, then evaluate the highest sample on that denser grid. A limiter that only clamps original samples can still leave inter-sample overs, so the guard has to observe the oversampled path, not just the input buffer.

Lookahead and release are coupled.

Lookahead gives the limiter a chance to begin attenuation before the peak. Release determines how quickly it returns to unity gain.

A very short release can produce audible pumping or a distortion-like flutter. A very long release can dull transients and reduce loudness headroom. The practical setting is a compromise between codec safety, transient preservation, and audible gain movement.

Related: True Peak, LUFS, Loudness Matching