# 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 `.swift` file (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`/`var` bindings, named constants for non-trivial literals, doc comments on public init params — matches the Lyrebird house style. - Pedals subclass `Pedal` (in `Sources/LyrebirdShoeGaze/Pedals/`), expose parameters as `@UIParam`, and surface them via `effectKnobs` / `effectSwitches` / `effectSliders`. - A pedal's `displayName` **is** its serialization key and its `PedalType.rawValue`, and the `PedalRegistry.builtIn` key. Keep all three identical when adding a pedal. ## Adding a new pedal — required checklist 1. `Sources/LyrebirdShoeGaze/Pedals/Pedal.swift` — subclass `Pedal`, override `effect` (or `wideEffect`/`stereoEffect`), `effectKnobs`/`effectSwitches`/`effectSliders`. 2. **`summary`** — override `open var summary: String` with a one-line, user-facing description. **This is mandatory for every pedal** (see "Pedal info" below). 3. Register in `PedalRegistry.builtIn[""]`. 4. Add `PedalType. = PedalType("")`. 5. Enclosure color case in `PedalView.enclosureColor(for:)`. 6. Add to `PedalPaletteView.preferredOrder`. 7. Tests in `Tests/LyrebirdShoeGazeTests/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. 8. Use `PedalType` static 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-empty `summary` is 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's `label`/`range` so 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.