First combo amp with onboard effects, modeling the American blackface clean
voice. Adds two overridable hooks to AmpVoicePedal so an amp can insert stages
without touching the fixed chain:
- inputShaping(_:) — pre-preamp (bright switch here)
- onboardEffects(_:) — after tone stack, before power amp (reverb + tremolo here)
FullertonReverbAmpPedal (.fender):
- Spring reverb (SpringReverb) with a Reverb mix knob.
- Tremolo (unipolar sine gain LFO) with Speed + Intensity knobs; defaults off so
the amp opens as a clean reverbed platform. ("Vibrato" channel is really AM.)
- Bright switch: a pre-preamp high-shelf whose gain is scaled by the toggle, so
Off is a true identity and the switch is live (no rebuild).
- Full surface: Gain/Bass/Mid/Treble + Reverb/Speed/Intensity knobs, Bright
switch, Cab selector; widthUnits 3.
Registered across registry / type / category / palette / enclosure color; Help
acknowledgment lists its tone stack. 9 tests (FX effect, ceiling with FX on,
control surface, state round-trip, registry).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The cab selector was a Select over one ConvolutionReverb per CabinetVoice, and
Select evaluates every input each block — so all 8 voices' partitioned-FFT
convolvers ran continuously (7/8 discarded), per CabinetPedal and per amp voice.
Build only the selected voice's convolver. The cab selector is now
rebuildsOnChange: committing a new stop asks the host to rebuild the board
(same mechanism the Neural Amp model loader uses), which re-enters effect()
with the new voice. One convolver runs instead of N; cost moves to a brief
rebuild on cab switch (cabs are set-and-forget).
- PedalSelectorKnob: add rebuildsOnChange flag.
- PedalSelectorKnobView: fire onCommit on drag-end when the stop changed.
- PedalView: wire onCommit → pedalRebuildAction for rebuildsOnChange selectors.
- CabinetVoice.voice(atSelectorValue:): rounded/clamped index → voice.
- CabinetPedal + AmpVoicePedal: single ConvolutionReverb for the selected voice.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the single AmpPedal (a model-selector pedal) with three dedicated
amp-voice blocks, each fixing one tone-stack model and adding a signature
control so the per-amp UI can be customized:
- AmpVoicePedal: open base — shared Gain/Bass/Mid/Treble/Cab chain
(TriodeStage preamp → ToneStack → TriodeStage power amp → shapeVoice →
ConvolutionReverb cab), overridable toneStackModel/summary/signatureKnobs/
shapeVoice.
- CaliforniaAmpPedal (.fender): Bright high-shelf, clean-leaning gain default.
- BritishAmpPedal (.marshall): Presence high-shelf, crunch gain default.
- ChimeAmpPedal (.vox): Cut low-pass, top-boost jangle.
Registered in PedalRegistry / PedalType / PedalCategory / palette order /
enclosure colors. Help acknowledgment updated for the three tone stacks.
12 new tests in AmpVoicePedalTests; removed AmpPedal + its tests.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- AmpPedal: double-width (widthUnits 2) amp-head card so the four tone knobs +
Amp/Cab selectors + master aren't cramped. Uses the generic single-column
content (no greedy Spacers → no flow-canvas height issue).
- Neural Amp model loader: PedalView renders, for a NeuralAmpPedal, a "Load
Model…" picker (.fileImporter for .json) plus the loaded model's filename.
Picking sets Pedal.resourcePath and asks the host to rebuild the board so the
model applies live. Picker + AppKit stay in the UI layer (core imports none).
- New `pedalRebuildAction` environment value (@MainActor @Sendable), installed by
ShoeGazeBuilderView; it resolves the pedal's board via a new branch-aware
`ShoeGaze.board(containing:)` (finds pedals inside parallel / stereo-split
branches, not just the main chain) and rebuilds it via the live-safe
`rebuildBoard(_:from:)`.
Tests: AmpPedal widthUnits == 2; board(containing:) finds main + branch pedals
and returns nil for a stranger. Full suite 502. (SwiftUI loader flow needs
on-device visual QA.)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bump Lyrebird to 1.7.1 (ProteusModelImporter) and add a neural amp-capture pedal.
- NeuralAmpPedal: loads a GuitarML Proteus/NeuralPi model (via ProteusModelImporter)
and runs it with LSTMAmp on the gain-trimmed input; passes through clean when no
model is loaded. Model files are user-supplied, not bundled (GuitarML = GPL-3.0).
- PedalState gains an optional `resourcePath` (backward-compatible, decodeIfPresent)
and Pedal a matching `resourcePath` property, wired through captureState/applyState
— so the loaded model file persists across rig save/load. The neural pedal reads it
at build() (applied on rebuild). This foundation also unblocks a future
custom-cabinet-IR path.
- Registered in PedalRegistry / PedalType / PedalCategory (.gain) / palette /
enclosure color; Help acknowledges the GuitarML model format.
Tests: no-model passthrough; loaded model transforms output & differs from
passthrough; gain affects modeled output; resourcePath round-trips through
PedalState; gain knob exposed; registry resolves "Neural Amp". Full suite 501.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bump Lyrebird dependency to 1.7.0 and add a full white-box amp built on its new
amp-modeling core.
AmpPedal chain: preamp TriodeStage(drive: gain) → ToneStack(bass/mid/treble,
model) → gentle power-amp TriodeStage → speaker-cabinet ConvolutionReverb. The
tone-stack model (Fender/Marshall/Vox) and cabinet voice are each built per
option and picked live with Select, so both round-trip through the rig save
format. Fully wet (Level is master; Mix hidden).
Controls: Gain, Bass, Mid, Treble knobs + Amp / Cab selectors. Registered in
PedalRegistry / PedalType / PedalCategory (.gain) / palette / enclosure color;
Help acknowledgments cite the Yeh & Smith tone-stack model.
Tests: builds/non-silent/finite; gain, tone, amp-model, and cab all change the
output; controls exposed; amp/cab selections round-trip through PedalState;
registry resolves "Amp". Full suite 494.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Credits the resources used: the Lyrebird engine (MIT), the RBJ Audio EQ
Cookbook biquad formulas (used to synthesize the Cabinet pedal's IRs), and a
note that the built-in cab voicings are original code-generated IRs, not
third-party captures.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
First amp-modeling increment (ShoeGaze 2.0, plan S1). No Lyrebird change —
reuses ConvolutionReverb + LyrebirdBuffer.
- CabinetPedal: builds one ConvolutionReverb per built-in voice at build() time
and picks the active one with a `Select` driven by the persisted `cabinet`
selector — live cab switching that round-trips through the rig save format.
- CabinetVoice + CabinetIRFactory: three built-in voicings synthesized in code
(impulse through an RBJ biquad cascade — HP, true 4th-order Butterworth LP,
body + presence peaks), so the bundled cab set is our own MIT content (no
third-party IR licensing). Filter centre frequencies are Nyquist-clamped.
- Registered in PedalRegistry / PedalType / PedalCategory (.filter) / palette;
README pedal count + catalog updated.
User-supplied captured .wav cab IRs are a planned follow-up (needs a persisted
file-path field PedalState doesn't yet carry).
Tests: IR is finite, peak-normalized, mono; rolls off lows and highs; voices
differ; selector exposed; selection changes output and round-trips through
PedalState; pedal builds, non-silent, resolves from the registry. Suite 486.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The flow canvas offers the pedal row its full viewport height
(BoardFlowView sets the content minHeight to the viewport). The looper's
columnar layout had Spacer(minLength: 0) inside its left and center
columns, making those VStacks greedy vertically, so the looper card
stretched to fill the offered height — pinning the Level/Bypass footer to
the bottom and leaving a large empty gap in the middle.
Remove both spacers so each column sizes to its content, and pin the
columnar content to intrinsic height with fixedSize(vertical:). Other
pedals were unaffected (their default layout has no vertical spacer).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Non-blocking cleanups from the clean review pass:
- EngineConfigView.startEngine: collapse the redundant early-return in the
sample-rate-mismatch branch into the shared tail.
- InputMuteButton: hoist the 0.2s settle duration to a named pulseSettleDuration.
- InputMuteTests: correct a stale "input defaults muted" comment (library default
is audible; the test mutes explicitly).
- Plan doc: setInputMuted(true) runs before engine.start(), not after; note the
addBoard priming.
464 tests pass; macOS app builds.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two blocking findings from external review:
1. UIParamNode itself ramps from previousOutputValue (seeded at the compile-time
default, advanced only by RT render — update() doesn't touch it) to the target
over the first block. So a node told to start muted still ramped full-gain→0
across block 0; the earlier "hard gate" only moved the leak from Lag to the
param's own ramp. The mutedInputRendersSilent test passed by accident (the
test-loop tone is quiet in that first block).
Fix: prime previousOutputValue to the target. Race-free before a node is
spliced into the graph (addBoard) and safe on a spliced node while the engine
is stopped; a running engine keeps the ramp as a click-free live toggle. New
setInputMuteGain(_:muted:seedRamp:) / primeInputMute helpers; setInputMuted
seeds only when engine.isRunning == false.
2. EngineConfigView.startEngine called setInputMuted(true) AFTER engine.start(),
so the engine came up unmuted for the first blocks. Moved it before start()
(engine stopped there, so the gain is seeded with no ramp).
Also: correct the setInputMuted doc (abrupt kill-switch, not "smoothed").
Regression test stoppedMutePrimesNodesSoTheresNoStartRamp asserts the ramp start
equals the target (no pending ramp) after a stopped mute and for a board added
while muted. 464 tests pass; both app targets build.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Help: cover the input mute in Setup ("input starts muted on every Start"),
Choosing an Input (hard input gate vs the output Rig Mute, MIDI-mappable), and
the MIDI switch list (Rig Mute / Input Mute).
- Input-mute button is now its own view with a pulsing red ring + shadow that
oscillates under a repeatForever animation while muted, so new users see why
the rig is silent. The glow settles out when un-muted and never intercepts taps.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- MappingBadge.pcFill/ccFill/keyFill are marked nonisolated so the nonisolated
MappingBadgeKind.fill can read them (a SwiftUI View's statics are otherwise
main-actor-isolated). Clears three "actor-isolated ... from a nonisolated
context" warnings.
- The input-mute button pushed the docked desktop transport cluster past the row
width, clipping the Rate picker and I/O steppers. Render the three rig toggles
(Bypass / Mute / Input) icon-only there via .labelStyle(.iconOnly); the .help
tooltips remain and the compact layout still shows text labels.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The rig snapshot already stores inputSource + input/output channel counts and
syncs them via the autosave envelope and the iCloud rig library. Make that the
single source of truth instead of the parallel UserDefaults path.
- RigStore.restore applies the saved channel layout (applyChannelLayout) before
loadRig, while stopped at launch, so a saved live-input channel validates
against the restored count instead of falling back to the test loop. The
general loadRig policy (don't force layout mid-session) is unchanged.
- applyInputSource and the engine-config onConfigApplied now autosave, so input
and I/O changes are captured into the rig immediately.
- Remove the UserDefaults keys and read/write sites: ShoeGaze.inputSelection
(builder view + iOS model) and the ShoeGaze.inputChannels/outputChannels keys
added earlier (EngineConfigView + both app targets build at the default layout
now; RigStore.restore supplies the rig's layout).
- Fresh-launch default: the seed paths set inputSource = liveInput(0) when the
engine has an input channel, so a first launch listens to the instrument. A
restored rig keeps its own saved input; the view's on-appear hook only requests
mic access for a restored live selection (test-loop fallback on denial).
Test: RigStore.restoreAppliesSavedChannelLayoutAndInput. 461 tests pass; both
app targets build.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Input mute: a hard gate on the signal feeding every board (guitar / mic),
distinct from the rig-output mute. Each board input writer (TestLoopTap /
HardwareInputPassThrough) gains a lagged @UIParam mute gain; ShoeGaze holds
inputMuted (default true), drives every input node, and brings newly-added
boards up at the current state. A deliberate user Start re-asserts the mute so
a fresh engine is silent until the player un-mutes — cutting accidental noise.
Toggle sits beside the Start/Stop transport and is MIDI mappable
(MIDIMap.Action.inputMute). First launch now defaults to live In 0 instead of
the test-loop arpeggio.
I/O persistence: the engine's input/output channel counts now persist to
UserDefaults (written by EngineConfigView, restored by the app targets at
engine construction), so a multi-channel setup survives relaunch and a saved
live-input channel stays valid — fixing the input selection reverting to the
test loop after a restart.
Tests: InputMuteTests (default-muted, node driving, per-board adoption, live
path) + a MIDI PC input-mute latch test. StereoRouting render tests un-mute
before rendering. 460 tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Tempo sync
- Lock a delay time or modulation LFO rate to a note division (whole..sixteenth,
dotted, triplet) of the shared clock. Value is derived from the tempo and follows
tap tempo, the stepper, the editable BPM field, and MIDI.
- Delay time: Delay, FeedbackDelay, PingPong, ReverseDelay, MultiTap (per tap).
LFO rate (inverse mapping): Tremolo, Vibrato, Chorus, Flanger, Phaser, Modulation.
- Core types NoteDivision / TempoSync / TempoSyncableParam; Pedal.tempoSyncableParams /
tempoSync / applyTempoSync / setSync; ShoeGaze.setBpm broadcast recomputes all pedals;
tempoSync persisted in PedalState (lenient decode) and recomputed on load + recall.
- Observable TempoSyncRevision so the sync badge refreshes on any state-change path.
UI
- Division picker with drawn music-notation glyphs (NoteGlyphView + rasterized cache):
noteheads, stems, flags, augmentation dot, bracketed 3 for triplets. Presented as a
height-capped popover so it stays on-screen on iOS.
- Editable BPM text field: integer-only, live-filtered, clamped 30-300, commit on
return / Done / blur.
- Divisions that clamp at the current tempo are disabled in the picker; an active
clamped sync shows a warning marker.
- In-context control mapping badges (PC / CC / KEY) per pedal control, with a legend.
Delays
- Maximum delay time raised to 5 s across the delay pedals (was 1-2 s).
Docs: CHANGELOG.md, RELEASES.md, docs/plans/2.2-tempo-synced-parameters.md.
All 454 tests pass; passed lyrebird_external_review (RT-safe, main-thread param writes).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bind letter/digit keys (with Shift/Control/Option; Command reserved for
menu shortcuts) to the same rig toggle Actions a MIDI Program-Change
footswitch drives. Keys reuse MIDIController's perform(_:) dispatch via a
new .key learn target and ingestKey(_:modifiers:).
Key capture is platform-specific: macOS installs an AppKit
NSEvent.addLocalMonitorForEvents(.keyDown) monitor (SwiftUI .onKeyPress
only delivers to the focused view); iOS uses .onKeyPress with the root
made focusable/focused, reclaiming focus when a text-field modal closes.
Both gate on the first responder not being a text field so typing is
never hijacked, filter key-repeat, and reserve Command for the menu.
MIDIMap gains keys:[KeyBinding] and a KeyModifiers OptionSet, both with
tolerant Codable decode so old rigs (no keys / no modifiers) still load
with switches/ccs intact. The mapping sheet is unified: each switch row
shows its footswitch (PC) and key bindings with per-source learn/clear,
and the sheet is retitled "MIDI / Control Mapping".
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Visual metronome tempo indicator (pendulum playhead) replacing the flashing LED
- Rig Mute (Cmd-Z) hard-silence, distinct from Bypass Rig; wired to header, board menu, MIDI
- Keyboard shortcuts: Cmd-1..9 board switch, Cmd-Shift-1..0 set-list rig load, Cmd-Z mute
(macOS native menus + iOS/iPadOS hardware keyboards)
- Rig set-list ordering: drag or Move Up/Down in the picker; order saved and archive-portable
- Persist tempo, input selection, and engine I/O with a rig (I/O applied via opt-in
applyChannelLayout, not forced on load)
- Fix archive import colliding set-list positions with existing rigs
- Remove ShoeGazeDemo / ShoeGazeiOSDemo apps and projects; keep the two Builder apps
- Bump marketing version to 2.0.0 on both Builder projects; pin Lyrebird 1.2.3
- Add CHANGELOG.md
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Review found a blocking bug: the compact header's transportOnly EngineConfigView
and the Settings-sheet EngineConfigView each own independent @State pending
config. reconfigureEngine mutates the engine in place, so the header instance's
.task(id: engine identity) never re-syncs — pressing Start there re-applied its
stale pending values, reverting rate/channel edits made in Settings. In
transportOnly mode, skip the reconfigure and just start the already-configured
engine.
Also: remove the unused isNarrow / horizontalSizeClass (dead code), and honor
showsFilterMenu in PedalPaletteView.horizontalBody (was only gated in vertical).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The header scope was clamped to the compact inline height (76pt) in both
orientations; in the portrait full-width strip that clamp made the taller scope
(legend + 120pt lanes) overflow upward into the Rigs/Pedals/Settings row. Clamp
the height only for the inline landscape strip; portrait uses the natural height.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
On narrower portrait widths (smaller iPads / split view) the inline scope overlaid
and clipped the header. Detect portrait by actual size (iPad is .regular in both
orientations) and, in portrait, move the scope to a full-width strip beneath the
control rows — using the ample portrait vertical space. Landscape keeps it inline
beside the transport. Header control rows + transport factored into shared
subviews.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The tall scope lived inside row 1, so it set row 1's height and left a gap above
the Tempo/Tuner row. Put the three left rows in their own VStack (tight
rowSpacing) with scope + transport as a right column spanning them.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Split the header into the requested three rows:
Row 1: ShoeGaze title · [Bypass · Mute · Help · MIDI filling to the scope] · scope · Start/Record
Row 2: Tempo · Tuner
Row 3: Rigs · Pedals · Settings
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move the performance row (Tempo / Tuner / Bypass / Mute / Help / MIDI) up onto the
title row, filling the space between the title and the scope. As a horizontal
scroll view it flexes to the available gap — shows in full in landscape, scrolls
when tight in portrait — and no longer sits beneath the scope. The composition
sheet-openers (Rigs / Pedals / Settings) remain on the row beneath.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- The switch Toggle filled the row, pushing Bypass / Mute / Help / MIDI far right
under the scope. fixedSize keeps them contiguous next to Tempo/Tuner under the
title.
- BoardBarView's control column (segmented picker + two sliders + bordered mute)
is taller than 92pt with iOS control metrics and overflowed into the CPU meters;
raise barHeight to 110.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move the rig-wide controls (Bypass / Mute rig / Help / MIDI) off the composition
row and onto a performance row alongside Tempo/Tuner, under the title — separating
performance controls from the composition sheet-openers (Rigs / Pedals /
Settings), which now get their own row. Both rows are full-width so nothing clips
in portrait.
Rename the header title from "ShoeGaze Builder" to "ShoeGaze" — it's an app now,
not a template placeholder.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The panel/toggle row (Rigs / Pedals / Settings / Bypass / Mute rig / help / MIDI)
sat in the header's left column beside the wide scope, so in the narrower
portrait width its right end (Mute rig, help, MIDI) was cut off. Move it to a
full-width row beneath the title + scope + transport; it now fits portrait and
still scrolls on very narrow (split-view) widths. Tempo/Tuner stay under the
title.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The sheet couldn't scroll — PedalPaletteView doesn't self-wrap in a ScrollView
(the host must) and the sheet had none, so the list overflowed and drags just
resized the detent. Rework:
- Wrap the palette in a ScrollView; single fixed detent (fraction 0.82) so the
sheet no longer resizes, and presentationContentInteraction(.scrolls) so drags
scroll the list.
- Fixed header with the "Add Pedal" title, the type-filter menu, and Done —
PedalPaletteView gains an external filter binding + showsFilterMenu flag so the
filter can be hoisted out of the scrolling content.
- PedalCategory made public (+ Sendable) so the filter binding can cross the
public palette init.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Header: the panel-toggle row and Tempo/Tuner move into the left column under
the title (beside the scope + transport), filling the dead vertical space; the
top strip is now just the board mixer + CPU meters.
- Portrait: the root fills the window and pins top-leading so content is no
longer vertically centered with large blank margins.
- Add-Pedal sheet: content scrolls instead of resizing the detent
(presentationContentInteraction), and a visible toolbar background stops the
title drawing over the first rows.
- Rigs sheet: add top padding so the "Rigs" title isn't flush to the edge.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reclaim the header's dead space: a narrow scope now sits left of a Start/Record
transport cluster in the compact header. The scope is removed from the top strip
(CPU meters stay), and the Record button moves up next to Start. The recording-
folder chooser (set-and-forget) moves into the Settings sheet.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- TempoView/TunerView toggles size to content (fixedSize) instead of a fixed
96pt width that truncated "Tempo: On" to "Tempo:…" at iOS font sizes.
- Add-Pedal sheet uses an inline navigation title so the large title no longer
draws over the palette list.
- Settings sheet lays the engine controls out in a plain scroll (not a Form),
so the Start button isn't compressed to "S…"; input picker on its own row.
- Compact top strip separates Tempo/Tuner, the board mixer, and the scope with
dividers and section spacing so they stop visually colliding.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Rigs / Pedals / Settings sheets were stacked as additional .sheet modifiers
on the main view node, which already hosts the MIDI and Help sheets. SwiftUI
presents at most one sheet per node, so the new ones silently never appeared.
Move each onto its own Color.clear anchor node (the pattern already used for the
board-manager sheet and the file importers/exporter).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The docked layout clipped on iPad even at iPad-Pro (regular) width because a
large macOS min-width hint forced content wider than the screen and the header
did not reflow. iPhone is not a target, so gate purely by platform: every iPad
size uses the canvas-first / sheet layout, macOS keeps the docked layout. Drop
the min-width/min-height frame on iOS so nothing is forced past the screen.
Add an isNarrow (horizontalSizeClass == .compact) hook reserved for
size-specific tuning of the smaller iPads / split view.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
On narrow widths (iPhone, iPad portrait / split view) the docked desktop layout
overflowed and left the board canvas cramped. Add a size-class-gated compact
layout; regular widths (macOS, wide iPad) are unchanged.
Compact:
- Root drops the always-docked rig sidebar; it opens from a "Rigs" sheet button.
- Header keeps performance controls on screen (title, Start/Stop, Record badge,
Bypass, Mute rig) with a scrollable row of panel toggles.
- Composition panels move to bottom sheets: Pedals (palette + routing),
Settings (sample rate / channel counts / input source), Rigs (library).
- Board mixer, scope, CPU meters, and Tempo/Tuner stay docked above the
full-bleed board canvas.
EngineConfigView gains a transportOnly mode (Start/Stop button only) so the
transport stays in the compact header while the config controls live in the
Settings sheet.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- LooperPedal.widthUnits doc updated "double-width" -> triple-width.
- Remove the now-unreachable looperTimeline property (LooperTimelineView is
rendered from looperColumnarContent; the columnar branch always intercepts
the looper before defaultContent).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The looper stacked too many sections to fit the board canvas. Render it (only)
in a wide, three-column layout at widthUnits = 3:
- Left column: loop timeline, Free/Sync switch, Reset footswitch.
- Centre column: the four effect knobs (2×2) over a Level + Bypass footer, with
the Mix slot reserved empty so Bypass stays horizontally centred like a normal
pedal.
- Right column: transport footswitches in a 2×2 grid — Record / Reverse over
Stop / Cue Stop (ordered by label).
Every other pedal keeps the default single-column section stack (extracted into
PedalView.defaultContent, no behaviour change).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Looper:
- Reverse now continues from the current play-head instead of jumping to
duration-minus-position; anchor-based position tracking survives direction
changes. Sync mode defers the flip to the next beat; Free applies immediately.
- Sync switch relabeled "Sync to Tempo".
Tempo/Tuner:
- Add a Tempo on/off toggle (ShoeGaze.setTempoEnabled) that hides the indicator
and forces every tempo-dependent pedal switch (PedalSwitch.tempoDependent) off;
PedalSwitchView disables such switches via the shoeGazeTempoEnabled environment.
- Tuner readout laid out inline; Tempo/Tuner pinned to fixed heights so toggling
state no longer shifts surrounding layout.
Header:
- Collapsed to two rows: title + Tempo/Tuner (left, stacked) and engine options
over input controls (right, trailing-aligned). TAP is a standard-height button.
- Removed the redundant Boards button; moved Clear into the board bar.
- Fixed the rig mute glyph size so toggling mute doesn't shift the volume row.
Help: added a Looper section documenting transport, Free/Sync, knobs, tracks,
and MIDI-assignable actions.
Tests: TempoEnableTests + looper reverse/deferral coverage.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A selected-but-empty track (e.g. A in the clear state) previously showed only a
thin white ring on a dim dot — easy to read as "not lit." Give the selected
track a bright letter and a lighter fill so the active track is obvious even
before it's recorded. Combined with the poll re-subscribe fix, the dots now
track the live selection.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The looper timeline and the transport buttons' live captions poll the pedal
via SwiftUI `.task`, which captures the pedal at task-start and never
re-subscribes. When a rig load swaps in a new LooperPedal instance, the
buttons/LEDs (read live in `body`) tracked the new pedal while the polled
state text and captions stayed frozen on the old one — the state indicator and
"Record/Set End/…" captions never updated even though transport worked.
Key the timeline poll on ObjectIdentifier(pedal) (`.task(id:)`) and tag the
transport button row with `.id(ObjectIdentifier(pedal))`, so both re-subscribe
to the current instance. Board edits reuse the same instance (identity stable),
so this only refreshes on an actual instance swap — no per-render churn.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add looperTrack(index:) PedalActionKind dispatched to LooperPedal.tapTrack, and
Track A–D rows in the MIDI mapping sheet (one per track, up to trackCount). A
mapped switch/Program Change taps the dot — selecting the track, or muting it
when it's already selected and recorded — matching the timeline dots. Covered
by pedalActionTapsLooperTrack.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Each track player now runs through a smoothed per-track mute gate. Tapping a
track dot selects it (as before); tapping the already-selected, recorded track
toggles its mute (tapTrack). Muted dots dim and show a slash. Mutes clear on
reset and don't survive a rebuild. Covered by tapTrackSelectsThenMutesRecordedTrack.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a looperSyncToggle PedalActionKind (dispatched to LooperPedal.cycleSyncMode)
and a Sync row in the MIDI mapping sheet. A mapped switch/Program Change
oscillates the control through its positions on each press, via a reusable
PedalSwitch.nextValue(after:) that advances to the next option and wraps — so
this generalises to any multi-position switch, not just the two-state Sync.
Tests: cycleSyncModeOscillatesThroughOptions, pedalActionCyclesLooperSync.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
MIDI: add looperStop / looperCueStop / looperReverse PedalActionKind cases and
dispatch them (stopPlayback / toggleStopAtLoopEnd / toggleReverse). The MIDI
mapping sheet now lists Record / Stop / Cue Stop / Reverse / Reset as
Program-Change-mappable switch actions for each looper pedal (previously only
Bypass was surfaced).
Mix: the clean guitar now always passes through at full level and the loop bank
is summed on top (dry + loop·gate) instead of crossfading dry against the loop.
The Playback knob therefore sets the looped-vs-live balance. Hide the confusing
wet/dry Mix knob for the looper via a new Pedal.showsMixControl (mix stays fully
wet); other pedals are unaffected.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reset now renders as an LED + footswitch like the other transport buttons —
its LED lights whenever there's something to reset (any non-clear state),
driven off a phase didSet.
Add a Pedal.engineDidStop() hook, invoked for every pedal by a new
ShoeGaze.stopEngine() that the user-facing Stop control now calls (transient
stop-around-rebuild sequences still call engine.stop() directly, so pedals
keep state across a restart). LooperPedal overrides it to return to the clear
state, post to LyrebirdMessageCenter, and briefly show "Looper reset — engine
stopped." on its own card via the state indicator.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the one-at-a-time slot model with a synchronized multitrack looper:
four track players summed to one output, track A's first take defining the
master loop length, and tracks B–D recorded as phase-locked overdub layers
on the same grid (overdub recorders run continuously while playing, reset to
the top at play-start, gated per-track by recLevel so only the selected
track layers new input — instant, drift-free overdub toggles).
A single smart Loop footswitch drives the whole transport by state:
record A → set end (quantized) → auto-overdub on wrap → toggle overdub/play;
B–D toggle overdub aligned to A's play-head. Selecting a track ends the
prior overdub. Stop / Cue Stop pause; Loop resumes. Reset returns to clear.
UI: transport row is now Loop / Stop / Cue Stop / Reverse / Reset; the old
action row is replaced by a one-line state indicator; the A/B/C/D timeline
dots are tappable to select a track; every stomp button shows a live caption
of what its next press does (Record → Set End → Overdub → Play, etc.).
Overdub-undo dropped. All transport routines keep the transportGeneration
guard on deferred beat/stop callbacks.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Checkpoint before the multitrack redesign. Adds 4 loop slots (one player
swapped via setBuffer), a play-head timeline with A/B/C/D dots, Loop/Stop/
Cue Stop/Reverse stomp toggles below the knobs, beat-quantized transport,
overdub undo, reverse, and feedback-decay overdub — all reviewed for RT
safety (transportGeneration guards on deferred beat/undo/cue callbacks).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Extend the looper into a double-width tempo-aware pedal:
- Beat-quantized transport: record start and loop close both snap to the
next beat via a LyrebirdRoutine waiting on the shared clock; loop length
is an exact whole-beat span. Falls back to immediate/unquantized when no
clock is present.
- Loop-length read-outs (frames/seconds/beats), transport state, and a
sample-clock-derived play-head position for the UI timeline.
- Overdub undo (pre-dub snapshot + restore), reverse playback (live rate
flip), and feedback-decay overdub (overdub preLevel via a Feedback knob).
- Inject the shared LyrebirdClock + SynthesisEngine into Pedal via
PedalBoard/ChainRouter so tempo-aware pedals can reach them.
- New double-width LooperTimelineView (state badge, length read-out,
sweeping play-head) wired into PedalView via Pedal.widthUnits.
Concurrency hardening from RT-safety review: a transportGeneration counter
drops superseded deferred beat/undo callbacks that LyrebirdRoutine.stop()
cannot recall once enqueued; the undo restore is deferred past the RT
overdub gate-close; transport routines use non-blocking stop().
Note: this commit also snapshots pre-existing uncommitted work-in-progress
already in the tree (MIDI control refactor, Tuner, Tempo, preset changes),
which is interleaved with the looper changes through shared files and could
not be split into a separately-building commit.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Volume is a CC-mappable [0,1] gain applied after every board's output; mute
is a separate hard gate (not the existing dry bypass), togglable via
Program Change. Both are lagged to avoid clicks and fan out across all
boards from a single ShoeGaze-level setter.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The rig-highlight/graph mismatch kept returning because the highlight (a
UserDefault) and the working graph (the autosave file) were two separate stores
that could diverge — and once an earlier build failed to load and autosaved a
fallback Default over the real graph, the divergence was permanent.
Fix the class of bug: the loaded rig's id now lives on ShoeGaze.currentRigID and
is written *inside* the autosave envelope alongside the graph (one atomic file).
RigStore.restore sets it from the envelope (nil for pre-envelope files or a
fallback seed); the sidebar highlight reads it directly. The separate
UserDefault key, restoreCurrentRig, and persistCurrentRigID are removed. When
the app falls back to seeding Default, no rig is highlighted — honest, and it
can never mislabel the graph again.
339 tests pass; both app targets build.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>