Registering the document type made the apps claim .shoegaze, but without an
open handler macOS reported "cannot open files in the ShoeGaze Document
format." Wire actual opening:
- macOS Builder: implement application(_:open:) — decode the document and
import its rigs into the library (board files get an explanatory note),
with a confirmation alert. Also migrate the File-menu Export/Import panels
to .shoegaze (still importing legacy JSON).
- iOS Builder: add .onOpenURL and an importDocument(at:) on the app model.
- Drop the document-type declaration from the two minimal player demos
(ShoeGazeDemo, ShoeGazeiOSDemo); they have no open/share UI, so only the
two Builder apps should claim the type.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ShareLink with a DataRepresentation hands the share sheet raw bytes, which
on macOS collapses the menu to just Copy / Edit Extensions — AirDrop,
Messages, Mail, and Notes only appear for an actual file on disk.
Switch RigShareItem / BoardShareItem to FileRepresentation: write the
encoded .shoegaze document to a unique temporary file when a destination is
picked, and hand its URL to the share sheet. Extract the shared temp-file
writer alongside shareFilenameBase.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- README: refresh the pedal catalog to all 32 pedals across the eight
current categories (Gain / Dynamics / EQ & Filter / Modulation / Pitch /
Delay / Reverb / Texture), bump the count, and add a Sharing feature
bullet for the .shoegaze file type.
- RELEASES.md: add the 1.3.0 sharing entry and backfill the 1.2.0 entry
(ten new pedals + iCloud rig library + builder UI rework).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Introduce a single shareable document type for rigs and boards:
- ShoeGazeDocument: versioned JSON envelope wrapping either a RigArchive
(one or many rigs) or a BoardVersion, with a tolerant decoder that also
reads the legacy bare-RigArchive and bare-ShoeGazeState shapes.
- Register the .shoegaze UTType (net.realizedsound.shoegaze, conforms to
public.json) in all four demo app Info.plists.
- Migrate library export/import onto the envelope: exportDocumentData() and
a decoder-tolerant importArchive(); RigFileDocument and the Builder
exporter/importer now use .shoegaze. Internal per-rig and board-version
files stay app-private JSON.
- Add OS share-sheet entries via SwiftUI ShareLink: Share per rig in the
library sidebar, Share per version in the board editor, backed by the
Transferable wrappers RigShareItem / BoardShareItem.
Tests: ShoeGazeDocument round-trip and legacy decode, library .shoegaze
export/import round-trip, and a board-document-imports-no-rigs case.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move the ROUTING cards (Stereo Split / Parallel Split / Merge to Mono) from
the right of the horizontal pedal strip to their own row beneath the pedal
cards, using the space under the picker.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The granulators read grains from behind the write head, so each grain
replayed the last grainSize of audio — an audible delay. Rework
StereoGranulator to the straight-through approach (matching Lyrebird's
InputGrain at position 0): grains apply their Hann window and random pan to
the LIVE input sample with no look-back buffer, so there is zero added
latency. Output is normalised by overlap so density doesn't change level.
Drops the circular buffer entirely.
GranulatorPedal / AutoGranulatorPedal are unchanged (same generator API).
Generator tests (seeded determinism, zero-spread centering, full-spread
L/R separation) still hold. Suite 271.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adding a second stereo (widener) pedal — e.g. two Granulators in a row —
threw ShoeGazeError.stereoWidthExceeded, which was only printed to the
console. Route the addPedal / routing / addBoard catch blocks to an alert
with player-facing wording (stereo-width / merge cases mapped to plain text;
others fall back to the error's LocalizedError description). Alert lives on
its own presentation anchor.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Engine config edits (In/Out/Rate) now apply to the stopped engine
immediately rather than only at Start, so the input-source picker — which
lists 0..<engine.numInputChannels — updates as soon as the In stepper
changes, letting the user choose the input before starting. No-op while
running (controls are disabled). Reuses the existing onConfigApplied
refresh path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bump MARKETING_VERSION / CFBundleShortVersionString to 1.2.0 (both apps)
and add docs/release-notes-1.2.0.md.
Highlights: ten new pedals (Distortion, Flanger, Vibrato, Rotary,
Harmonizer, Reverse Delay, Shimmer Reverb, Bitcrusher, Granulator, Auto
Granulator), an iCloud-synced rig library, and a reworked builder layout
with a colour-coded, type-filterable pedal picker.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Use Lyrebird's @_spi xorshift64Next(_:) instead of an inlined copy
(@_spi(LyrebirdExtensions) import LyrebirdSynth); drop the local nextBipolar.
- Add the init-level /// - Parameters: block to StereoGranulator.
Suite 271; both apps build.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- StereoGranulator generator: records mono input into a circular buffer and
replays overlapping Hann-windowed grains, each randomly panned by `spread`
(0 = centred, 1 = full field). Voice pool + control-rate grain size /
overlap / spread, all pre-allocated; inlined xorshift64 for grain pans.
- GranulatorPedal (.widener): Grain / Overlap / Spread.
- AutoGranulatorPedal (.widener): grain size tracks input level via
AmplitudeFollower → LinLin, with a Response switch (Loud→Short / Loud→Long)
selected by a CrossFade. Min/Max Grain / Overlap / Spread.
- Pedal picker (PedalPaletteView): cards colour-coded by a new PedalCategory
(Gain/Dynamics/EQ&Filter/Modulation/Pitch/Delay/Reverb/Texture) plus a
"filter by type" menu defaulting to All.
Tests: generator (seeded determinism + stereo-spread L/R separation) and
both pedals (build/non-silent, param/response changes, knobs, registry,
preset round-trip). Suite 271.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
High shimmer built a DC offset: the octave-up of DC is DC and the damping
one-pole passes DC, so the loop DC gain (~decay + shimmer) exceeds 1 above
~shimmer 0.25 at high decay and accumulates a clamped offset. Add a one-pole
DC blocker (~7 Hz, sub-bass only) on the feedback path so the loop has no DC
gain; the shimmer wash is unaffected.
Adds a regression test (zero-mean input, max shimmer/decay, small tank →
no DC offset vs the no-shimmer baseline). Suite 257.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sanitise control-rate reads (finite check + clamp) before they reach
seconds→frames Int conversions or feedback math, so a NaN/inf/huge size,
delay, downsample, bits, decay, shimmer, damp, or feedback can never trap
the Int() conversion nor poison a feedback loop:
- ShimmerReverb: clamp() helper; bound size to maxSizeSeconds before Int.
- ReverseDelay: finite-clamp delay (to maxDelaySeconds) and feedback.
- SampleRateDecimate: clamp downsample to [1, maximumFactor] before Int.
- BitReduce: finite-guard bits before Int(bits.rounded()).
Adds a ShimmerReverb regression test (NaN controls → finite output).
Keeps `import Foundation` in ShimmerReverb (cos for the init-time Hann
table) with a clarifying comment. Suite 256.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Review nits: denormal-flush the recirculated tank value (not just the
damping state) so denormals can't persist in the buffer and burn RT CPU;
document that the octave-up grains read the recent wet tank content.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Add init-level /// - Parameters: block to ShimmerReverb (dual-location docs).
- Add a pinned-value generator test: with decay/shimmer/damp = 0 the tank is
a unity-DC allpass chain, so two DC levels scale exactly linearly (ratio 2.0,
output-gain independent).
Suite 256.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
New RT-safe ShimmerReverb generator: a damped feedback tank with a
two-grain, 50%-overlap, Hann-windowed octave-up reader INSIDE the feedback
path, so the pitched tail recirculates into an ascending wash (true
regenerative shimmer, not a one-shot parallel pitch-into-reverb). Two
series Schroeder allpasses diffuse the input; a per-sample safety clamp +
denormal flush bound the loop. Buffers pre-allocated for maxDelay + grain;
Hann table precomputed at init; size/decay/shimmer/damp read at control
rate.
ShimmerReverbPedal wraps it (Size/Decay/Shimmer/Damp), registered with
enclosure color + palette slot. Tests: generator silent-in→silent-out,
decay-changes-tail; pedal build/non-silent, shimmer-changes-output, knobs,
preset round-trip, registry. Suite 254.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two new RT-safe generators (ShoeGaze): SampleRateDecimate (sample-and-hold
decimator, control-rate downsample factor) and BitReduce (quantise to
2^bits levels via integer shift, control-rate bit depth). BitcrusherPedal
chains decimate → bit-reduce → tone low-pass (Crush/Bits/Tone).
Registered with enclosure color + palette slot. Tests: build/non-silent,
crush-changes-output, bits-change-output, knobs, registry. Suite 242.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
New RT-safe ReverseDelay generator (ShoeGaze): double-buffered segmented
recorder that plays each segment back reversed, ping-ponging record/play
buffers at each boundary with a linear edge-fade to de-click the wrap and
optional feedback for layered reverse trails. Buffers pre-allocated for
maxDelay; delay/feedback read at control rate; segment length changes only
at a boundary.
ReverseDelayPedal wraps it (Time/Feedback), registered with enclosure
color + palette slot. Tests: build/non-silent, feedback-changes-output,
knobs, preset round-trip, registry. Suite 237.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Stereo rotary-speaker emulation: per-channel Doppler-swept delay (FM) plus
correlated amplitude throb (AM) from one rotor LFO, left/right rotors in
anti-phase for a rotating stereo image. Two-speed Chorale/Tremolo switch
with an Accel knob that ramps the rotor rate via a Lag for authentic
spin-up/spin-down. Depth scales both AM and FM. Runs as a .widener.
Registered (PedalType + registry + enclosure color + palette slot) with
build/non-silent, speed-change, control-surface, preset round-trip, and
registry tests. Suite 232.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Harmonizer: two granular PitchShift voices at fixed musical intervals
(ratio 2^(semitones/12) via Exp), mixed under the dry signal with V1/V2/
Direct level knobs. Two interval "knob pickers" snap through octave,
fifth, fourth, and minor/major third and sixth above and below.
New reusable control:
- PedalSelectorKnob (model) + PedalSelectorKnobView (rotary knob that snaps
to labelled stops; drag up/down to step, shows the stop caption).
- Pedal.effectSelectors hook; PedalView renders a selector row.
- PedalState.selectorValues for preset round-trip (forward-compatible).
Registered + PedalType.harmonizer + enclosure color + palette slot.
Tests: build/non-silent, interval-change-changes-output, selector preset
round-trip, registry. Full suite 213 passing.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
On iOS in light mode, system controls (nav title, engine steppers, the
Record button) rendered black text over the builder's always-dark
background. The builder is dark-themed regardless of system appearance, so
pin its color scheme to .dark.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reclaim vertical space in ShoeGazeBuilderView. The top section now places
the scope + CPU meters on the left (width matched to the mixer's
Solo/Blend/All control column) and a right column that stacks the board
mixer over a horizontal pedal picker. The board canvas takes the full
width below.
- PedalPaletteView gains an `axis` parameter: `.vertical` keeps the
full-width sidebar column; `.horizontal` lays the catalog out as a row of
fixed-width cards for a horizontal scroller.
- Remove the old left palette sidebar and the stacked-under-palette scope.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move the remaining synchronous main-thread I/O off the main actor:
- RigLibraryStore now constructs instantly with a local placeholder and
exposes an awaitable async start(): it resolves the iCloud-or-local
location off-main (the blocking ubiquity lookup), loads entries off-main
via the shared ioQueue (so a reload can't drop a just-saved rig), then
sets isLoaded. reload() is async; iCloud metadata updates re-read via it.
- Seeding moves into RigLibraryBootstrap.start(_:seedFrom:), which seeds a
"Default" rig only AFTER the (possibly iCloud) library has loaded and is
still empty — preventing a duplicate "Default" on every synced device on
first launch.
- Sidebar shows a Loading state until isLoaded; the builder restores the
persisted current-rig highlight when isLoaded flips true (initialRigID
param dropped).
- Shells construct the store synchronously and start it asynchronously
(macOS via Task in didFinishLaunching; iOS via .task). Codec + file
helpers are nonisolated static so background work needs no actor hop.
- Tests await store.start().
Full suite: 206 passing.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Save/delete/eraseAll now update the in-memory entries on the main actor
immediately and run the file write/delete — including NSFileCoordinator —
on a serial background queue, removing the UI stall the synchronous
coordinated write caused (especially on the iCloud path).
- Encoding stays synchronous so encode errors still surface to the caller;
only the disk write is deferred (logs on failure).
- File-system helpers and coordinated I/O are now nonisolated static so the
background queue can call them without touching actor state.
- Add flushPendingWrites() to drain the queue; called by tests asserting
on-disk state and by both app shells at termination / background.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- 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>
Drag/drop only supported add: (palette→anywhere) and same-lane reorders, so
dragging a pedal from the main chain (or another lane) into a Stereo Unzip /
Split / Parallel lane highlighted the lane but the drop was a no-op.
- New core ShoeGaze.movePedal(from:at:to:in:) moves a pedal across lanes,
preserving its PedalState (params), with destination-index correction when the
removal deletes a top-level segment before the target region.
- BoardFlowView routes movemain:/movebranch: payloads dropped on a lane (or the
main chain, or another lane's card) through it via moveAcross(_:toLane:).
Tests: move a main pedal into an unzip lane (params preserved); move a pedal
that sits before the region (index-adjust path).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- PedalView: the ⓘ info button now sits under the top-left corner screw instead
of on the name plate.
- BoardFlowView: empty region lanes (Stereo Unzip / Split / Parallel) were nearly
transparent, so their drop target had no hit area and releases landed on
nothing. Add contentShape(Rectangle()) so the whole lane frame accepts drops.
(Core lane append already worked — verified by existing API tests.)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- PedalRegistry.summaries caches displayName→summary once, so the picker no
longer constructs a fresh Pedal per row on every render.
- performClear stops the engine around the remove-all + reseed and restarts it,
avoiding a one-block bus-reuse glitch (same pattern as loadRig/setInputSource).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A .widener pedal that splits the dry signal into overlapping RBJ band-pass bands
and pans each by frequency (low to left, high to right); the spread knob fans the
spectrum from mono (spread 0) to a wide diffuse image (spread 1), using linear
pan expressed purely as node arithmetic.
Registered, with PedalType.diffuser, enclosure color, palette order, summary,
and tests (non-silent stereo; L == R at spread 0; L != R at full spread).
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>
docs/plans: chorus (stereo), sustainer, ring modulator, and pedal-info UI.
CLAUDE.md: project conventions + a required checklist for new pedals, including
a mandatory user-facing summary used by the pedal-info UI.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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>
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>