Dynamics and repair
Compose detectors, compression, expansion, limiting and focused vocal repair.
Dynamics processing changes gain in response to a detector. A compressor reduces material above a threshold; a downward expander reduces material below it; a gate closes farther; a limiter controls peaks. Envelope followers expose the measured motion so you can build your own response.
Pick the detector and gain path
| Goal | Start with | Important controls |
|---|---|---|
| Simple peak compression | dynamics/peak-compressor | Threshold, ratio, knee and attack/release. |
| External-key or detailed compression | dynamics/keyed-compressor | Detector mode/filter, stereo link, hold, range and makeup. |
| Linked stereo gain | dynamics/stereo-compressor, dynamics/stereo-linked | Shared gain preserves image; supply the intended detector signal. |
| Reduce quiet spill | dynamics/stereo-expander or a gate | Threshold, ratio/hysteresis and opening/closing timing. |
| Catch peaks with lookahead | dynamics/lookahead-limiter | Ceiling, lookahead and release; declare the resulting delay. |
| Reduce sibilance | dynamics/stereo-de-esser | Detector frequency, threshold, range and detector listen. |
| Reduce low-frequency vocal bursts | dynamics/plosive-repair | Cutoff, threshold, amount, release and removed-signal audition. |
A gain tick returns a gain multiplier: apply it to the audio channels. An audio tick returns processed audio. Follow the selected leaf’s signature; passing a gain result straight to the output produces the wrong signal. A separate key input needs a real declared input/route in the module and host.
Timing, levels and audition
Thresholds are in dB where named as such; attack/release units come from the leaf’s setter. Keep detector filtering separate from the audible tone path. Link stereo detection when independent gain would move the stereo image. Compare processed and dry signals at similar loudness.
The de-esser uses a linked detector and dynamic high shelf without lookahead. The plosive leaf attenuates low-band bursts; use its removed audition to check whether it is also removing wanted bass or vowel onsets. A lookahead limiter has a different purpose and intentionally delays audio. Align parallel paths with delay alignment.
For metering the result, use metering and spectral processing.
Toolkit reference
Import paths below are suffixes of maruaudio/dsp/. Use the exported types
and setters in your installed version for complete signatures and defaults.
Dynamics
| Import suffix | Purpose | Selected API |
|---|---|---|
dynamics/envelope-follower | Peak/RMS envelope-follower state, branching one-pole attack/release detector, and the standalone mean-square window a separated compressor detector needs. | initEnvelopeFollower, envelopeFollowerTick |
dynamics/gate | Soft envelope gate: absolute-value detector, one-pole smoothed envelope with its own clamped time-coefficient policy, logistic comparator and VCA. | initGateNode, gateNodeTick |
dynamics/keyed-compressor | Sidechain compressor with peak/RMS detection, soft knee, hold, auto-release, range, stereo linkage and makeup gain. | initDynamicsCompressorNode, dynamicsCompressorNodeTick |
dynamics/lookahead-limiter | Mono and stereo linked true-peak lookahead brickwall limiter: 4x polyphase true-peak detector, sliding-minimum hold, two-pole release, boxcar attack, delayed apply and arithmetic ceiling backstop. | initStereoLookaheadLimiter, stereoLookaheadLimiterTick |
dynamics/peak-compressor | Feed-forward peak-compressor state, quadratic soft-knee curve, f32 gain-reduction ballistics, tick and reset semantics. | initCompressorNode, compressorNodeTick |
dynamics/stereo-linked | Linked stereo peak compressor and hysteretic gate gain controllers composed from detector and ballistics leaves. | initLinkedCompressor, linkedCompressorGainTick |
dynamics/stereo-compressor | Linked stereo peak/RMS compressor with independent signed-channel detector high-pass filters before the max-magnitude link; fixed 10 ms RMS averaging after linkage, 6 dB knee and manual makeup. | initStereoCompressor, stereoCompressorGainTick |
dynamics/stereo-expander | Linked stereo downward expander with a ratio-based quadratic soft knee, finite peak detector and independent opening/closing ballistics. | initStereoExpander, stereoExpanderGainTick |
dynamics/stereo-transient-shaper | Full-band amplitude-envelope transient shaping with independent detector and processing M/S balance. | initStereoTransientShaper, stereoTransientShaperTick |
dynamics/follower-limiter | Firmware-derived peak follower and reciprocal gain into a rational soft limit, plus compressor/hard modes. | initFollowerLimiterNode, followerLimiterProcess |
dynamics/sidechain-duck | Firmware-derived stereo ducking from a separate key signal; its attack/release coefficients assume 48 kHz. | initSidechainDuckNode, sidechainDuckTick |
dynamics/stereo-de-esser | Linked high-pass peak detector controlling a dynamic high shelf. | initStereoDeEsser, stereoDeEsserTick |
dynamics/plosive-repair | Stereo low-band burst attenuation with rising-energy protection, manual reduction and processed/removed/dry audition; no product parameter paths. | initStereoPlosiveRepair, stereoPlosiveRepairTick |
Return to DSP fundamentals for I/O, lifecycle, units and the category map.