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

GoalStart withImportant controls
Simple peak compressiondynamics/peak-compressorThreshold, ratio, knee and attack/release.
External-key or detailed compressiondynamics/keyed-compressorDetector mode/filter, stereo link, hold, range and makeup.
Linked stereo gaindynamics/stereo-compressor, dynamics/stereo-linkedShared gain preserves image; supply the intended detector signal.
Reduce quiet spilldynamics/stereo-expander or a gateThreshold, ratio/hysteresis and opening/closing timing.
Catch peaks with lookaheaddynamics/lookahead-limiterCeiling, lookahead and release; declare the resulting delay.
Reduce sibilancedynamics/stereo-de-esserDetector frequency, threshold, range and detector listen.
Reduce low-frequency vocal burstsdynamics/plosive-repairCutoff, 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 suffixPurposeSelected API
dynamics/envelope-followerPeak/RMS envelope-follower state, branching one-pole attack/release detector, and the standalone mean-square window a separated compressor detector needs.initEnvelopeFollower, envelopeFollowerTick
dynamics/gateSoft envelope gate: absolute-value detector, one-pole smoothed envelope with its own clamped time-coefficient policy, logistic comparator and VCA.initGateNode, gateNodeTick
dynamics/keyed-compressorSidechain compressor with peak/RMS detection, soft knee, hold, auto-release, range, stereo linkage and makeup gain.initDynamicsCompressorNode, dynamicsCompressorNodeTick
dynamics/lookahead-limiterMono 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-compressorFeed-forward peak-compressor state, quadratic soft-knee curve, f32 gain-reduction ballistics, tick and reset semantics.initCompressorNode, compressorNodeTick
dynamics/stereo-linkedLinked stereo peak compressor and hysteretic gate gain controllers composed from detector and ballistics leaves.initLinkedCompressor, linkedCompressorGainTick
dynamics/stereo-compressorLinked 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-expanderLinked stereo downward expander with a ratio-based quadratic soft knee, finite peak detector and independent opening/closing ballistics.initStereoExpander, stereoExpanderGainTick
dynamics/stereo-transient-shaperFull-band amplitude-envelope transient shaping with independent detector and processing M/S balance.initStereoTransientShaper, stereoTransientShaperTick
dynamics/follower-limiterFirmware-derived peak follower and reciprocal gain into a rational soft limit, plus compressor/hard modes.initFollowerLimiterNode, followerLimiterProcess
dynamics/sidechain-duckFirmware-derived stereo ducking from a separate key signal; its attack/release coefficients assume 48 kHz.initSidechainDuckNode, sidechainDuckTick
dynamics/stereo-de-esserLinked high-pass peak detector controlling a dynamic high shelf.initStereoDeEsser, stereoDeEsserTick
dynamics/plosive-repairStereo 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.