Commit Graph

12 Commits

Author SHA1 Message Date
josh 850b86209a fix(shimmer): lower default + starter decay/shimmer to avoid self-oscillation
The shimmer reverb's regenerating loop gain is ~decay + shimmer, so hot
values screech into sustained feedback with little or no input. The pedal
defaults summed to 1.3 (0.8 + 0.5) — over unity on a fresh add — and several
starter rigs ran 1.3–1.6.

- Pedal defaults: decay 0.8 -> 0.5, shimmer 0.5 -> 0.25, damp 0.4 -> 0.5
  (sum 0.75), with a doc note on keeping decay + shimmer < 1.
- Starter rigs using it (Dreampop Chorus Cathedral, Ambient Shimmer Bed,
  Post-Rock Crescendo, Comfortably Numb Lead): decay/shimmer pulled down so
  each sums to ~0.8 or less; damping raised. Bumped seedVersion to 4 so
  existing libraries refresh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-12 14:59:58 -07:00
josh 2aea609f34 feat(rigs): ship the tweaked Garcia rig as a captured state
Replace the code-built Garcia with the user's hand-authored version,
transcribed verbatim as a ShoeGazeState: Board 1 (Bass Octaver, Mutant,
Overdrive, Graphic EQ, Phaser, Delay, Fullerton Reverb) and Board 2
(Overdrive, Graphic EQ, Compressor, Fullerton Reverb), preserving exact mix,
graphic-EQ slider, cab-selector and amp sag/bias values. Input source and
channel counts are omitted so the rig stays input-agnostic.

Adds a FactoryRigBuild.state case (and matching FactoryRig init) for rigs
shipped as a pre-captured state rather than a live builder, and bumps
seedVersion to 3 so existing libraries refresh Garcia to the new version.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-10 17:04:58 -07:00
josh 5decdd8693 fix(rigs): refresh stale starters on update; tab follows current rig
- Seeding now (re)installs every starter by stable id, so a corrected rig
  definition replaces the stale copy already in a library (save upserts by
  id, keeping its position) — user rigs untouched. Bumped seedVersion to 2
  so existing libraries pick up the two-board Garcia rig (the old router
  version showed "No board at index 0" because the builder UI renders boards,
  not routers, and the stale entry was never refreshed). "Restore Starter
  Rigs" likewise refreshes all starters, not just missing ones.
- The Mine/Starters toggle now opens on the group containing the currently
  loaded rig (Starters when a factory rig like Garcia is active, else Mine),
  and follows the selection when the current rig changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-09 17:57:57 -07:00
josh 132515b4cd fix(rigs): address starter-rig feedback (toggle, Garcia, shimmer, input)
- Center the Mine/Starters toggle in the sidebar column.
- Garcia rig: build it as two plain boards (effects + clean) selected via
  the multi-board Solo/Blend control, instead of a ChainRouter — the builder
  UI renders boards, not routers, so the router version showed empty boards.
- Dreampop Chorus Cathedral: lower shimmer decay/feedback and delay feedback
  so the octave-up regeneration no longer screeches into runaway feedback.
- Preserve the current input across rig switches: loadRig gains a
  keepingCurrentInput flag (default false → file open / launch restore still
  apply the rig's saved input; RigStore session-restore continuity intact),
  and the rig-switch path (loadEntry) passes true so a live guitar isn't
  snapped back to the test tone when changing rigs. Tests updated to cover
  both directions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-09 14:36:49 -07:00
josh ad6ed41674 feat(ui): Mine/Starters rig toggle + seed starters into existing libraries
Two fixes so shipped starter rigs are actually reachable:

- Seeding no longer requires an empty library. On launch it installs any
  factory rigs whose stable ids are missing, once per FactoryRigLibrary
  .seedVersion (a per-device UserDefaults marker). Existing users therefore
  receive the starters on their next launch; a starter the user later
  deletes stays deleted (the marker has advanced); bumping seedVersion when
  new starters ship re-runs catch-up for just the new ones. Idempotent by id,
  so iCloud-synced devices never duplicate.
- Sidebar gains a segmented Mine / Starters toggle. "Mine" is the flat,
  reorderable user list; "Starters" groups the shipped rigs by category. A
  "Restore Starter Rigs" action (Starters empty-state button + library menu)
  re-installs missing starters on demand via RigLibraryBootstrap.restoreStarterRigs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-09 14:11:22 -07:00
josh fba32ff0aa feat(ui): group factory rigs by category in the rig sidebar
The rig-library sidebar now presents shipped starter rigs under their
FactoryRigCategory headers (Shoegaze Walls, Dreampop, Classic, Ambient,
Experimental) in fixed catalog order, with the user's own rigs under a
"My Rigs" header. Starter rows show a "Starter rig" subtitle and are not
reorderable; user rows keep drag-to-reorder and Move Up/Down (now scoped to
the user's own rigs). Grouping is presentational, so it stays correct
regardless of underlying library order.

Adds FactoryRigLibrary.category(for:) and rigs(in:) with tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-09 13:53:56 -07:00
josh 7dccf596f4 feat(rigs): persist chain routers + add Garcia two-board split rig
Add ChainRouter persistence so routed multi-board rigs survive save/load —
previously captureState/loadRig only handled plain boards, so any A/B router
rig was silently lost on save (a latent gap this fixes for user rigs too).

- New ChainRouterState (Codable): each router's two linear branches as
  [PedalState] plus splitter branch levels and merger output levels.
- ShoeGazeState gains an additive `routers` field decoded with
  decodeIfPresent (nil for old rigs) — no format-version bump; routerless
  rigs stay byte-identical (nil, not []).
- captureState snapshots routers; rebuildAllBoards reconstructs each via
  makeChainRouter/addTo{A,B}/finalize and restores the blend.

FactoryRig gains a session-scoped builder variant (FactoryRigBuild enum) so
a rig can create its own boards/routers; makeEntries branches on it.

Ships the Garcia OBEL Clean/Effects Split: an effects/lead board (octave,
envelope filter, overdrive, phaser, delay, amp) vs a clean direct board,
selectable via the router — showcasing the multi-board capability.

Tests: full router capture -> JSON -> load round-trip with structure and
branch-level assertions plus a render check, backward-compat (no routers
key when routerless), and the Garcia rig via the factory load+render suite.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-09 13:19:42 -07:00
josh 75b99a547b feat(pedals): add Sustain Fuzz pedal + Gilmour/doom rigs
New "Sustain Fuzz": a mid-scooped, high-sustain fuzz distinct from the
single-stage Fuzz. Two cascaded soft-clip (softClipNormalized) stages
compress and stack harmonics for smooth violin-like sustain; a fixed
midrange scoop (RBJPeakingEQ cut at 750 Hz) hollows the mids; a tone
low-pass sets the top end. Sustain/Tone/Scoop knobs. Composed in effect(),
no new RT generator.

Registered in PedalType/PedalRegistry, enclosure colour, palette order.
Tests cover build+non-silent, each knob changing output, knob listing,
preset round-trip.

Adds two factory rigs: Comfortably Numb Lead and Doom Riff Wall.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-09 13:10:16 -07:00
josh 965633de34 feat(pedals): add Vibe pedal + Psychedelic Vibe Lead rig
New "Vibe" pedal: a photocell-style vibe built as four staggered all-pass
stages swept by one shared sine LFO (unequal centre frequencies give the
uneven, vocal throb that distinguishes a vibe from a phaser). Speed and
Intensity knobs, Chorus/Vibrato mode switch (chorus blends dry+swept,
vibrato passes swept only). Composed from RBJAllPass in effect(), mirroring
PhaserPedal — no new RT generator.

Registered in PedalType/PedalRegistry, enclosure colour, and palette order.
Tests cover build+non-silent, each control measurably changing output, the
knob/switch listing, and preset round-trip.

Adds the Psychedelic Vibe Lead factory rig (Fuzz -> Vibe -> Delay -> Plate).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-09 13:06:17 -07:00
josh 779c55493d feat(rigs): add six more single-board starter rigs
Extend the factory catalog from 8 to 14 using existing pedals: Funk
Envelope Clav, Nashville Clean Comp, Rockabilly Slapback (classic),
Post-Rock Crescendo, Dub Delay Throw (ambient), and Ring-Mod Texture
(experimental). All build/load/render green via the existing tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-09 12:58:23 -07:00
josh bb418ca2e8 feat(rigs): confirm before overwriting a built-in factory rig
Saving over a currently-loaded factory rig now shows a confirmation dialog
instead of silently replacing the shipped original: Overwrite (destructive),
Save as New Rig… (new id, keeps the original), or Cancel. The pending
follow-up (e.g. the Save & Clear clear step) is threaded through all three
paths.

Adds FactoryRigLibrary.factoryIDs / isFactory(_:) so the UI can tell a
shipped rig from a user rig by id, with a test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-09 12:42:03 -07:00
josh 4eb1cbdd61 feat(rigs): ship built-in factory starter rigs
Add a factory rig library: 8 curated starter pedalboard rigs seeded into
an empty rig library on first launch. Rigs are compile-checked builders
(construct concrete pedals, set typed @UIParam values, board.add) rather
than hand-written JSON, so a renamed pedal control is a build error, not a
silently corrupted preset.

Seeding builds each rig in a throwaway offline (never-started) engine,
captures a RigEntry with a stable per-rig UUID (idempotent re-seed), and
saves to the store. Bootstrap rolls back this run's saves if any store.save
fails, so a partial library can't freeze future seeding (gated on isEmpty).

Rigs are named/described by sound, not trademarked products or artists; a
test guards against brand names leaking into names/blurbs. Full ship-path
test loads and renders every rig to non-silent output.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-09 12:37:34 -07:00