5 Commits

Author SHA1 Message Date
josh b6a9dbbb91 Bump builder apps to 1.3.0
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 18:18:33 -07:00
josh ef20a0eb95 Open .shoegaze files: wire document handlers, scope type to builders
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>
2026-06-28 18:11:44 -07:00
josh aeab19236b Share a real file so the macOS share sheet offers full services
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>
2026-06-28 18:03:13 -07:00
josh 8c4b2ab1e7 Update README pedal catalog and release notes
- 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>
2026-06-28 17:57:02 -07:00
josh 3322400b7c Merge rig-sharing-1.3: .shoegaze document type and rig/board sharing 2026-06-28 17:50:51 -07:00
11 changed files with 170 additions and 103 deletions
+59 -6
View File
@@ -154,6 +154,57 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
true
}
/// Opens `.shoegaze` files handed to the app by Finder, AirDrop, "Open With", or a double-click.
///
/// Rig documents are imported into the library (they appear in the sidebar, ready to load);
/// board documents are surfaced with a note that boards are opened from a rig's board editor.
func application(_ application: NSApplication, open urls: [URL]) {
for url: URL in urls {
openShoeGazeDocument(at: url)
}
}
/// Reads and imports a single `.shoegaze` document, reporting the outcome to the user.
private func openShoeGazeDocument(at url: URL) {
// A LaunchServices-supplied URL is security-scoped; start access to read it.
let scoped: Bool = url.startAccessingSecurityScopedResource()
defer { if scoped { url.stopAccessingSecurityScopedResource() } }
do {
let data: Data = try Data(contentsOf: url)
let document: ShoeGazeDocument = try ShoeGazeDocument.decoded(from: data)
if document.rigEntries?.isEmpty == false {
let added: Int = try library.importArchive(from: data)
presentOpenInfo(
title: added == 1 ? "Rig Imported" : "Rigs Imported",
message: added == 1
? "Added 1 rig to your library. Select it in the Rigs sidebar to load it."
: "Added \(added) rigs to your library. Select one in the Rigs sidebar to load it."
)
} else if document.boardVersion != nil {
presentOpenInfo(
title: "Board Document",
message: "This file is a single board. Open a rig, then load the board from the "
+ "board editor's Versions menu."
)
}
} catch {
presentOpenInfo(
title: "Couldn’t Open File",
message: "“\(url.lastPathComponent)” is not a readable ShoeGaze document."
)
print("[ShoeGazeBuilder] open document failed: \(error)")
}
}
/// Shows a one-button informational alert for a document-open outcome.
private func presentOpenInfo(title: String, message: String) {
let alert: NSAlert = NSAlert()
alert.messageText = title
alert.informativeText = message
alert.addButton(withTitle: "OK")
alert.runModal()
}
func applicationWillTerminate(_ notification: Notification) {
RigStore.save(shoeGaze)
// Ensure any in-flight background rig-library writes finish before exit.
@@ -267,20 +318,22 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
@objc private func exportArchiveAction(_ sender: Any?) {
let panel: NSSavePanel = NSSavePanel()
panel.allowedContentTypes = [.json]
panel.nameFieldStringValue = "\(AppDelegate.defaultArchiveFileName).json"
panel.allowedContentTypes = [.shoeGaze]
panel.nameFieldStringValue =
"\(AppDelegate.defaultArchiveFileName).\(ShoeGazeDocument.fileExtension)"
panel.canCreateDirectories = true
let rigLibrary: RigLibraryStore = library
panel.begin { response in
guard response == .OK, let url: URL = panel.url else { return }
do { try rigLibrary.exportArchiveData().write(to: url, options: .atomic) }
catch { print("[ShoeGazeBuilder] export archive failed: \(error)") }
do { try rigLibrary.exportDocumentData().write(to: url, options: .atomic) }
catch { print("[ShoeGazeBuilder] export library failed: \(error)") }
}
}
@objc private func importArchiveAction(_ sender: Any?) {
let panel: NSOpenPanel = NSOpenPanel()
panel.allowedContentTypes = [.json]
// Accept the .shoegaze document plus legacy plain-JSON archives.
panel.allowedContentTypes = [.shoeGaze, .json]
panel.canChooseDirectories = false
panel.allowsMultipleSelection = false
let rigLibrary: RigLibraryStore = library
@@ -290,7 +343,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
let data: Data = try Data(contentsOf: url)
_ = try rigLibrary.importArchive(from: data)
} catch {
print("[ShoeGazeBuilder] import archive failed: \(error)")
print("[ShoeGazeBuilder] import library failed: \(error)")
}
}
}
+1 -1
View File
@@ -13,7 +13,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2.0</string>
<string>1.3.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationCategoryType</key>
+1 -1
View File
@@ -13,7 +13,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2.0</string>
<string>1.3.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
@@ -35,6 +35,7 @@ struct ShoeGazeBuilderiOSApp: App {
.task { await model.startLibrary() }
}
.onDisappear { model.stop() }
.onOpenURL { url in model.importDocument(at: url) }
}
.onChange(of: scenePhase) { _, phase in
// Persist the rig whenever the app leaves the foreground.
@@ -93,6 +93,25 @@ final class ShoeGazeBuilderiOSAppModel {
library.flushPendingWrites()
}
// MARK: - Document open
/// Imports a `.shoegaze` file opened from Files, AirDrop, or another app into the rig library.
/// Rig documents add their rigs (they appear in the sidebar, ready to load); board documents are
/// ignored here. Returns the number of rigs added.
@discardableResult
func importDocument(at url: URL) -> Int {
// A document opened from outside the sandbox is security-scoped; start access to read it.
let scoped: Bool = url.startAccessingSecurityScopedResource()
defer { if scoped { url.stopAccessingSecurityScopedResource() } }
do {
let data: Data = try Data(contentsOf: url)
return try library.importArchive(from: data)
} catch {
print("[ShoeGazeBuilderiOS] open document failed: \(error)")
return 0
}
}
// MARK: - Audio session / engine construction
/// Activates the play-and-record audio session once. Idempotent; safe to call before each
-39
View File
@@ -28,44 +28,5 @@
<string>ShoeGazeDemo can route a hardware input channel through your pedalboard. Enable microphone access to use Live Input mode.</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>ShoeGaze Document</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>net.realizedsound.shoegaze</string>
</array>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>net.realizedsound.shoegaze</string>
<key>UTTypeDescription</key>
<string>ShoeGaze Document</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.json</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>shoegaze</string>
</array>
<key>public.mime-type</key>
<array>
<string>application/json</string>
</array>
</dict>
</dict>
</array>
</dict>
</plist>
-39
View File
@@ -41,44 +41,5 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>ShoeGaze Document</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>net.realizedsound.shoegaze</string>
</array>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>net.realizedsound.shoegaze</string>
<key>UTTypeDescription</key>
<string>ShoeGaze Document</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.json</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>shoegaze</string>
</array>
<key>public.mime-type</key>
<array>
<string>application/json</string>
</array>
</dict>
</dict>
</array>
</dict>
</plist>
+13 -8
View File
@@ -11,14 +11,16 @@ signal (no hardware needed) or on live guitar through an audio input.
## Features
- **22 modeled pedals** across drive, dynamics, EQ/filter, modulation, delay/reverb, and
pitch — see the catalog below.
- **32 modeled pedals** across gain, dynamics, EQ/filter, modulation, pitch, delay, reverb, and
texture — see the catalog below.
- **Multi-board rigs** — build several boards and a board-mixer bar to **Solo** one (amp-channel
style) or **Blend** any subset, each with its own level and a click-free crossfade.
- **Signal-flow editor** — drag pedals in from the palette; reorder, split into parallel or
stereo lanes, and merge back to mono.
- **Rig library** — name, save, duplicate, and switch between rigs from a sidebar; synced across
your devices and both apps via iCloud, with JSON archive import/export for backup.
your devices and both apps via iCloud.
- **Sharing** — send a rig or a saved board to anyone as a `.shoegaze` file via the system share
sheet (AirDrop, Mail, Messages, Files); export/import the whole library the same way.
- **Recording** — capture your output to timestamped files.
- **Test signal or live input** — a built-in arpeggiated test loop (shared across all boards so
they stay phase-locked) or a hardware input channel.
@@ -29,11 +31,14 @@ signal (no hardware needed) or on live guitar through an audio input.
| Category | Pedals |
|---|---|
| Drive & dynamics | Overdrive, Fuzz, Compressor, Sustainer, Limiter, Noise Gate |
| EQ & filter | Graphic EQ, Auto-Wah, Mutant, Phaser |
| Modulation | Tremolo, Modulation, Chorus, Ring Modulator, Diffuser |
| Delay & reverb | Delay, Feedback Delay, Multi-Tap Delay, Ping-Pong, Reverb |
| Pitch & octave | Octave Splitter, Bass Octaver |
| Gain | Overdrive, Distortion, Fuzz |
| Dynamics | Compressor, Sustainer, Limiter, Noise Gate |
| EQ & filter | Graphic EQ, Auto-Wah, Mutant |
| Modulation | Tremolo, Phaser, Modulation, Chorus, Flanger, Vibrato, Rotary, Ring Modulator |
| Pitch | Bass Octaver, Octave Splitter, Harmonizer |
| Delay | Delay, Feedback Delay, Multi-Tap Delay, Ping-Pong, Reverse Delay |
| Reverb | Reverb, Shimmer Reverb |
| Texture | Diffuser, Bitcrusher, Granulator, Auto Granulator |
Every pedal exposes its parameters as knobs/switches and round-trips through the rig save format.
+48
View File
@@ -1,5 +1,53 @@
# Releases
## 1.3.0 — 2026-06-28
### Sharing — the `.shoegaze` document type
- New shareable file type **`.shoegaze`** (`net.realizedsound.shoegaze`, conforming to
`public.json`) registered by every app, so the system associates the file with ShoeGaze for
Open and Share.
- **Share a rig** from the library sidebar (per-rig) and **share a saved board** from the board
editor's Versions menu, via the OS share sheet — AirDrop, Mail, Messages, Files. Local only; no
account or backend.
- Library **export/import migrated** to `.shoegaze`. A document wraps either a whole rig (or many)
or a single board; legacy archive and single-rig JSON files still import.
- Internal per-rig and board-version files stay app-private JSON — only the share/export surface
uses `.shoegaze`.
## 1.2.0 — 2026-06-28
### New pedals (catalog now 32)
- **Distortion** — mid-gain saturation between Overdrive and Fuzz.
- **Flanger** — sweeping comb-filter jet with feedback.
- **Vibrato** — pure pitch wobble, fully wet.
- **Rotary** — Leslie rotary-speaker: Doppler wobble + volume throb, two-speed with accel ramp.
- **Harmonizer** — two pitch-shifted harmony voices at fixed musical intervals (stepped knob).
- **Reverse Delay** — backward-tape segments with feedback trails.
- **Shimmer Reverb** — regenerative reverb whose tail climbs an octave as it sustains.
- **Bitcrusher** — sample-rate decimation + bit-depth reduction + tone.
- **Granulator** — stereo grain cloud, scattered across the field by Spread.
- **Auto Granulator** — granulator whose grain size tracks your dynamics (Response switch).
### Rig library (iCloud)
- Rigs are a managed **library** in the sidebar (New, Save, Save As, Duplicate, Rename, Delete,
Erase All), each holding multiple boards.
- **iCloud sync** across devices and both apps via a shared container, with a local fallback.
- **Archive** import/export bundles the whole library as one hand-editable JSON file (replaced the
old single-rig save/load); legacy single-rig files still import.
- macOS File menu: New Rig (⌘N), Save Rig (⌘S), Export / Import Archive (⌘E / ⌘I). Saves/loads run
off the main thread.
### Builder UI
- Reworked top layout (scope + CPU beside a stacked board-mixer / pedal-picker); **colour-coded**
pedal cards with a **filter-by-type** menu; routing cards in their own row.
- Dark color scheme pinned (fixes black-on-dark system controls on iOS); input-source picker
reflects the In channel count immediately; failed edits surface as alerts.
### Fixes / under the hood
- Granulators are now latency-free; Shimmer Reverb DC-blocked. New RT-safe generators
(`ReverseDelay`, `SampleRateDecimate`, `BitReduce`, `ShimmerReverb`, `StereoGranulator`) and a
reusable `PedalSelectorKnob`. 271 tests; RT-safety reviewed.
## 1.1.1 — 2026-06-26
### Fixes
@@ -11,9 +11,10 @@ import LyrebirdShoeGaze
/// A `Transferable` wrapper that lets a `ShareLink` send a single board as a `.shoegaze` document.
///
/// Mirrors ``RigShareItem`` for a board snapshot: it holds the already-encoded document bytes and
/// the system serialises them to a temporary `<board>.shoegaze` file for AirDrop, Mail, Messages,
/// and Files.
/// Mirrors ``RigShareItem`` for a board snapshot: it holds the already-encoded document bytes and,
/// via `FileRepresentation`, writes them to a temporary `<board>.shoegaze` file when a share
/// destination is picked — giving the share sheet a real file so AirDrop, Messages, Mail, Notes,
/// and Files all appear (raw data collapses the macOS menu to Copy / Edit Extensions).
struct BoardShareItem: Transferable, Sendable {
/// Filesystem-safe base name for the shared file (no extension).
@@ -32,8 +33,8 @@ struct BoardShareItem: Transferable, Sendable {
}
static var transferRepresentation: some TransferRepresentation {
DataRepresentation(exportedContentType: .shoeGaze) { item in
item.data
FileRepresentation(exportedContentType: .shoeGaze) { item in
SentTransferredFile(try writeShoeGazeShareFile(item.data, base: item.filenameBase))
}
.suggestedFileName { item in
"\(item.filenameBase).\(ShoeGazeDocument.fileExtension)"
+22 -4
View File
@@ -13,8 +13,12 @@ import LyrebirdShoeGaze
///
/// Holds the already-encoded document bytes (a value type, so the wrapper is `Sendable` as
/// `Transferable` requires). The encode happens when the share menu is built for the focused row —
/// cheap, one rig — via the throwing ``init(rig:)``. The system serialises the bytes to a temporary
/// file named `<rig>.shoegaze` for AirDrop, Mail, Messages, and Files.
/// cheap, one rig — via the throwing ``init(rig:)``.
///
/// Uses `FileRepresentation` (not `DataRepresentation`): the share sheet — AirDrop, Messages,
/// Mail, Notes, Files — only offers its full service list when handed a real file on disk. The
/// bytes are written to a temporary `<rig>.shoegaze` when a destination is picked. Sharing raw
/// data instead collapses the macOS menu to just Copy / Edit Extensions.
struct RigShareItem: Transferable, Sendable {
/// Filesystem-safe base name for the shared file (no extension).
@@ -33,8 +37,8 @@ struct RigShareItem: Transferable, Sendable {
}
static var transferRepresentation: some TransferRepresentation {
DataRepresentation(exportedContentType: .shoeGaze) { item in
item.data
FileRepresentation(exportedContentType: .shoeGaze) { item in
SentTransferredFile(try writeShoeGazeShareFile(item.data, base: item.filenameBase))
}
.suggestedFileName { item in
"\(item.filenameBase).\(ShoeGazeDocument.fileExtension)"
@@ -54,3 +58,17 @@ func shareFilenameBase(_ name: String) -> String {
let trimmed: String = mapped.trimmingCharacters(in: CharacterSet(charactersIn: "_"))
return trimmed.isEmpty ? "ShoeGaze" : trimmed
}
/// Writes `data` to a uniquely-named temporary `<base>.shoegaze` file and returns its URL, for a
/// `FileRepresentation` to hand the share sheet a real file. A fresh per-share subdirectory avoids
/// collisions when the same name is shared twice. Shared by ``RigShareItem`` and ``BoardShareItem``.
func writeShoeGazeShareFile(_ data: Data, base: String) throws -> URL {
let directory: URL = FileManager.default.temporaryDirectory
.appendingPathComponent("ShoeGazeShare-\(UUID().uuidString)", isDirectory: true)
try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true)
let url: URL = directory
.appendingPathComponent(base)
.appendingPathExtension(ShoeGazeDocument.fileExtension)
try data.write(to: url, options: .atomic)
return url
}