Commit Graph

9 Commits

Author SHA1 Message Date
josh e8e134499d Add macOS New/Save Rig menu items and save-on-switch prompt
- macOS File menu gains New Rig (⌘N) and Save Rig (⌘S), which forward to
  the in-window builder via shoeGazeNewRig / shoeGazeSaveRig notifications
  so the naming prompt and current-rig highlight update correctly.
- Selecting a different rig while the current one has unsaved changes now
  prompts Save / Don't Save / Cancel (both platforms). Dirtiness is
  captureState() != the loaded entry's state; a backing-less working rig
  with boards counts as dirty.
- Generalize saveCurrentRig to take a completion (used by Save & Clear and
  by save-then-switch).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 18:04:55 -07:00
josh dc42db0c59 Add iCloud-synced rig library
Replace the single hand-saved rig file with a managed library of named
rigs persisted in app storage and synced across devices and both builder
apps via a shared iCloud container (iCloud.net.realizedsound.ShoeGazeData),
falling back to local storage when iCloud is unavailable.

Core (LyrebirdShoeGaze/Presets):
- RigEntry: named, timestamped ShoeGazeState (a whole multi-board rig).
- RigArchive: portable multi-rig JSON bundle for backup/transfer; legacy
  single-rig files import as a one-rig archive.
- RigLibraryStore (@MainActor @Observable): one JSON file per rig, with
  NSFileCoordinator writes and NSMetadataQuery live remote-change watching.
- RigLibraryLocation: iCloud-or-local directory resolver (skips the slow
  ubiquity lookup when no iCloud account is signed in).
- ShoeGaze.loadRig(from: ShoeGazeState) + captureEntry; shared filename
  sanitizer factored out of BoardVersionStore.

UI (LyrebirdShoeGazeUI):
- RigLibrarySidebarView: persistent left listing with new/save/save-as/
  duplicate/rename/delete/erase-all and archive import/export.
- RigNamePrompt; RigLibraryBootstrap one-call shell setup.
- ShoeGazeBuilderView: sidebar wired in; selecting a rig replaces the
  session; File menu / sidebar do whole-library archive import/export.

Shells/entitlements: both builder targets own+start the store and carry
the iCloud Documents entitlement; NSUbiquitousContainers exposes the rigs
in the Files app. (macOS pbxproj also carries a pre-existing 1.0->1.1.1
version bump.)

Tests: RigEntry/RigArchive round-trip + RigLibraryStore CRUD/import/export
(15 new; full suite 206 passing).

Provisioning (manual, not done here): enable the iCloud container on both
App IDs and select it in Signing & Capabilities for both targets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 17:56:10 -07:00
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
josh b1303a25ae Add README screenshots (builder + board mixer)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 16:10:58 -07:00
josh 21fda7067d Expand README with project overview, pedal catalog, and screenshots
Replace the one-line description with a full README: feature list, the 18-pedal
catalog by category, requirements, products, getting-started snippets (headless
+ SwiftUI builder), demo-app guide, and a Screenshots section wired to
docs/images/ (relative paths render on the git host and in clones).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 14:59:04 -07:00
josh 712f049f96 Serialize split-region topology in presets
Replace the flat per-board pedal list with an ordered [BoardSegmentState]
(pedal | parallel | stereoSplit | mergeToMono) so parallel and stereo
split regions — branch pedal chains plus SplitMode/StereoRoute — round-trip
through saveRig/loadRig and rebuildBoard.

- PedalBoard.orderedSegments tracks chain structure (add/split/splitStereo/
  mergeToMono); captureState() walks it; rebuildSegments() replays it.
- BoardState backward-compatible: decodes legacy flat `pedals` arrays;
  computed `pedals` exposes the linear subset; throws on a file missing both
  keys. BoardSegmentState wire discriminators documented.
- applyState (lightweight recall) extended to branch pedals + routing modes.
- Unknown pedal types skipped on load, including inside branches.
- Tests: parallel / stereo / mergeToMono file round-trips, legacy decode,
  unknown-pedal-in-branch, branch-param recall. Suite 116/116; demo builds.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 17:12:46 -07:00
josh d5b17b7663 Update stereo-routing doc: demo .stereo mode done
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 16:57:18 -07:00
josh 30e96b8ee1 Add stereo-routing SwiftUI views
- StereoRouteControlView: 4-way StereoRoute segmented selector + L/R/DRY
  source LEDs, bound to StereoSplitSection.route (observes collector gains).
- StereoSplitSectionView: route control + L/R branch pedal rows.
- StereoWidthBadge: MONO/STEREO pill from PedalBoard.width.
- Expose StereoSplitSection.collector publicly for UI observation.
- Document UI + preset scope in stereo-routing-design.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 16:53:55 -07:00
josh f89229282f Add mono→stereo routing to PedalBoard
Introduce chain width propagation (mono=1 / stereo=2, capped at 2),
represented as a pair of mono buses to reuse existing infrastructure.

- Pedal: width-parameterized build() with channelKind (mono / widener /
  stereoNative); effect() runs per channel for auto-stereoize, shared knobs.
- PedalBoard: width tracking, add() dispatch, mergeToMono(), splitStereo()/
  collectStereo() with four route modes (stereo / leftOnly / rightOnly /
  bypass), centered solo, click-free lagged gains.
- BoardOutputMaster: width-aware (Pan2 mono, direct L/R stereo).
- New routing nodes: StereoSplitter, StereoRouteCollector, StereoSplitSection.
- Reference pedals: OctaveUpSplitterPedal (widener), PingPongDelayPedal
  (stereo-native).
- 12 stereo-routing tests; full suite 108/108.

Design: docs/stereo-routing-design.md

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 16:48:25 -07:00