// StereoUnzipState.swift // Lyrebird // // Copyright (c) 2026 Joshua Parmenter / realizedsound // SPDX-License-Identifier: MIT /// Serialisable snapshot of a stereo unzip region (`unzipStereo()` → two branches → /// `collectStereo()`). /// /// Captures the left and right branch pedal chains in signal-flow order plus the active /// ``StereoRoute``. Reconstructed by `loadRig`/`rebuildBoard` via `board.unzipStereo()`, adding the /// branch pedals, `board.collectStereo(_:)`, then restoring `route`. Structurally identical to /// ``StereoSplitState`` — the distinct type keeps the unzip vs split distinction in presets so the /// correct splitter (stereo-deinterleave vs mono-duplicate) is rebuilt. public struct StereoUnzipState: Codable, Equatable { /// Left-channel branch pedal snapshots in signal-flow order. public let left: [PedalState] /// Right-channel branch pedal snapshots in signal-flow order. public let right: [PedalState] /// The output route mode (`.stereo` / `.leftOnly` / `.rightOnly` / `.bypass`). public let route: StereoRoute /// Creates a stereo unzip snapshot. /// /// - Parameters: /// - left: Left-branch pedal snapshots in order. /// - right: Right-branch pedal snapshots in order. /// - route: The output route mode. public init( left: [PedalState], right: [PedalState], route: StereoRoute ) { self.left = left self.right = right self.route = route } }