- 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>
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>
Persistence (macOS + iOS):
- RigStore autosaves the rig (rigData JSON) to Application Support and restores
it on launch. App models restore-or-seed at init; macOS saves on terminate +
resignActive, iOS saves on scenePhase leaving .active. The builder also
autosaves after structural edits (add board/pedal, load, clear).
Clear (both platforms):
- A Clear button in the builder opens a confirmation dialog: Save & Clear /
Clear Without Saving / Cancel. Clear removes all boards and seeds one fresh
empty board, then autosaves. Save & Clear triggers the save mechanism and only
clears once the save completes (cancelling the save leaves the rig intact).
- The rig-save exporter is now cross-platform (was iOS-only) so Save and the
Save & Clear flow work on macOS too; macOS keeps its File-menu Load.
Tests: RigStore save/restore round-trip across instances; restore is a no-op
with no autosave. 186 tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pedals (each registered, with PedalType static, enclosure color, palette order,
summary, and tests):
- Chorus: true-stereo widener (two anti-phase modulated delay lines), distinct
from the mono-summed Modulation chorus.
- Sustainer: one-knob compressor (sustain drives threshold/ratio/makeup via
LinLin) + tone low-pass.
- Ring Modulator: dry × tunable sine carrier.
Pedal-info UI:
- Pedal.summary (open var, overridden by all 21 pedals; mandatory going forward).
- PedalRegistry.summary(for:) for the picker.
- PedalPaletteView rows show the summary as a subtitle.
- PedalView gains an ⓘ button → PedalInfoView sheet showing the description and
the effect controls (knobs/sliders/switches) with ranges/options — excludes
the common Mix/Level/bypass.
Tests: per-pedal build/param-change/knob-list; every built-in pedal has a
non-empty summary; info excludes common controls. 183 tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rename the user-facing 'Mu-Tron' pedal to the non-proprietary 'Mutant':
displayName, registry key, PedalType.mutant, enclosure color, palette order,
and the class (MuTronPedal -> MutantPedal) + test file. The underlying Lyrebird
MuTronIII generator (and its Mode/Sweep types) keep their names — that's the
dependency's DSP type, not user-facing.
Note: displayName doubles as the rig-save key, so rigs saved with 'Mu-Tron'
won't match on load (acceptable pre-1.0; nothing released).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
appendPedal(type: String, to:) is replaced by appendPedal(_ kind: PedalType, to:),
where PedalType is an extensible RawRepresentable struct with static members for
the built-in pedals:
try shoeGaze.appendPedal(.overdrive, to: board)
Discoverable/autocompleting call sites, still open for custom pedals
(PedalType("My Pedal")). rawValue == the pedal's displayName, so PedalRegistry
and the rig JSON format are unchanged — saved rigs load exactly as before.
Named PedalType (not PedalKind) to avoid colliding with Lyrebird's score-notation
PedalKind enum, which is visible when both modules are imported. The UI palette
wraps its registry-key strings as PedalType(key); demos/tests use the static
members. PedalRegistry.makePedal(type:) stays string-keyed as the serialization
boundary used by loadRig.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Five presentation modifiers (.sheet, .alert, two .fileImporter, .fileExporter)
were stacked on the builder's root view. SwiftUI reliably drives only one
presentation per view node, so adding the Boards .sheet swallowed the iOS rig
Load importer — the Load button toggled its flag but no picker appeared. Move
each presentation onto its own Color.clear background anchor so they no longer
collide.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- moveBoard/removeBoard now keep activeBoardIndex pointing at the soloed board
(track by identity on move; shift down or clear on remove), so the Solo
highlight no longer lights the wrong cell after reorder or delete.
- rebuildWithLiveInput snapshots the rig before any teardown and aborts if the
snapshot fails, instead of tearing down then seeding a fallback (no silent
rig loss). The engine-already-has-input early return now also persists the
live-input selection, via a shared selectLiveInputAndPersist helper.
- Test: activeBoardIndex tracks reorder and removal.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Construct the iOS engine with one input channel by default so live input is
available immediately and the In: stepper reads 1. Trade-off: iOS prompts for
microphone access at the first Start even while input defaults to test loop.
The permission-gated enableLiveInput() rebuild stays in place for any future
input-less configuration.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Live input on iOS needs an input channel, but constructing the engine with one
up-front makes iOS prompt for the microphone at the first Start even in
test-loop mode. Instead the engine starts input-less (no prompt) and is rebuilt
on demand:
- ShoeGazeBuilderView gains an optional onEnableLiveInput hook. When the user
picks live input but the engine has no input channel, the picker offers a
"Live Input" option that calls the hook; the input binding routes there too.
On macOS (engine already has an input channel) the hook is nil and live input
is selected directly.
- The iOS app model implements the hook: request mic access, then on grant
snapshot the rig (rigData), stop + teardown the engine, rebuild it with one
input channel, restore the rig (loadRig), and select live input. The new
ShoeGaze is published so the @Observable host view re-binds.
- Input persistence restores live on relaunch: a saved live choice with the mic
already authorised triggers the same rebuild silently (no prompt).
Test: a rig captured on a 0-input engine restores onto a freshly built 1-input
engine and live input is then selectable.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Boards sheet (BoardsSheetView): rename, drag-reorder, swipe-delete, plus
per-board enable/solo/level and a Solo/Blend + crossfade header. Opened from a
"Boards…" button in the builder; presented with medium/large detents on iOS.
Makes ShoeGaze.moveBoard public to back the reorder.
Keyboard switching: hidden ⌘1…⌘9 buttons in the builder solo (live-switch to)
the matching board and select it as the edit target.
Unified player: ShoeGazeView drops its bespoke Active picker + crossfade field
and hosts the shared BoardBarView, matching the builder.
Input persistence: the builder saves the input choice (test loop vs live
channel) to UserDefaults and restores it on appear. With no saved choice it
defaults to live input when the mic is already authorised and an input channel
exists, else stays on the test loop. The iOS builder now opens one input
channel so live input is actually available there.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The board bar and scope/CPU layout already flow to iOS via the shared
ShoeGazeBuilderView. Restrict both iOS apps to iPad (TARGETED_DEVICE_FAMILY=2),
landscape-only orientations, and UIRequiresFullScreen so the wide builder
layout always has the room it needs.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add an AppIcon asset catalog to ShoeGazeBuilder, ShoeGazeDemo,
ShoeGazeiOSDemo, and ShoeGazeBuilderiOS, wired via
ASSETCATALOG_COMPILER_APPICON_NAME. macOS apps use the full 16–512
@1x/@2x icon set with the framed rounded-tile artwork; iOS apps use a
single 1024 universal icon with the white frame flood-filled to a
full-bleed teal so it reads correctly under the iOS corner mask.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ShoeGazeBuilder already carries the development team; the other three signed
ad-hoc (DEVELOPMENT_TEAM = ""), so every rebuild produced a new code hash and
TCC logged a fresh microphone permission row. Set DEVELOPMENT_TEAM =
HE5VJFE9E4 on all three so rebuilds reuse one signing identity and stop
stacking duplicate privacy entries.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Live input was silent on macOS because the apps ran under hardened runtime
without the microphone entitlement, so AUHAL input received silent zeros and
the OS never prompted. Fixes:
- Add com.apple.security.device.audio-input entitlement to the macOS Builder
and Demo apps (CODE_SIGN_ENTITLEMENTS wired in both targets).
- Add MicrophonePermission helper (AVCaptureDevice.requestAccess) and gate
live-input selection through it in the Builder view and Demo controller;
deny falls back to the test loop with an explanatory alert.
- Fix ShoeGazeDemo inputChannels 6 -> 1 (built-in mics are mono; 6 made
CoreAudio deliver silence).
Engine-config review fixes:
- installScopeTap now requires the engine stopped (precondition) and
reconfigureEngine reinstalls the tap on every exit path via defer, so
engine.scopeTap never points at a stale channel layout.
- EngineConfigView stops the engine on a post-start (iOS) sample-rate
mismatch instead of running pitch-shifted, and surfaces non-mismatch
start errors through the alert.
- Remove redundant installScopeTap call in the demo controller (ShoeGaze.init
already installs it).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Wires the existing ShoeGaze recording engine into the builder:
- macOS: a Record menu (Choose Recording Folder…; Start/Stop Recording,
⇧⌘R) in the app shell's AppDelegate. validateMenuItem gates Start on a
chosen folder and flips the title; the title is also set directly in
the toggle action so it never goes stale.
- iOS: an in-view recording row in ShoeGazeBuilderView — folder picker
(.fileImporter with security-scoped access) + Record/Stop button,
gated on a chosen folder.
- Both: a red REC indicator in the transport header bound to isRecording.
Reuses startRecording/stopRecording/recordingFolder/isRecording (already
covered by RecordingTests); no core or RT changes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Info.plists: "Realized Sound" -> "realizedsound" in the copyright string
(all four demo apps).
- macOS: Save/Load now live in a File menu (Save Rig… ⌘S, Load Rig… ⌘O)
and a Board menu (Add Board ⌘B, Start ⌘R, Stop ⌘.) in the app shell's
AppDelegate; the in-view Save…/Load… buttons and their NSPanel code are
now iOS-only (#if !os(macOS)), with iOS keeping fileExporter/Importer.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two thin app shells hosting ShoeGazeBuilderView:
- macOS (AppKit): seeds one board with an Overdrive; anchors the window
~100px from the left of the visible screen and sizes it to most of the
screen height via LyrebirdWindow.nsWindow.
- iOS (SwiftUI): NavigationStack hosting the builder; AVAudioSession +
iOSAudioDriver; logs session-activation failures.
Both .xcodeproj reference the local package (..) + the remote Lyrebird
package, with fresh hex object-id prefixes; added to ShoeGaze.xcworkspace.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
New DemoMode.stereo: Overdrive → splitStereo(Delay | Ping-Pong) →
collectStereo, finalized to stereo output. DemoRootView renders the
pre-split board + StereoWidthBadge above StereoSplitSectionView, so the
four StereoRoute modes are selectable live. No new files / no .pbxproj
change — the demo already links LyrebirdShoeGazeUI. BUILD SUCCEEDED.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two envelope filters and two delays, registered in PedalRegistry and
showcased on demo Board 3.
- Mu-Tron: wraps the MuTronIII generator; three parallel LP/BP/HP
instances switched live by a Select on the mode knob so filter state
stays warmed across mode changes. Knobs: Mode, Sensitivity, Resonance.
- Auto-Wah: explicit amplitude-tracking chain — AmplitudeFollower scaled
by sensitivity, clamped, mapped through LinExp to a swept SVF bandpass.
Knobs: Sensitivity, Resonance, Range.
- Feedback Delay: DelayLineFeedback (cubic) into an RBJ lowpass for a
darker, tape-style multi-repeat echo. Knobs: Time, Feedback, Tone.
- Multi-Tap Delay: three non-feedback DelayLine taps summed, per-tap
volume folded into each tap's mul. Six knobs in two rows of three.
Bumps the Lyrebird dependency to 1.2.0 for the MuTronIII/SVF generators.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>