Release 2.0.0: metronome, rig mute + shortcuts, set-list ordering, per-rig persistence
- 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>
This commit is contained in:
@@ -65,6 +65,9 @@ public struct ShoeGazeBuilderView: View {
|
||||
private static let maxCrossfadeSeconds: Double = 10.0
|
||||
/// Highest board reachable via a ⌘-number switch shortcut.
|
||||
private static let maxBoardShortcuts: Int = 9
|
||||
|
||||
/// The number of set-list rigs reachable by ⌘⇧1…⌘⇧0 (the top ten).
|
||||
private static let maxRigShortcuts: Int = 10
|
||||
/// Default filename offered when exporting the whole library as an archive.
|
||||
private static let defaultArchiveFileName: String = "ShoeGaze Library"
|
||||
/// Extra width reserved for the rig-library sidebar on top of the builder's minimum width.
|
||||
@@ -311,6 +314,11 @@ public struct ShoeGazeBuilderView: View {
|
||||
.onReceive(NotificationCenter.default.publisher(for: .shoeGazeNewRig)) { _ in
|
||||
promptNewRig()
|
||||
}
|
||||
.onReceive(NotificationCenter.default.publisher(for: .shoeGazeLoadRigSlot)) { note in
|
||||
if let index: Int = note.object as? Int {
|
||||
loadRigSlot(index)
|
||||
}
|
||||
}
|
||||
.confirmationDialog(
|
||||
"Clear all boards?",
|
||||
isPresented: $showClearDialog,
|
||||
@@ -578,14 +586,7 @@ public struct ShoeGazeBuilderView: View {
|
||||
ScrollView(.horizontal, showsIndicators: false) {
|
||||
HStack(spacing: ShoeGazeBuilderView.rowSpacing) {
|
||||
rigBypassButton
|
||||
// fixedSize stops the switch Toggle from expanding to fill the row (which pushed
|
||||
// the following controls far to the right, under the scope).
|
||||
Toggle("Mute rig", isOn: Binding(
|
||||
get: { shoeGaze.tunerMutesRig },
|
||||
set: { shoeGaze.tunerMutesRig = $0 }
|
||||
))
|
||||
.toggleStyle(.switch)
|
||||
.fixedSize()
|
||||
rigMuteButton
|
||||
helpButton
|
||||
if let midi: MIDIController = midi {
|
||||
MIDIIndicatorView(controller: midi) { showMIDISheet = true }
|
||||
@@ -942,6 +943,7 @@ public struct ShoeGazeBuilderView: View {
|
||||
}
|
||||
helpButton
|
||||
rigBypassButton
|
||||
rigMuteButton
|
||||
EngineConfigView(
|
||||
shoeGaze: shoeGaze,
|
||||
hardwareSampleRate: hardwareSampleRate,
|
||||
@@ -951,12 +953,13 @@ public struct ShoeGazeBuilderView: View {
|
||||
.frame(height: TempoView.enabledHeight)
|
||||
|
||||
HStack(spacing: ShoeGazeBuilderView.rowSpacing) {
|
||||
// Mute-rig-while-tuning toggle sits to the left of the input selector.
|
||||
Toggle("Mute rig", isOn: Binding(
|
||||
// Whether engaging the tuner silences the rig; sits left of the input selector.
|
||||
Toggle("Mute while tuning", isOn: Binding(
|
||||
get: { shoeGaze.tunerMutesRig },
|
||||
set: { shoeGaze.tunerMutesRig = $0 }
|
||||
))
|
||||
.toggleStyle(.switch)
|
||||
.fixedSize()
|
||||
|
||||
Text("Input:")
|
||||
.font(.subheadline)
|
||||
@@ -1010,6 +1013,22 @@ public struct ShoeGazeBuilderView: View {
|
||||
.help("Bypass the entire rig — every board passes your dry input straight through")
|
||||
}
|
||||
|
||||
/// Global rig mute — a hard gate to silence the whole output (distinct from Bypass, which
|
||||
/// passes the dry signal through). Lit when engaged. A live performance panic/silence control.
|
||||
private var rigMuteButton: some View {
|
||||
let muted: Bool = shoeGaze.rigMuted
|
||||
return Button {
|
||||
shoeGaze.toggleRigMuted()
|
||||
} label: {
|
||||
Label(muted ? "Rig Muted" : "Mute Rig",
|
||||
systemImage: muted ? "speaker.slash.fill" : "speaker.wave.2.fill")
|
||||
.font(.subheadline)
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.tint(muted ? .red : .gray)
|
||||
.help("Mute the entire rig output — silences all sound")
|
||||
}
|
||||
|
||||
// MARK: - Board area
|
||||
|
||||
private var boardArea: some View {
|
||||
@@ -1213,19 +1232,40 @@ public struct ShoeGazeBuilderView: View {
|
||||
// MARK: - Board-switch shortcuts
|
||||
|
||||
/// Hidden ⌘1…⌘9 buttons that solo (live-switch to) the matching board and select it as the
|
||||
/// edit target. Kept at zero opacity so the shortcuts stay active without showing chrome.
|
||||
/// edit target, plus ⌘M to toggle the rig mute. Kept at zero opacity so the shortcuts stay
|
||||
/// active without showing chrome.
|
||||
private var boardSwitchShortcuts: some View {
|
||||
ZStack {
|
||||
ForEach(0 ..< min(ShoeGazeBuilderView.maxBoardShortcuts, shoeGaze.boards.count), id: \.self) { index in
|
||||
Button("") { switchToBoard(index) }
|
||||
// Titles are invisible (the ZStack is opacity 0) but feed the iPadOS ⌘-hold
|
||||
// discoverability HUD, so the shortcut reads as a named command there.
|
||||
Button("Switch to Board \(index + 1)") { switchToBoard(index) }
|
||||
.keyboardShortcut(KeyEquivalent(Character("\(index + 1)")), modifiers: .command)
|
||||
}
|
||||
// ⌘Z toggles rig mute on iOS/iPadOS hardware keyboards. On macOS the Board menu item
|
||||
// owns the ⌘Z equivalent, so it is not also bound here (a double-bound event is ambiguous).
|
||||
#if !os(macOS)
|
||||
Button("Mute / Unmute Rig") { shoeGaze.toggleRigMuted() }
|
||||
.keyboardShortcut("z", modifiers: .command)
|
||||
// ⌘⇧1…⌘⇧9 + ⌘⇧0 load set-list rigs 1…10. macOS binds these via the Rigs ▸ Set List menu
|
||||
// instead, so they are not also bound here.
|
||||
ForEach(0 ..< ShoeGazeBuilderView.maxRigShortcuts, id: \.self) { slot in
|
||||
Button("Load Set List Rig \(slot + 1)") { loadRigSlot(slot) }
|
||||
.keyboardShortcut(ShoeGazeBuilderView.rigSlotKey(slot), modifiers: [.command, .shift])
|
||||
}
|
||||
#endif
|
||||
}
|
||||
.opacity(0)
|
||||
.frame(width: 0, height: 0)
|
||||
.accessibilityHidden(true)
|
||||
}
|
||||
|
||||
/// The key equivalent for set-list slot `slot` (0-based): slots 0…8 map to `1`…`9`, slot 9 to
|
||||
/// `0` — matching the ⌘⇧1…⌘⇧0 physical row.
|
||||
private static func rigSlotKey(_ slot: Int) -> KeyEquivalent {
|
||||
KeyEquivalent(Character(slot < 9 ? "\(slot + 1)" : "0"))
|
||||
}
|
||||
|
||||
/// Solos board `index` (a live amp-channel-style switch) and makes it the edit target.
|
||||
private func switchToBoard(_ index: Int) {
|
||||
guard index < shoeGaze.boards.count else { return }
|
||||
@@ -1315,6 +1355,16 @@ public struct ShoeGazeBuilderView: View {
|
||||
transportTick.toggle()
|
||||
}
|
||||
|
||||
/// Loads the set-list rig at zero-based `index` (the library's manual order), if one exists.
|
||||
/// Backs the ⌘⇧1…⌘⇧0 shortcuts and the macOS Rigs ▸ Set List menu. Routes through
|
||||
/// ``requestLoad(_:)`` so the unsaved-changes prompt and no-op-if-current behaviour apply.
|
||||
///
|
||||
/// - Parameter index: Zero-based slot index (0…9).
|
||||
private func loadRigSlot(_ index: Int) {
|
||||
guard index >= 0, index < library.entries.count else { return }
|
||||
requestLoad(library.entries[index])
|
||||
}
|
||||
|
||||
/// Switches to `entry`, prompting to save first when the current rig has unsaved changes.
|
||||
/// No-op when `entry` is already the current rig.
|
||||
private func requestLoad(_ entry: RigEntry) {
|
||||
|
||||
Reference in New Issue
Block a user