Add MIDI foot-controller control; board/rig bypass; iOS fixes
Headline: MIDI control for a Behringer FCB1010 (four phases). - MIDIController (Lyrebird MIDI client): connection indicator via source polling, background-queue->main-actor hop, MIDI Learn. - Volume and Wah pedals (Wah reuses the SVF bandpass sweep, driven by pedal position instead of an envelope follower). - CC -> any pedal knob (0-127 mapped across the knob range). - Program Change -> pedal/board/rig toggles: software latch for booleans, exclusive radio for board solo. Positional addressing with display-name hints; stale/out-of-range bindings are skipped, not fired. - Per-rig MIDIMap embedded in ShoeGazeState as an optional field (old rigs decode to nil; no preset version bump). Central MIDI Mapping sheet with Learn/Clear per control. Also included (same working branch): - Full board bypass and rig bypass (dry passthrough via cascaded crossfades in BoardOutputMaster), with UI toggles. - Horizontal pedal picker grouped by category in filter order. - Drag a palette pedal onto a chain card to insert before it (ShoeGaze.insertPedal); tap still appends. - iOS: guard macOS-only .menuStyle(.borderlessButton) to silence the _UIReparentingView warning; iCloud-unavailable alert; keep the device awake while audio runs. Tests: 24 added (Volume/Wah, MIDIMap Codable incl. legacy decode, CC and PC controller behavior, insert/bypass API). Full suite green; macOS and iOS app targets build. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,10 @@ struct RigLibrarySidebarView: View {
|
||||
let onImportArchive: () -> Void
|
||||
let onExportArchive: () -> Void
|
||||
|
||||
/// Invoked when the local-only (iCloud-unavailable) status icon is tapped, so the host can
|
||||
/// explain how to re-enable iCloud sync. Defaults to a no-op.
|
||||
var onShowCloudStatus: () -> Void = {}
|
||||
|
||||
private static let timestampFormat: Date.FormatStyle =
|
||||
Date.FormatStyle(date: .abbreviated, time: .shortened)
|
||||
|
||||
@@ -69,13 +73,27 @@ struct RigLibrarySidebarView: View {
|
||||
.font(.headline)
|
||||
.foregroundStyle(Color.white)
|
||||
Spacer()
|
||||
// Cloud icon when the library is iCloud-backed; a slash when local-only.
|
||||
Image(systemName: store.isICloud ? "icloud" : "icloud.slash")
|
||||
cloudStatusIcon
|
||||
}
|
||||
}
|
||||
|
||||
/// Cloud icon when the library is iCloud-backed; a tappable slash when local-only (tap explains
|
||||
/// how to re-enable sync).
|
||||
@ViewBuilder
|
||||
private var cloudStatusIcon: some View {
|
||||
if store.isICloud {
|
||||
Image(systemName: "icloud")
|
||||
.font(.caption)
|
||||
.foregroundStyle(Color.white.opacity(RigLibrarySidebarView.headerOpacity))
|
||||
.help(store.isICloud
|
||||
? "Synced with iCloud across your devices"
|
||||
: "iCloud unavailable — rigs are stored on this device only")
|
||||
.help("Synced with iCloud across your devices")
|
||||
} else {
|
||||
Button { onShowCloudStatus() } label: {
|
||||
Image(systemName: "icloud.slash")
|
||||
.font(.caption)
|
||||
.foregroundStyle(Color.white.opacity(RigLibrarySidebarView.headerOpacity))
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.help("iCloud unavailable — tap for details. Rigs are stored on this device only")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user