Build with this node

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

Ask Studio

@maruaudio/dsp/filters/parametric-eq is a fused cascade of up to eight RBJ cookbook bands in transposed direct form II. Cuts add up to three Butterworth sections (12 to 48 dB per octave). Coefficients are rounded to f32; TDF2 state and control banks are Float64, never rounded. Controls glide, type and slope changes crossfade, and a derived headroom trim keeps the cascade inside full scale.

const state = initParametricEqNode(48000, 6)
setParametricEqBandGainDb(state, 2, 4)
const y = parametricEqNodeTick(state, x) // updates coefficients when needed

Parameters

Band setters take (state, band, value) and ignore a band outside 0 to 7.

SetterRange the setter enforcesDefaultUnit
setParametricEqBandEnabled≥ 0.5 on; ramps over 64 samplesBands 0 to 3 onflag
setParametricEqBandTypeRounded, 0 to 5: BELL, LOW_SHELF, HIGH_SHELF, LOW_CUT, HIGH_CUT, NOTCHLow cut, low shelf, bell, bell, high shelf, high cut × 3type
setParametricEqBandFrequency20 Hz to the lower of 20 kHz and 0.45 × rate30, 120, 500, 2000, 8000, 18000 × 3Hz
setParametricEqBandQ0.025 to 400.7071; bells 1Q
setParametricEqBandGainDb−30 to +300dB
setParametricEqBandSlopeRounded, 0 to 3 (12 to 48 dB/oct); used by cut types0index
setParametricEqOutputGainDb−24 to +240dB

Lifecycle

initParametricEqNode(sampleRate, bandCount) allocates eight-band banks; the active count (1 to 8) is fixed → setters → parametricEqNodeTick → resetParametricEqNode. Setup writes settle before the first sample; later frequency, Q, gain and trim glide through a 10 ms one-pole. prepareParametricEqNodeSampleRate re-derives smoother, ceilings and caches without allocating. Reset clears histories and re-settles the stored controls.

When to use it

Corrective and tonal EQ on a channel or bus, with automation that glides. @maru/filters-eq3 is the fixed three-band alternative.

Limits

  • Mono sample tick; with every band off and unity trim it returns the input.
  • The headroom trim is a scalar gain from bounded response probes at events, not a limiter. audio-kernels keeps a six-band PCM adapter.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Parameters

ParameterTypeSetter
Gain db gainDb

Global output trim in dB, applied after every band. Exactly 0 dB yields exactly 1.0, which the bypass short-circuit depends on.

floatsetParametricEqOutputGainDb

Dependencies

Dependents

Used by