- AmpVoicePedal class doc lists Fullerton Reverb as a subclass. - Ceiling test exercises the tremolo path (intensity/speed set). - amp-modeling-2.0-plan S2 notes the Fullerton Reverb full-surface block. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
6.9 KiB
ShoeGaze 2.0 — Amp Modeling Plan
Adds guitar-amp modeling to ShoeGaze. Core DSP primitives that don't yet exist land in Lyrebird and ship as Lyrebird 1.7; the amp pedals + UI land in ShoeGaze and ship as ShoeGaze 2.0.
Feasibility basis: the public literature is deep (WDF/DAFx for white-box, NAM/GuitarML for
black-box), and Lyrebird already provides most of the DSP (oversampling, waveshapers, the full
filter suite, SampleLoop per-sample feedback, partitioned FFT convolution via
ConvolutionReverb, WAV IR loading via LyrebirdBuffer.read(filePath:), and the
PhysicalModels precedent for nonlinear stateful per-sample DSP). The only genuine gap is a
real-time neural-inference kernel.
Versioning & repo strategy
- Lyrebird → 1.7.0 for every core addition. Dev repo is BitBucket (
origin, SSH); public release repo is mooo. Cut 1.7 once the needed core subset is merged tomain: RELEASES entry, tagv1.7.0, push BitBucket, then/lyrebird_release_prep→ commit/tag → push mooo (HTTPS, force-c http.version=HTTP/1.1— mooo's HTTP2 is flaky). - ShoeGaze → 2.0.0.
originis mooo (HTTPS). BumpPackage.swiftdependency tofrom: "1.7.0"once 1.7 is released; bumpMARKETING_VERSIONto2.0.0at the end. - Dev-time cross-repo: ShoeGaze work needing unreleased Lyrebird uses
swift package edit lyrebird --path <dev-repo>locally, then drops the override and bumpsfrom:after 1.7 ships. (Same flow used for the 1.6.4 work.)
Branch + review gates (apply to every feature below)
Lyrebird feature (feat/<name> off main):
swift testgreen.- Guards as applicable:
check-docc.sh,check-doc-snippets.sh; if a public generator init changes, regenerate the DSL registry and rungenerate-dsl-registry.sh --check. /lyrebird_reviewclean (no blocking findings) — re-run until clean.- FF/merge to
main. Append phase entry tophase_history.md.
ShoeGaze feature (feat/<name> off main):
swift testgreen./lyrebird_external_reviewclean (RT-safety on any new Generators).- Merge to
main.
New public RT generators require a deterministic input→output test (not just "not silent") — e.g. the Goertzel alias-ratio pattern used for the oversampled saturators.
Phase 0 — Decisions (no code)
- Neural kernel strategy: (a) hand-written Swift LSTM/GRU (Proteus-size), or (b) bridge
RTNeural (C++) via the existing
LyrebirdCtarget. Recommend (a) first — pure Swift keeps the Linux/Windows port intact (see the cross-platform feasibility work) and Proteus-size LSTMs are small. Keep (b) as an optional fast-path later. - White-box depth: full nodal/WDF vs static triode waveshaper + oversampling. Recommend static-waveshaper triode stages first (Koren/Dempwolf transfer curves), add a minimal WDF core later only if the voicing demands true bidirectional stages.
Lyrebird 1.7 — core additions
Only what has no existing primitive. Each is its own branch + /lyrebird_review.
- L1 · ToneStack generator (
feat/tonestack) — passive Fender/Marshall/Vox tone-stack IIR (Yeh coefficients), control-rate coefficient updates. Filters exist but not this specific topology as a first-class, model-selectable block. - L2 · Triode preamp stage (
feat/triode-stage) — nonlinear tube gain stage: bias + coupling cap + Koren/Dempwolf static curve, built-in 2×/4× oversampling (reuse the halfband primitives), grid-conduction asymmetry. The white-box building block. - L3 · Neural inference generator (
feat/neural-inference) — RT-safe LSTM/GRU (and later WaveNet) as aGeneratorBasesubclass: weights preloaded atinitinto pre-allocated matrices, alloc-free/lock-free per-sample matmul on the render thread (same discipline as the physical models). Plus a weight-container loader for NAM.nam/ Proteus JSON. - L4 · (optional) WDF core (
feat/wdf-core) — minimal wave-digital adaptors (series/parallel /R/C/diode + triode root with a bounded, alloc-free Newton solve). Defer unless L2 proves insufficient. - L0 · Verify, likely no-op: cabinet convolution + WAV IR loading already exist
(
ConvolutionReverb,LyrebirdBuffer.read). Confirm the convolver is comfortable with cab-length IRs (tens of ms) at low latency; only add a thin generalConvolutionalias if the reverb framing is awkward for cabs. Probably needs no 1.7 change.
Cut Lyrebird 1.7.0 after L1–L3 (and L0 if touched) are merged.
ShoeGaze 2.0 — amp pedals + UI
- S1 · Cabinet IR pedal (
feat/cabinet-pedal) — wrapsConvolutionReverb+ a bundled/loadable IR set + IR picker. No Lyrebird dependency change — ships on 1.6.4. Quick win; can land before 1.7. Pair with an oversampledWaveshaperfor an immediate amp-ish chain. - S2 · Component amp pedals (
feat/amp-component→feat/amp-voices, needs 1.7 L1+L2) — input → gain → oversampled triode stage(s) → tone stack → power-amp stage → cabinet IR. Shipped as dedicated amp-voice blocks — California (Fender-style, Bright shelf), British (Marshall-style, Presence shelf), Chime (Vox-style, Cut low-pass), and the full-surface Fullerton Reverb (blackface combo: spring reverb + tremolo + Bright switch) — rather than a single model-selector pedal, so each voice fixes its tone-stack model and exposes its own signature control. Shared base:AmpVoicePedal. - S3 · Neural amp pedal (
feat/amp-neural, needs 1.7 L3) — loads NAM/Proteus captures; model browser; DI-in → neural → (optional) cabinet IR. - S4 · Amp UI (
feat/amp-ui) — amp-head-style card: Gain, Bass/Mid/Treble/Presence, Master, Cab select, Model select; MIDI/CC mapping; largerwidthUnits. (Mind the flow-canvas height: no greedy verticalSpacers — see the looper fix.) - S5 · Rigs, presets, release — factory amp rigs; docs; bump dep to Lyrebird 1.7, app to 2.0.0; tag + push mooo (HTTP/1.1).
Suggested order
- S1 cabinet pedal (independent, ships on 1.6.4).
- Lyrebird 1.7: L1 tone stack → L2 triode → L3 neural (each branch + review); cut 1.7.
- ShoeGaze: S2 component amp, then S3 neural amp; S4 UI alongside; S5 release 2.0.
Risks / open items
- RT budget: stacked oversampled stages + convolution + neural can be heavy. Measure with the
CPU meter; consider
ParallelGroupfor independent chains. - Neural portability: Swift kernel preserves the cross-platform port; an RTNeural C++ bridge would not — decide in Phase 0.
- WDF Newton solve must be strictly alloc-free with bounded iterations to satisfy RT rules.
- Licensing: vet cab-IR and NAM-model licenses before bundling any factory content.
- Anti-aliasing: every nonlinear stage oversamples (the halfband primitives are proven); neural distortion aliases too — consider the fine-tuning / oversampling mitigations from the recent literature if artifacts appear.