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:
@@ -34,26 +34,69 @@ public struct ShoeGazeState: Codable, Equatable {
|
||||
/// version bump is required for this additive field.
|
||||
public let midiMap: MIDIMap?
|
||||
|
||||
/// The rig's tempo in BPM at save time, or `nil` for a rig saved before tempo persistence.
|
||||
/// Restored onto the shared clock on load; `nil` leaves the current session tempo untouched.
|
||||
public let bpm: Double?
|
||||
|
||||
/// Whether the tempo indicator and tempo-synced features were enabled at save time, or `nil`
|
||||
/// for a rig saved before tempo persistence.
|
||||
public let tempoEnabled: Bool?
|
||||
|
||||
/// How the board head bus was fed at save time (test loop or a live-input channel), or `nil`
|
||||
/// for a rig saved before input persistence. A saved live-input channel that no longer exists
|
||||
/// on the loading engine falls back to the test loop.
|
||||
public let inputSource: InputSource?
|
||||
|
||||
/// The engine's hardware input-channel count at save time, or `nil` for a rig saved before I/O
|
||||
/// persistence. Reapplied on load (when the engine is stopped and the count differs), so a rig
|
||||
/// can restore its channel layout. Hardware that can't supply the count is negotiated at
|
||||
/// `engine.start()`, exactly as with a manual reconfigure.
|
||||
public let numInputChannels: Int?
|
||||
|
||||
/// The engine's hardware output-channel count at save time, or `nil` for a rig saved before I/O
|
||||
/// persistence. Reapplied on load under the same conditions as ``numInputChannels``.
|
||||
public let numOutputChannels: Int?
|
||||
|
||||
/// Creates a rig state snapshot.
|
||||
///
|
||||
/// - Parameters:
|
||||
/// - version: Preset format version. Defaults to `presetFormatVersion`.
|
||||
/// - boards: Ordered list of board state snapshots.
|
||||
/// - midiMap: The rig's MIDI bindings, or `nil` when there are none. Defaults to `nil`.
|
||||
/// - bpm: The rig's tempo in BPM, or `nil` to not persist a tempo. Defaults to `nil`.
|
||||
/// - tempoEnabled: Whether tempo features were enabled, or `nil`. Defaults to `nil`.
|
||||
/// - inputSource: The rig's input selection, or `nil` to not persist one. Defaults to `nil`.
|
||||
/// - numInputChannels: The engine input-channel count, or `nil`. Defaults to `nil`.
|
||||
/// - numOutputChannels: The engine output-channel count, or `nil`. Defaults to `nil`.
|
||||
public init(
|
||||
version: Int = presetFormatVersion,
|
||||
boards: [BoardState],
|
||||
midiMap: MIDIMap? = nil
|
||||
midiMap: MIDIMap? = nil,
|
||||
bpm: Double? = nil,
|
||||
tempoEnabled: Bool? = nil,
|
||||
inputSource: InputSource? = nil,
|
||||
numInputChannels: Int? = nil,
|
||||
numOutputChannels: Int? = nil
|
||||
) {
|
||||
self.version = version
|
||||
self.boards = boards
|
||||
self.midiMap = midiMap
|
||||
self.bpm = bpm
|
||||
self.tempoEnabled = tempoEnabled
|
||||
self.inputSource = inputSource
|
||||
self.numInputChannels = numInputChannels
|
||||
self.numOutputChannels = numOutputChannels
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case version
|
||||
case boards
|
||||
case midiMap
|
||||
case bpm
|
||||
case tempoEnabled
|
||||
case inputSource
|
||||
case numInputChannels
|
||||
case numOutputChannels
|
||||
}
|
||||
|
||||
/// Decodes a rig snapshot, tolerating an absent, malformed, OR legacy-format `midiMap`.
|
||||
@@ -79,5 +122,12 @@ public struct ShoeGazeState: Codable, Equatable {
|
||||
} else {
|
||||
self.midiMap = nil
|
||||
}
|
||||
|
||||
// Additive tempo + input + I/O fields: absent in older rigs, so decode leniently to `nil`.
|
||||
self.bpm = try container.decodeIfPresent(Double.self, forKey: .bpm)
|
||||
self.tempoEnabled = try container.decodeIfPresent(Bool.self, forKey: .tempoEnabled)
|
||||
self.inputSource = try container.decodeIfPresent(InputSource.self, forKey: .inputSource)
|
||||
self.numInputChannels = try container.decodeIfPresent(Int.self, forKey: .numInputChannels)
|
||||
self.numOutputChannels = try container.decodeIfPresent(Int.self, forKey: .numOutputChannels)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user