Add Stereo Unzip: process a stereo signal's L/R independently
A stereo-output pedal (Ping-Pong, Octave Splitter) now shows a "Stereo flow / Split L/R" toggle on its card: - Stereo flow (default): unchanged broadcast behavior — following pedals process both channels as one stereo flow. - Split L/R: inserts a Stereo Unzip region right after the pedal, routing the L channel into one lane and R into the other for independent processing, then recombining to stereo with the same route/solo/bypass control as the stereo split. Engine/core: - StereoUnzipSplitter: 2-in -> 3-out node (L->lane L, R->lane R, and a centered 0.5*L+0.5*R dry tap for the bypass route). - PedalBoard.unzipStereo() mirrors splitStereo() but reads both tails and requires width 2; reuses collectStereo / StereoSplitSection / StereoRouteCollector. New stereoUnzipSections (cleared on teardown). - BoardSegment/.stereoUnzip + StereoUnzipState round-trip via preset capture/rebuild/applyState. - ShoeGaze.insertStereoUnzip(afterSegment:)/isStereoUnzip(afterSegment:) drive the toggle; invalid insert (mono tail) throws cannotUnzipMonoChain and the atomic rebuild keeps the board intact. - StereoSplitSection.splitter relaxed to `any Synthesizer` (stored only) so it can hold either splitter type. UI: per-pedal toggle + STEREO UNZIP region rendering in BoardFlowView. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -32,8 +32,9 @@ public final class StereoSplitSection {
|
||||
|
||||
// MARK: - Nodes and chains
|
||||
|
||||
/// The splitter that fans the pre-split mono signal into both branches plus the dry tap.
|
||||
public let splitter: StereoSplitter
|
||||
/// The head node that feeds the two branches plus the dry tap — a ``StereoSplitter`` for a
|
||||
/// mono split, or a ``StereoUnzipSplitter`` for a stereo unzip. Stored for reference only.
|
||||
public let splitter: any Synthesizer
|
||||
|
||||
/// The left branch sub-chain. Its tail becomes the left output channel.
|
||||
public let left: BranchChain
|
||||
@@ -60,13 +61,13 @@ public final class StereoSplitSection {
|
||||
/// Creates a stereo split section. Called internally by ``PedalBoard/splitStereo()``.
|
||||
///
|
||||
/// - Parameters:
|
||||
/// - splitter: The ``StereoSplitter`` feeding the two branches and the dry tap.
|
||||
/// - splitter: The head node feeding the two branches and the dry tap.
|
||||
/// - left: The left branch sub-chain.
|
||||
/// - right: The right branch sub-chain.
|
||||
/// - sharedTail: The shared tail tracking pointer used by both branch chains.
|
||||
/// - dryTapBus: The clean pre-split tap bus.
|
||||
init(
|
||||
splitter: StereoSplitter,
|
||||
splitter: any Synthesizer,
|
||||
left: BranchChain,
|
||||
right: BranchChain,
|
||||
sharedTail: SharedTail,
|
||||
|
||||
Reference in New Issue
Block a user