Commit Graph

62 Commits

Author SHA1 Message Date
josh 5040ea1518 Rename Mu-Tron pedal to Mutant (de-trademark)
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>
v1.0.0
2026-06-24 21:00:02 -07:00
josh 21b9123a87 Replace stringly-typed pedal API with PedalType tokens
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>
2026-06-24 20:34:45 -07:00
josh 24ce4564e8 Drop screenshot-instructions note from README
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 16:41:19 -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 8c601e2029 Share one global test signal across all boards
Each board previously got its own TestLoopSource, so multiple boards ran
independently-phased arpeggios and any rebuild restarted them out of sync —
audible polyrhythms. Now a single global TestLoopSource writes a shared test
bus, and each board gets a lightweight TestLoopTap (added .after the source)
copying that bus into its head bus. The shared source survives board
add/remove, so the test signal stays phase-locked and never restarts.

- ShoeGaze: globalTestSource + globalTestBus (lazy via ensureGlobalTestSource),
  per-board testLoopTaps; teardown removes taps + source and releases the bus.
- New TestLoopTap (generic bus copy, like HardwareInputPassThrough).
- ShoeGazeError.testBusUnavailable for an exhausted bus pool.
- Test: testLoop boards share the source via taps; removal leaves others intact.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 14:43:50 -07:00
josh 5a07a6d4b4 Add input gain stage to Compressor pedal
A pre-compression input gain knob (Input, dB, range [-12, +24], default 0)
boosts/cuts the signal before it hits the compressor, so driving the input
harder pushes more of the signal past the threshold. The dB value is converted
to a linear multiplier via Exp(dB * ln(10)/20) and applied to the dry signal.

Tests: knob list is [Input, Threshold, Ratio]; input gain changes the output.
The preset recall test now finds the Threshold knob by label, not position.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 12:32:32 -07:00
josh 475dd392e6 Fix iOS Load file picker not opening
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>
2026-06-24 08:07:37 -07:00
josh dff58175f1 Label delay decay knob 'Decay Time'
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 21:56:04 -07:00
josh 42268b65a1 Relabel delay Feedback knob as Decay
The Delay, Feedback Delay, and Ping-Pong knobs labelled 'Feedback' actually
drive DelayLineFeedback's decayTime (seconds to -60 dB), not a feedback gain —
the engine clamps the internal feedback coefficient below 1, so the control
can never grow/self-oscillate. Relabel to 'Decay' so the knob reads honestly.
Phaser's feedback is a real coefficient and is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 21:40:45 -07:00
josh 2c36de5c0d Widen gap between knobs in short pedal rows
Centred one- and two-knob rows now use a wider, touch-friendly inter-knob gap;
full three-knob rows keep the tight spacing so they still fit the enclosure.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 21:29:25 -07:00
josh f19dc2c1b3 Centre pedal knob rows
Short knob rows (one or two knobs) now sit centred in the enclosure instead of
left-aligned, via symmetric spacers around each row. Shared PedalView, so it
applies on macOS and iOS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 21:26:54 -07:00
josh 6ad813601f Review fixes: reindex activeBoardIndex; safer live-input rebuild
- 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>
2026-06-23 21:22:44 -07:00
josh 652a5a76ca Default iOS builder to one input channel
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>
2026-06-23 21:10:13 -07:00
josh 9b31be7921 Resync EngineConfigView channel/rate fields on engine rebuild
EngineConfigView seeds its pending In/Out/Rate fields from @State(initialValue:),
which runs only once. After the iOS live-input rebuild swaps in a new engine
with one input channel, the stepper kept showing In: 0 even though audio read
the input. Resync the pending fields in a .task keyed on the engine's object
identity so a rebuilt engine's actual counts are reflected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 20:57:34 -07:00
josh 705b4ed534 iOS live input via permission-gated engine rebuild
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>
2026-06-23 20:52:11 -07:00
josh 4627b3b800 Boards sheet, ⌘1–9 switching, unified player bar, input persistence
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>
2026-06-23 20:38:43 -07:00
josh c25d783b71 Lock iOS builder + demo to iPad-only landscape
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>
2026-06-23 17:25:16 -07:00
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