@maruaudio/dsp/filters/eq3 is a low shelf, a peaking mid and a high shelf in series, each a @maru/filters-biquad state driven through the biquad's own functions (RBJ coefficients, TDF2, f32), with no EQ-specific DSP. Both shelves use the fixed EQ3_SHELF_Q of 0.7071; the mid Q is the caller's.
const state = initEq3Node(48000)
setEq3NodeParam(state, 4, -3) // mid gain, dB
const y = eq3NodeTick(state, x)Parameters
setEq3NodeParam(state, index, value) reconfigures one section through the biquad setter clamps and refreshes its coefficients. Other indices are ignored.
| Index | Controls | Clamp (biquad setter) | Default | Unit |
|---|---|---|---|---|
| 0 | Low shelf frequency | 10 Hz to 0.45 × rate | 200 | Hz |
| 1 | Low shelf gain | −24 to +24 | 0 | dB |
| 2 | Mid frequency | 10 Hz to 0.45 × rate | 1000 | Hz |
| 3 | Mid Q | 0.0001 to 40 | 0.9 | Q |
| 4 | Mid gain | −24 to +24 | 0 | dB |
| 5 | High shelf frequency | 10 Hz to 0.45 × rate | 4000 | Hz |
| 6 | High shelf gain | −24 to +24 | 0 | dB |
Lifecycle
initEq3Node(sampleRate) configures all three sections → setEq3NodeParam → eq3NodeTick per sample → resetEq3Node, which clears the three section histories and keeps the settings. prepareEq3NodeSampleRate re-derives every section for a new rate without allocating; a frequency already clamped to a lower rate's ceiling stays there until it is set again.
When to use it
A familiar bass, middle and treble control on a channel, instrument or effect return. For more bands, cut slopes or smoothed transitions, the @maru/filters-parametric-eq DSP node does that work.
Limits
- Mono sample tick, three biquad ticks per sample. Changes apply at once, with no smoothing; the refresh calls
cos,sinandpow, so set at control rate. audio-kernelskeeps the PCM16 render entry and forwards this state.