From aaa7537d5081694792ed5a4753b70af67bfe1cb7 Mon Sep 17 00:00:00 2001 From: Benjamin Hardy Date: Thu, 5 Nov 2026 11:24:57 +0100 Subject: [PATCH] Filter FXs are now post-fader --- CLAUDE.md | 8 +++++--- frontend/src/components/mixer/MixerPanel.tsx | 2 +- frontend/src/lib/audio/mixer.ts | 17 ++++++++++------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 6dab54e..de2bced 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2882,7 +2882,9 @@ The prep strip plays every track through the **Web Audio API** (a plain (LR4 crossovers at 250 Hz / 2.5 kHz, the low band through a 2.5 kHz all-pass, so the bands sum flat — measured 0.0000 dB; Web Audio's lowpass/highpass Q is in DB, Butterworth = -3.01, its allpass Q linear) → - FILTER FX (`FilterFx`, decided 2026-11-03 after Traktor's mixer: the + fader → FILTER FX, POST-fader (decided 2026-11-05: pulling the fader down + stops feeding the reverb / delay and their tails ring out rather than + being cut with it) (`FilterFx`, decided 2026-11-03 after Traktor's mixer: the FILTER knob always filters — 4-pole, low-pass left / high-pass right, over a RANGE: FULL (to 20 Hz / 20 kHz: a 100 Hz bass -56 dB at full left, measured; one 12 dB stage left it at -28), MUSICAL (150 Hz / 8 kHz) or @@ -2906,14 +2908,14 @@ The prep strip plays every track through the **Web Audio API** (a plain knob, -54 at 60%). Resonance fades over the last stretch of the sweep (no boom at 20 Hz). Each effect's one parameter is an APP SETTING, not a knob — `mixerState.fx`; all built once and switched by gains) → - fader → crossfader (`xfadeGains(x, sharpness)`: each channel fades on a + crossfader (`xfadeGains(x, sharpness)`: each channel fades on a quarter-cosine over the last `xfadeWidth` of the travel — the whole of it at 0, constant power, -3 dB in the middle; 4% at 1, a cut; no dip in the middle above ~0.52) → bus → limiter (DynamicsCompressor at -1.5 dBFS 20:1 — Web Audio adds an automatic MAKE-UP gain, +0.57 dB at -1/20:1, which let two loud decks peak at +0.3 dBFS until a gain after it took it back off) → speakers. Channel meters are - after the fader, before the crossfader. OUTSIDE performance mode the mixer + after the fader and FX, before the crossfader. OUTSIDE performance mode the mixer is BYPASSED (A straight through, B silent, no limiter): prep listening is unchanged. Controls live in `mixerState.ts` (an external store, not persisted; a MIDI mapping would write the same setters); the curves in diff --git a/frontend/src/components/mixer/MixerPanel.tsx b/frontend/src/components/mixer/MixerPanel.tsx index f6bf3b1..baeef8c 100644 --- a/frontend/src/components/mixer/MixerPanel.tsx +++ b/frontend/src/components/mixer/MixerPanel.tsx @@ -278,7 +278,7 @@ function Strip({ ) const meter = ( -
+
) diff --git a/frontend/src/lib/audio/mixer.ts b/frontend/src/lib/audio/mixer.ts index c5da449..0f59b0e 100644 --- a/frontend/src/lib/audio/mixer.ts +++ b/frontend/src/lib/audio/mixer.ts @@ -1,8 +1,11 @@ // The mixer's audio graph (performance mode, decided 2026-11-02). Both decks // play into it; it follows the controls in `mixerState.ts`. // -// deck → gain → 3-band isolator → filter FX → fader ─┬→ crossfader → bus +// deck → gain → 3-band isolator → fader → filter FX ─┬→ crossfader → bus // └→ meter +// +// The filter FX is POST-fader, so pulling the fader down stops feeding the +// reverb / delay and their tails ring out instead of being cut with it. // bus → limiter → master meter → speakers // // GAIN (`trim` in the state) starts at the track's own auto gain (the DJ app's, `Track.auto_gain_db`; @@ -329,16 +332,16 @@ class Strip { mlB.connect(this.bands[1]).connect(eqOut) mhB.connect(this.bands[2]).connect(eqOut) - this.fx = new FilterFx(ctx) - eqOut.connect(this.fx.input) this.fader = ctx.createGain() - this.fx.output.connect(this.fader) + eqOut.connect(this.fader) + this.fx = new FilterFx(ctx) + this.fader.connect(this.fx.input) this.meter = ctx.createAnalyser() this.meter.fftSize = 512 - this.fader.connect(this.meter) + this.fx.output.connect(this.meter) this.xfade = ctx.createGain() this.wetGate = ctx.createGain() - this.fader.connect(this.xfade).connect(this.wetGate).connect(bus) + this.fx.output.connect(this.xfade).connect(this.wetGate).connect(bus) this.dryGate = ctx.createGain() this.input.connect(this.dryGate).connect(bus) } @@ -362,7 +365,7 @@ class Strip { } export interface MixerLevels { - /** Peak dBFS: each channel after its fader, and the master after the limiter. */ + /** Peak dBFS: each channel after its fader and FX, and the master after the limiter. */ A: number B: number master: number