Commit Graph

44 Commits

Author SHA1 Message Date
josh b4b2f58762 Compact board mixer bar; align scope/CPU to palette width
Shrink BoardBarView to a fixed-height single horizontal scroll group with a
tighter two-row control column, so it wraps its elements and frees vertical
canvas for the pedals. Constrain the scope and CPU-meter views to the pedal
palette width, left-aligned, so they sit under the palette column.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 17:14:04 -07:00
josh c0605d295d Add board mixer bar UI + independent per-board audibility API
Multi-board playback was all-or-one: selectBoard soloed exclusively,
selectAllBoards summed. There was no way to play an arbitrary subset, and
the builder only exposed a dropdown that picked which board to *edit*.

ShoeGaze API:
- setBoard(_:audible:crossfadeSeconds:) toggles one board's select-gain in
  place without disturbing the others (Blend mixing); clears activeBoardIndex.
- soloBoard(_:crossfadeSeconds:) — the "Solo" verb (wraps selectBoard).
- isBoardAudible(_:) reports a board's live select-gain target.

UI — BoardBarView (shared macOS/iOS):
- Horizontal board-mixer strip. Each board is a channel cell: audible LED,
  Solo button, and a master-gain fader. Tapping a cell name sets the edit
  target (independent of what's audible); context menu silences/deletes.
- Solo | Blend mode switch + an All button + a crossfade slider.
- Replaces the builder's board dropdown and Add Board button; the cell's +
  adds a board.

Tests: solo/blend/all audibility transitions and activeBoardIndex tracking;
setBoard no-op for a board owned by another manager.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 16:51:17 -07:00
josh cdac587454 update signing v0.0.9 2026-06-23 13:02:07 -07:00
josh 69f50b2037 Add Limiter, Noise Gate, and Graphic EQ pedals + vertical-fader UI control
Three new pedals:
- LimiterPedal: linear boost gain stage into a LookAheadLimiter brick-wall
  ceiling. Reads engine sampleRate injected by PedalBoard.add at build time.
- NoiseGatePedal: AmplitudeFollower -> hysteretic Schmidt gate -> LinLin floor
  map -> Lag smoothing. Tuneable residual floor when the gate is closed.
- GraphicEQPedal: five cascaded RBJ filters (low/high shelf + three peaking
  mids) with per-band dB gains and a linear master output gain.

New UI control:
- PedalSlider descriptor and Pedal.effectSliders hook, alongside effectKnobs
  and effectSwitches.
- VerticalParameterSlider: a vertical fader bound to a UIParamNode.
- PedalView renders the fader bank and widens the enclosure to fit it.

Persistence/registry:
- PedalState.sliderValues (decodeIfPresent for backward compatibility); capture
  and apply in Pedal+Preset.
- Registry entries and palette ordering for all three pedals.

Tests: non-silent builds, limiter ceiling enforcement, gate open/closed/unity
floor power ratios, EQ flat output, global-gain scaling, and 6-slider preset
round-trip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 12:36:42 -07:00
josh b08ce4d999 Merge app-icons: lyrebird app icon for all four ShoeGaze projects 2026-06-23 09:59:42 -07:00
josh 372494aae4 Add lyrebird app icon to all four ShoeGaze projects
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>
2026-06-23 09:59:42 -07:00
josh 37ec8cd331 Merge stable-signing-team: consistent DEVELOPMENT_TEAM across demo projects 2026-06-23 09:42:26 -07:00
josh 9ebcbd4027 Set stable signing team on Demo, iOS Demo, and iOS Builder projects
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>
2026-06-23 09:42:26 -07:00
josh 77156e696b Merge engine-config: engine-config UI, debug scope, live-input mic permission 2026-06-23 09:36:42 -07:00
josh 46e075fb8c Add live-input mic permission, audio-input entitlement, and engine-config review fixes
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>
2026-06-23 09:36:35 -07:00
josh ed27ab166c add scope for debugging 2026-06-22 21:07:13 -07:00
josh c6f567535b commit current state 2026-06-22 15:40:23 -07:00
josh e36dc3a527 Merge karplus-test-tone: E-minor Karplus-Strong arpeggio test tone 2026-06-22 13:25:56 -07:00
josh 5633ede630 Replace test tone with an E-minor Karplus-Strong arpeggio
TestLoopSource now plays a repeating pluck arpeggio over the open lower
four guitar strings (E2, A2, D3, G3) in E minor: one Impulse drives both
the KarplusStrong excitation and a Demand/DemandSequence that steps the
pitch per pluck. Fixed-seed WhiteNoise exciter keeps the tone deterministic
(so two source renders match, e.g. the overdrive bypass-equals-dry test).
Adds a sampleRate init param (default 48k) sizing the KS delay line;
ShoeGaze.addBoard passes the engine's actual rate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 13:25:56 -07:00
josh c491f97440 Merge record-ui: recording controls for the macOS + iOS builder apps 2026-06-22 12:20:51 -07:00
josh 499ab1310e Add recording UI to the builder apps (macOS menu + iOS controls)
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>
2026-06-22 12:20:51 -07:00
josh 9b7c5246ec Merge stereo-unzip: per-channel L/R processing of a stereo signal 2026-06-22 10:21:18 -07:00
josh 1a09cf9cf8 Add Stereo Unzip: process a stereo signal's L/R independently
A stereo-output pedal (Ping-Pong, Octave Splitter) now shows a
"Stereo flow / Split L/R" toggle on its card:

- Stereo flow (default): unchanged broadcast behavior — following pedals
  process both channels as one stereo flow.
- Split L/R: inserts a Stereo Unzip region right after the pedal, routing
  the L channel into one lane and R into the other for independent
  processing, then recombining to stereo with the same route/solo/bypass
  control as the stereo split.

Engine/core:
- StereoUnzipSplitter: 2-in -> 3-out node (L->lane L, R->lane R, and a
  centered 0.5*L+0.5*R dry tap for the bypass route).
- PedalBoard.unzipStereo() mirrors splitStereo() but reads both tails and
  requires width 2; reuses collectStereo / StereoSplitSection /
  StereoRouteCollector. New stereoUnzipSections (cleared on teardown).
- BoardSegment/.stereoUnzip + StereoUnzipState round-trip via preset
  capture/rebuild/applyState.
- ShoeGaze.insertStereoUnzip(afterSegment:)/isStereoUnzip(afterSegment:)
  drive the toggle; invalid insert (mono tail) throws
  cannotUnzipMonoChain and the atomic rebuild keeps the board intact.
- StereoSplitSection.splitter relaxed to `any Synthesizer` (stored only)
  so it can hold either splitter type.

UI: per-pedal toggle + STEREO UNZIP region rendering in BoardFlowView.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 10:21:18 -07:00
josh d8142c9d7d Merge menu-and-plist: macOS menu Save/Load + plist copyright fix 2026-06-22 09:39:20 -07:00
josh 8ffc1caa42 Fix plist copyright; move macOS Save/Load to the menu bar
- 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>
2026-06-22 09:39:06 -07:00
josh 6c1859c59d Merge pedalboard-builder: interactive signal-flow board builder + demo apps 2026-06-22 09:32:25 -07:00
josh 35971d4acc Add ShoeGaze Builder demo apps (macOS + iOS)
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>
2026-06-22 09:32:18 -07:00
josh d41ba37093 Add signal-flow pedalboard builder UI
Interactive builder views in LyrebirdShoeGazeUI:

- PedalPaletteView: vertical sidebar listing every pedal (tap to append
  to the main chain, drag "add:<type>" onto a lane) plus routing actions
  (Stereo Split / Parallel Split / Merge to Mono).
- BoardFlowView: left-to-right signal-flow board driven by
  board.orderedSegments. Pedal cards joined by pink connector lines
  (double for stereo width); split regions render as two stacked L/R
  (A/B) lanes you fill independently by dropping pedals; per-card trash,
  drag-to-reorder within a lane, region route/mode controls, and a
  region trash. Reads shoeGaze.boards[index] fresh each body (index is
  the stable anchor across rebuilds).
- ShoeGazeBuilderView: sidebar + vertically-centered flow board, with
  transport, input picker, board picker, and JSON save/load (NSSavePanel
  / NSOpenPanel on macOS, fileExporter/Importer on iOS via
  RigFileDocument).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 09:32:09 -07:00
josh e1ec98413d Add board edit API: lane-addressed pedal/region editing
Core support for interactively building and editing a board, all via the
existing capture-BoardState -> mutate -> rebuildBoard path (no RT-graph
surgery):

- PedalLane addresses the main chain or a stereo/parallel branch.
- appendPedal/removePedal/movePedal gain a `lane:` parameter (default
  .main, so existing call sites are unchanged).
- appendStereoSplit/appendParallelSplit/appendMergeToMono/removeSegment
  insert and remove branch regions; split/merge guarded by tail width.
- setInputSource preserves the rig across an input-source change.
- rebuildAllBoards / loadRig(from:Data) / rigData added; loadRig is now
  atomic (teardown-on-failure) so a failed load leaves an empty rig.
- Expose PedalBoard.orderedSegments and BoardSegment publicly so a UI can
  walk live board structure; index aligns with captureState().segments.
- InputSource: Equatable. New errors: unknownPedalType,
  pedalIndexOutOfRange, cannotSplitStereoChain, cannotMergeMonoChain,
  notABranchRegion.

Tests cover append/remove/move on main and branch lanes, region
add/remove, width guards, move-to-end before trailing regions, input
switch, and knob/bypass/branch value persistence through save/load.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 09:31:57 -07:00
josh 0960d4e7c5 Merge bass-octaver-pedal: Boss OC-2 style bass octaver 2026-06-21 20:49:32 -07:00
josh 2ba57cadd6 Add Bass Octaver pedal (Boss OC-2 style)
Monophonic octave-down pedal with OCT1/OCT2/Direct knobs and a Mode
switch between two algorithms:

- Flip-flop (default): a hysteresis comparator clocks a T flip-flop
  divider chain (new SubOctaveDivider generator) to produce square
  sub-octaves one and two octaves down, amplitude-followed off the dry
  signal. Time-domain — tracks low bass with no detection floor.
- Tracking: FreqTracker drives square oscillators at half and quarter
  the detected frequency. Cleaner, but limited by the tracker's ~90 Hz
  floor; flip-flop is the bass mode.

SubOctaveDivider classifies its input as generator-or-scalar at init to
keep _computeSamples allocation-free, uses a shared file-scope zero
block, bounds-checks the input read, and traps on divisor < 2.

Tests: BassOctaverPedal integration (both modes non-silent, modes
differ, sub-octaves change output, knobs/switch/preset/registry) and
SubOctaveDivider deterministic frequency-division (divisor 2 -> /2,
divisor 4 -> /4, /4 one octave below /2). 127 tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 20:43:03 -07:00
josh c677e124f4 Merge stereo-preset-topology: split-region topology serialization
Boards serialize as ordered segments (pedal | parallel | stereoSplit |
mergeToMono) so split regions, branch chains, and routing modes round-trip
through presets. Backward-compatible decode of legacy flat-pedal files;
lightweight recall covers branches. Suite 116/116.
2026-06-21 17:13:38 -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 211b9da438 Merge stereo-routing: mono→stereo PedalBoard routing
Width propagation (mono/stereo, capped at 2), widener + stereo-native
pedals, auto-stereoize, splitStereo with four route modes, width-aware
output, SwiftUI views, preset registration, and a macOS demo .stereo mode.
2026-06-21 16:59:54 -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 5522109689 Add .stereo mode to the macOS demo app
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>
2026-06-21 16:57:09 -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 02cee9a358 Register stereo pedals for preset round-trip
Add Octave Splitter and Ping-Pong to PedalRegistry so rigs containing
them reconstruct on loadRig — board.add replays the mono→stereo width
transition automatically. Document that split-section topology (parallel
and stereo) remains outside the captured linear chain, as before.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 16:50:26 -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
josh ca4cabb42f Merge pedal-colors: enclosure tints for the new pedals 2026-06-21 15:54:37 -07:00
josh 1ecacbfc21 Add enclosure tints for the four new pedals
Mu-Tron plum, Auto-Wah gold, Feedback Delay tape sepia, Multi-Tap Delay
cyan — distinct from the existing eight so they no longer fall through to
the default steel gray.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:54:37 -07:00
josh 79e200a61e Merge pedal-footer-symmetry: Level | bypass | Mix footer 2026-06-21 15:53:57 -07:00
josh b564b154a0 Flank bypass switch with Level and Mix for a symmetric pedal footer
Move the Mix knob out of the knob grid into the bottom control row, to the
right of the bypass footswitch, mirroring Level on the left. Every pedal
now shares a consistent knob-switch-knob footer. The knob grid drops the
trailing Mix and Level entries (was just Level).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:53:57 -07:00
josh 393fb47a78 Add .gitignore for SwiftPM build and Xcode user state
Ignores .build/, .swiftpm/, xcuserdata, and .DS_Store. Package.resolved
stays tracked to pin the Lyrebird dependency.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:48:01 -07:00
josh 9cf431d8ee Merge envelope-and-delay-pedals: 4 pedals + segmented switch control 2026-06-21 15:40:29 -07:00
josh cb28ea8c7d Add segmented pedal switch control; Mu-Tron sweep + mode switches
Introduces a discrete multi-position switch control alongside the rotary
knobs, and uses it to expose the Mu-Tron's sweep direction and filter mode.

- PedalSwitch: UI-agnostic descriptor (label, node, ordered options of
  caption + value), parallel to PedalKnob. Two options make a two-state
  switch, three a three-state switch.
- PedalSwitchView: segmented SwiftUI control bound to a UIParamNode. Lit
  segment is the option nearest the node's value; tapping writes that
  option's value. Serves both two- and three-state switches.
- Pedal gains an effectSwitches hook; PedalView renders a switch row
  between the knob grid and the footswitch.
- MuTronPedal: sweep direction is now a two-state switch (Down/Up) and
  filter mode a three-state switch (LP/BP/HP). The effect builds six
  MuTronIII instances (three modes x two directions) selected by a nested
  Select so every filter state stays warmed for click-free switching.
- Presets: PedalState gains a backward-compatible switchValues array
  (decodes to empty for older presets); captureState/applyState persist
  and restore switch positions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:40:26 -07:00
josh c28e7cac90 Add four pedals: Mu-Tron, Auto-Wah, Feedback Delay, Multi-Tap Delay
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>
2026-06-21 15:07:34 -07:00
josh 6f55615d7b 1.0 release 2026-06-21 12:25:18 -07:00
josh b7973cba9a Initial commit 2026-06-21 18:04:09 +00:00