Files
ShoeGaze/docs/plans/1.1-sustainer-pedal.md
T
josh 9bc049d8a3 Add 1.1 feature plans + ShoeGaze CLAUDE.md (mandatory pedal summary)
docs/plans: chorus (stereo), sustainer, ring modulator, and pedal-info UI.
CLAUDE.md: project conventions + a required checklist for new pedals, including
a mandatory user-facing summary used by the pedal-info UI.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 17:44:47 -07:00

34 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 1.1 — Sustainer pedal
A one-knob sustain: heavy compression + makeup gain to hold notes, distinct from the
`Compressor` pedal (which exposes threshold/ratio directly).
## Implementation
`Sources/LyrebirdShoeGaze/Pedals/SustainerPedal.swift`
- `effect`: `Compressor.Audio(in: dry, threshold:, ratio:, attack: ~0.005,
release: ~0.4, kneeWidth: 0, makeupGain:)`.
- **`sustain` knob (0–10, def ~5)** — the single perceptual control. Maps internally:
- threshold: `-6 dB → -36 dB` as sustain rises
- ratio: `2 → 10`
- makeupGain: tracks the added gain reduction (so output stays even)
Implement the map with `LinLin` on the `$sustain` node (or fold into Compressor's
`ValidGeneratorInput` params via arithmetic on `$sustain`).
- **`tone` knob (optional)** — `RBJLowPass.Audio(input:, freq: $tone, q: 0.707)` to round the squashed top end. Range ~800–8000 Hz.
- `level` (inherited) for output trim. `initialMix` = 1.0 (in-line).
- **Stretch — floor/gate:** reuse the NoiseGate idea (`AmplitudeFollower` → `Schmidt` →
`LinLin` floor → `Lag` → ×) so infinite sustain doesn't surface hiss. Optional knob
`floor`, or a fixed gentle gate. Defer if it complicates the one-knob feel.
## Wiring
- `PedalRegistry.builtIn["Sustainer"] = { SustainerPedal() }`
- `PedalType.sustainer = PedalType("Sustainer")`
- enclosure color, palette order (near Compressor / Limiter)
- `summary` override
## Tests (`Tests/LyrebirdShoeGazeTests/SustainerPedalTests.swift`)
- builds + non-silent
- sustain knob changes dynamics: low vs high sustain → measurable RMS/level difference on
a decaying input window
- knob list assertion