Build with this node

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

Ask Studio

@maruaudio/dsp/filters/dj-filter is the CHOMPI firmware's one-knob DJ filter. Below the centre the control closes a resonant low-pass; above it, it opens a resonant high-pass. Each channel runs a low-pass then a high-pass @maru/filters-multimode-cascade section. The control maps to cubed targets, lp = clamp(0.01 + 2c, 0, lpMax)³ and hp = clamp(1.9c − 1, 0, hpMax)³, which the coefficients chase each sample through fonepole(0.0002) (@maru/modulation-f32-slew). All arithmetic is f32.

Parameters

Setter or initRange as codedDefaultUnit
initDjFilterNode(range)DJ_FILTER_RANGE_TAPE (lp ≤ 0.99, hp ≤ 1) or DJ_FILTER_RANGE_TEMPO (lp ≤ 0.98, hp ≤ 0.9)TAPEclamp set
setDjFilterControlNot clamped; 0 closed low-pass, 0.5 open, 1 high-pass; above 1 pushes the high-pass further0normalized
setDjFilterResonanceScaled by 0.95, not clamped0.6 on the sections at initresonance

While the smoothed high-pass coefficient exceeds 0.8, the high-pass resonance becomes res·5·(1 − control), and stays so until the next resonance set.

Lifecycle

initDjFilterNode → setDjFilterControl and setDjFilterResonance → djFilterNodeTickStereo(state, l, r) (results in outLeft, outRight) or djFilterNodeTickMono → resetDjFilterNode. Members the source leaves uninitialized start at zero, so the filter opens from fully closed over about 0.1 s after init. Reset clears history and smoothing and keeps the control, its targets and the last applied resonance.

When to use it

A single performance knob that sweeps from dark to thin, on a stereo bus or on one voice.

Limits

  • Stereo or mono; do not mix the two tick forms on one state. The mono tick runs the left chain alone and equals either stereo output for identical inputs.
  • Per-sample coefficients with no rate input: calibrated to 48 kHz.
  • Four cascade sections and two one-pole slews per sample.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Parameters

ParameterTypeSetter
Control control

`SetControl`: 0 closed low-pass, 0.5 open, 1 high-pass; values above 1 (WAVE's LFO sum) push the high-pass further and engage its override.

floatsetDjFilterControl
Resonance resonance

`SetRes`: scales by 0.95 and applies it to all four sections.

floatsetDjFilterResonance

Dependencies

Dependents

No other node imports this one.

Used by