Build with this node

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

Ask Studio

@maruaudio/dsp/dynamics/plosive-repair attenuates low-frequency bursts in a stereo signal. A one-pole low-pass per channel isolates the low band; its linked peak drives a stereo-compressor detector (ratio 8, 1 ms attack) and 8 ms and 150 ms envelopes. With protection on, reduction is gated by rising energy, clamp((fast − 1.4·slow) / (0.6·slow + 1e−6), 0, 1), a heuristic, not speech recognition. The gain (floor −amount) scales only the low band: removed is low·(1 − gain), output input − removed, so the two rebuild the input.

const state = initStereoPlosiveRepair(48000)
setStereoPlosiveRepairParameter(state, PLOSIVE_REPAIR_AMOUNT_DB, 12)
stereoPlosiveRepairTick(state, left, right) // state.outLeft, state.outRight

Parameters

setStereoPlosiveRepairParameter(state, id, value) returns false and changes nothing for a non-finite value, an unknown id or a value out of range.

Parameter idAccepted valuesDefaultUnit
PLOSIVE_REPAIR_CUTOFF_HZ80 to 350160Hz
PLOSIVE_REPAIR_THRESHOLD_DB−48 to −6−24dB
PLOSIVE_REPAIR_AMOUNT_DB0 to 18 (maximum reduction)9dB
PLOSIVE_REPAIR_RELEASE_MS20 to 25080ms
PLOSIVE_REPAIR_MANUAL0 or 1; 1 applies the full amount0flag
PLOSIVE_REPAIR_TRANSIENT_PROTECTION0 or 11flag
PLOSIVE_REPAIR_AUDITION0 processed, 1 removed, 2 dry0mode

Cutoff, floor, manual and audition changes glide through an 8 ms one-pole.

Lifecycle

initStereoPlosiveRepair(sampleRate) (unsupported rate gives 48 kHz) and prepareStereoPlosiveRepair(state, rate) (false outside 8 to 192 kHz) run outside rendering; prepare rebuilds the detector and resets. Setters → stereoPlosiveRepairTick per frame (refreshes derived controls after a change) → resetStereoPlosiveRepair, which restores initial controls and histories.

When to use it

Cleaning pops from close-miked speech or vocals, auditioning what is removed.

Limits

  • Stereo, linked, sample tick, no latency. Outputs are f32; NaN input is read as 0.
  • Reset returns every control to its default, not only the histories; set them again.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Dependencies

Dependents

No other node imports this one.

Used by