Build with this node

Start with a prompt in Studio, or copy it into your own coding agent.

Ask Studio

@maruaudio/dsp/dynamics/follower-limiter is the CHOMPI firmware's peak-follower limiter, an extension of the stmlib Limiter. An asymmetric one-pole slope follower tracks |x| (coefficient 0.05 rising, 0.0004 falling); the gain is 1/peak above 1, else 1; the result goes through the rational soft limit x(27 + x²)/(27 + 9x²). A compressor path and a hard clamp follow the firmware. All arithmetic is f32 in firmware order, including the (9·x)·x association.

const state = initFollowerLimiterNode() // TAPE trim 0.7
const y = followerLimiterProcess(state, x)

Parameters

There are no setters: the trim goes to init, compressor controls to each call.

ArgumentRange as codedDefaultUnit
initFollowerLimiterNode(trim)FOLLOWER_LIMITER_TRIM_TAPE (0.7) or TRIM_NONE (1); any number, rounded to f320.7linear
followerLimiterProcessComp(state, x, preGain, threshold, ratio, makeup)Not clamped; target gain 1/(ratio·(1 + peak − threshold)) above threshold, approached with coefficient 0.001 rising and 0.005 falling—linear

Lifecycle

initFollowerLimiterNode (peak 0.5, comp gain 0) → one of followerLimiterProcess, followerLimiterProcessComp or followerLimiterProcessHard per sample → resetFollowerLimiterNode, which restores the peak to 0.5 and the comp gain to 0 and keeps the trim. The comp path's follower falls with coefficient 0.0002.

When to use it

Keeping a firmware-matched output stage or feedback loop near unity: the soft path for musical limiting, the hard path where the output must stay in ±1.

Limits

  • Mono sample tick. Coefficients are per sample, so timing scales with the rate (the firmware runs at 48 kHz). The comp gain starts at 0, as in the zero-initialized firmware. The hard clamp maps NaN to −1, like DaisySP fclamp.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Dependencies

Dependents

Used by