diff --git a/plans/audio-fx-ux/README.md b/plans/audio-fx-ux/README.md index 90335f3c09..50d5a45199 100644 --- a/plans/audio-fx-ux/README.md +++ b/plans/audio-fx-ux/README.md @@ -97,6 +97,35 @@ property print as their escape sequence on the page. This cost three rounds of chasing what looked like three unrelated rendering bugs. The template is a plain literal; keep it that way, and use HTML entities for typographic characters. +## Proposed: a multi-band EQ ("Tone") + +The clearest failure this exercise surfaced is a rack holding two *Shape One +Range* modules doing different jobs. A multi-band EQ is the answer, and it is a +better one than a role label because an author already understands it: bass, +middle, treble is the most widely used audio control there is. + +**Its bands can be the shared vocabulary.** Three bands are Bass / Middle / +Treble; five open up to Bass / Warmth / Middle / Clarity / Air. So using the EQ +teaches the words the rest of the rack relies on, instead of the vocabulary +living only on a ruler somebody has to read. + +**Built like the carve, not like a new effect.** Carve already owns several +tagged nodes and presents as one module (`fromCarve`, filtered out of the +hand-built list). An EQ does the same with `fromEq`: three bands are a low +shelf, a peaking and a high shelf — all effects that already ship. Nothing new +in the render, nothing new in the graph, and the nodes stay ordinary, so an +author who opens the details finds exactly the filters they could have added by +hand. + +The registry's parameter model is flat key/value, so an `eq` effect *type* with +N bands would need array-shaped params it does not support. The composite-module +route avoids that entirely and is the pattern this codebase already proved. + +Faders rather than sliders, because a row of vertical faders around a centre +detent is what an equaliser looks like to everyone who has met one. Collapsed, +it reads like every other module: "Bass +3, Middle −2, Treble +2", or "Flat" +when nothing has been touched. + ## What still needs deciding - Does the plain name **replace** the DSP name or sit beside it? Replacing is diff --git a/plans/audio-fx-ux/build-preview.mts b/plans/audio-fx-ux/build-preview.mts index 163f8fde8b..6073c75ac1 100644 --- a/plans/audio-fx-ux/build-preview.mts +++ b/plans/audio-fx-ux/build-preview.mts @@ -210,6 +210,72 @@ const statesGrid = [ stateSpecimen("peaking", { frequency: 400, gain: -8.2, q: 1.4 }, { label: "Measuring", smart: true, locked: true, note: "A smart module analysing. The rack locks while it works — nothing here can be edited into an inconsistent state." }), ].join(""); + +/* ---- the module that should exist: a multi-band EQ ---------------------- */ +type Band = { name: string; hz: number; gain: number; kind: string }; +const EQ3: Band[] = [ + { name: "Bass", hz: 200, gain: 3, kind: "lowshelf" }, + { name: "Middle", hz: 1000, gain: -2, kind: "peaking" }, + { name: "Treble", hz: 4000, gain: 2, kind: "highshelf" }, +]; +const EQ5: Band[] = [ + { name: "Bass", hz: 160, gain: 2, kind: "lowshelf" }, + { name: "Warmth", hz: 350, gain: -3.5, kind: "peaking" }, + { name: "Middle", hz: 1000, gain: 0, kind: "peaking" }, + { name: "Clarity", hz: 3000, gain: 2.5, kind: "peaking" }, + { name: "Air", hz: 9000, gain: 1.5, kind: "highshelf" }, +]; + +/** Faders, because a row of them IS what an equaliser looks like to everyone. */ +function eqFaders(bands: Band[]) { + return bands + .map((b) => { + // -12..+12 dB across the fader; centre is flat. + const pct = 50 - (b.gain / 24) * 100; + const on = Math.abs(b.gain) > 0.05; + return `
${esc(label)}
${note}
+ A rack can currently hold two Shape One Range modules doing different jobs, which is + the clearest failure on this page. A multi-band EQ collapses them into one module an author + already understands — and its bands can be the shared vocabulary, so using it + teaches the words everything else uses. +
++ Built the way the carve already is: one module owning several tagged nodes rather than a new + DSP primitive. Three bands are a low shelf, a peaking and a high shelf — effects that + already ship. Nothing new to render, and the nodes stay ordinary, so an author who opens the + details finds the same filters they could have added by hand. +
+