9bc049d8a3
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>
3.3 KiB
3.3 KiB
ShoeGaze — Claude Context
A virtual guitar-pedalboard framework built on Lyrebird. Two products:
LyrebirdShoeGaze (core pedal/board framework, no SwiftUI) and LyrebirdShoeGazeUI
(SwiftUI views). Depends on the published Lyrebird package.
Conventions
- MIT SPDX header on every new
.swiftfile (first 5 lines): file name,// Lyrebird, blank comment,// Copyright (c) 2026 Joshua Parmenter / realizedsound,// SPDX-License-Identifier: MIT, then a blank line. - Explicit type annotations on
let/varbindings, named constants for non-trivial literals, doc comments on public init params — matches the Lyrebird house style. - Pedals subclass
Pedal(inSources/LyrebirdShoeGaze/Pedals/), expose parameters as@UIParam, and surface them viaeffectKnobs/effectSwitches/effectSliders. - A pedal's
displayNameis its serialization key and itsPedalType.rawValue, and thePedalRegistry.builtInkey. Keep all three identical when adding a pedal.
Adding a new pedal — required checklist
Sources/LyrebirdShoeGaze/Pedals/<Name>Pedal.swift— subclassPedal, overrideeffect(orwideEffect/stereoEffect),effectKnobs/effectSwitches/effectSliders.summary— overrideopen var summary: Stringwith a one-line, user-facing description. This is mandatory for every pedal (see "Pedal info" below).- Register in
PedalRegistry.builtIn["<DisplayName>"]. - Add
PedalType.<name> = PedalType("<DisplayName>"). - Enclosure color case in
PedalView.enclosureColor(for:). - Add to
PedalPaletteView.preferredOrder. - Tests in
Tests/LyrebirdShoeGazeTests/<Name>PedalTests.swift— at minimum: builds + non-silent, each effect parameter measurably changes the output, knob-list assertion, and (if it has switches/sliders) a preset round-trip. - Use
PedalTypestatic members at call sites (appendPedal(.overdrive, to:)), never raw strings, except where a string is inherently dynamic (registry / preset load).
Pedal info (mandatory)
Every pedal participates in the pedal-info UI:
summary(required): a short, non-proprietary, user-facing sentence describing what the pedal does. The picker shows it as a subtitle; the pedal's ⓘ info panel shows it as the description. A new pedal without a non-emptysummaryis incomplete — a test asserts every registered pedal has one.- The info panel lists the effect controls only (
effectKnobs+effectSliders+effectSwitches) with their ranges/options — never the common Mix / Level / bypass. Put the meaningful range and a clear unit in each control'slabel/rangeso the info panel reads well.
dB parameters
There is no dB→linear generator for a control-rate node. To apply a dB gain to a signal,
convert in the graph: Exp.Audio($gainDB * dbToLinExpScale) where
dbToLinExpScale = ln(10)/20 ≈ 0.11512925464970229 (gives 10^(dB/20)). RBJ shelving/peaking
filters take gain in dB directly, so pass dB nodes straight through.
Build / test
- Package:
swift build/swift test --no-parallel(the multi-engine suite can hit Lyrebird's parallel-teardown flake without--no-parallel). - Apps:
Demo/ShoeGaze.xcworkspace(macOS builder, iPad builder, demos). iOS targets are iPad-only, landscape.
Planned work
docs/plans/ holds the next-version feature plans.