Product
Zero-overshoot true-peak limiting with 4x polyphase lookahead
How Infinite's Limiter pairs a 4x Kaiser-windowed true-peak detector with a hold and box-averaged lookahead ramp to guarantee zero sample overshoot.

on this page
A brick-wall limiter has one non-negotiable job: no sample leaving the processor may exceed the ceiling. Yet many real-time lookahead limiters quietly fail that contract on sharp transients or inter-sample peaks. Understanding why requires looking closely at how a true-peak limiter DSP topology aligns its detector, hold window, smoothing ramp, and audio delay line.
In Infinite, the Limiter node (and the master bus SpatialMaster limiter) uses a linked lookahead architecture built around a 4x polyphase Kaiser-windowed sinc detector and a hold-plus-box-average gain path. The result is a straight-line attack ramp across a fixed 1.5 ms lookahead window with zero sample overshoot by construction.
Why naive one-pole lookahead limiters overshoot
It is tempting to build a lookahead limiter by delaying the audio by $L$ samples, computing a target gain $t[n] = \min(1, C / |x[n]|)$, and smoothing the attack with a one-pole filter whose time constant $\tau$ equals the lookahead duration.
That approach leaks peaks. An exponential one-pole smoother with time constant $\tau = L$ only covers $1 - 1/e \approx 63.2\%$ of a step reduction by the time the delayed transient arrives at the output. On a +6 dB transient, a one-pole lookahead limiter still overshoots its ceiling by roughly +2.7 dB. Increasing $\tau$ makes the attack smoother at the cost of even worse overshoot; shortening $\tau$ clamps the peak at the cost of high-frequency distortion.
To eliminate both overshoot and step clicks simultaneously, the gain computer needs a finite-impulse-response (FIR) attack shape whose support fits strictly inside the lookahead window.
The hold and box-averaged gain topology
Infinite's PeakLimiter (the DSP core behind Limiter) separates the gain path into three stages that work together with a matching audio delay $D$:
- Per-sample target gain: For each incoming frame $k$, the detector measures the peak level $L[k]$ across all linked channels (including inter-sample peaks on either side of $k$) and computes the maximum safe gain:
$$t[k] = \min\left(1,\; \frac{\text{ceiling}}{L[k]}\right)$$
- Minimum-hold window: A sliding minimum over the last $W$ target values ensures that any transient stays held for the full ramp duration:
$$w[n] = \min_{0 \le i < W} t[n - i]$$
With kLookaheadMs = 1.5f, the window length is $W = \lceil 0.0015 \cdot f_s \rceil + 1$ (73 samples at 48 kHz, 68 samples at 44.1 kHz).
- Instant attack, one-pole release: The envelope $e[n]$ drops immediately whenever $w[n] < e[n-1]$, and otherwise eases upward toward $w[n]$ using the user's
releasecoefficient $\alpha = \exp(-1 / (T_{\text{rel}} \cdot f_s))$:
$$e[n] = \begin{cases} w[n] & \text{if } w[n] < e[n-1] \\ w[n] + (e[n-1] - w[n])\alpha & \text{otherwise} \end{cases}$$
Because $e[n]$ only relaxes upward toward $w[n]$, the invariant $e[n] \le w[n]$ holds at every sample.
- Box-averaged attack ramp: The final gain $g[n]$ applied to the delayed audio is the arithmetic mean of the last $W$ envelope values:
$$g[n] = \frac{1}{W} \sum_{i=0}^{W-1} e[n - i]$$
Notice why the ceiling holds by construction. The audio leaving the delay line at time $n$ corresponds to detector index $k = n - (W - 1)$. That sample's target gain $t[k]$ sits inside every single one of the $W$ hold windows $w[n], w[n-1], \dots, w[n-(W-1)]$ that the box average reads. Since $e[m] \le w[m] \le t[k]$ for all $m$ in that span, their mean $g[n]$ is also guaranteed to satisfy $g[n] \le t[k]$.
Instead of a hard click, a step transient produces a straight linear gain ramp across the $W$-sample lookahead window, reaching the exact required attenuation on the precise sample where the peak leaves the delay line.
One subtle implementation detail matters for long sessions: PeakLimiter sums the $W$ envelope samples afresh in double precision on every frame rather than maintaining a running add-new / subtract-old accumulator. Running sums accumulate floating-point rounding drift over hours of playback; recomputing 73 additions in double eliminates drift completely while keeping per-frame cost negligible.
4x polyphase Kaiser-windowed sinc true-peak detection
Digital sample values can sit below 0 dBFS while the reconstructed analogue waveform between samples exceeds it. Following ITU-R BS.1770-4 Annex 2, PeakLimiter inspects 4x oversampled inter-sample peaks at fractional phases $1/4$, $1/2$, and $3/4$ between adjacent samples.
Rather than upsampling the entire audio stream, the detector evaluates three 16-tap polyphase FIR filters (kTpTaps = 16, kTpPhases = 3) directly on the input history buffer:
- Filter design at prepare time: In
Prepare(),BuildCoefficients()synthesises a windowed sinc kernel withkCutoff = 0.95of Nyquist and a Kaiser window of shapekBeta = 7.0(giving roughly -70 dB stopband rejection) using a 32-term series evaluation of $I_0(x)$. Each phase is normalised to unity DC gain so a constant signal reads as itself. - Interval symmetry: Each 16-tap phase has a lookahead lag of
kTpLag = 8samples. At framepos, the interpolator evaluates the interval $(k, k+1)$ where $k = \text{pos} - 8$, using samples $k-7 \dots k+8$. Taking the maximum across the sample at $k$, the current interval $(k, k+1)$, and the stored previous interval $(k-1, k)$ guarantees that inter-sample peaks on both sides of sample $k$ are captured in $L[k]$. - Total latency and PDC: Aligning the audio output with both the hold window and the interpolator lag gives a total latency of $D = (W - 1) + 8$ samples (80 samples, or 1.67 ms, at 48 kHz).
LimiterKernel::LatencySamples()reports this exact count to Infinite's lock-free audio graph and PDC scheduler, keeping parallel dry/wet or sidechain buses sample-aligned.
Multi-channel linking and real-time safety
PeakLimiter links up to kMaxChannels = 8 channels under a single shared gain mGain. Because every channel receives the exact same attenuation curve, stereo and surround imaging never shifts during heavy gain reduction.
On the audio thread, LimiterKernel::ProcessBlock performs zero heap allocations and takes zero locks. Parameter changes from the UI (threshold, release, inGain, outGain) arrive through a lock-free ParamMailbox with per-sample smoothing, and decibel-to-linear conversions are cached in DspMath::DbLinCache so powf only executes when a smoothed value actually changes. Output samples include a 1.0e-20f denormal guard, and gain reduction plus output peak telemetry are pushed to the node's meter via a lock-free MeterRing.
The Limiter node exposes four controls: threshold (-30 to 0 dB), release (5 to 1000 ms), inGain (-12 to +24 dB), and outGain (-24 to +12 dB), with defaultMix fixed at 1.0 so a limiter is never accidentally half-bypassed.
Honest limits and edge cases
Every DSP choice carries trade-offs, and two limits are worth noting plainly:
- Nyquist under-read: Like any 4x true-peak detector, evaluating only $1/4$, $1/2$, and $3/4$ phases can under-read a full-scale sine wave sitting right near Nyquist by up to roughly 0.5 dB. On real music and sound design material, the residual error is typically a few hundredths of a dB.
- Post-limiter output gain:
outGainis applied after the limiting stage, so boostingoutGainabove 0 dB will raise the final output abovethreshold. KeepoutGainat or below 0 dB when enforcing a strict delivery ceiling. - Project scope: Infinite is a young, active project: it does not ship an AAX plugin target, and hardware audio inputs are refused in headless CLI mode.
Try Limiter in your own patches
To hear the Limiter in action, download Infinite or explore ready-made patches in the Infinite preset library. Drop Limiter before Audio Out after a dense reverb tail from 16-line Hadamard FDN Reverb or a hot synth bus, set threshold to -1.0 dB, and watch the gain-reduction meter clamp transients cleanly without pumping the stereo field.