// BoardSegment.swift // Lyrebird // // Copyright (c) 2026 Joshua Parmenter / realizedsound // SPDX-License-Identifier: MIT /// One ordered element of a ``PedalBoard``'s signal chain, used to capture full topology /// (including parallel and stereo split regions) in signal-flow order. /// /// `PedalBoard` records these as pedals and split regions are added, so a board can be /// serialized and rebuilt faithfully rather than as a flat pedal list. Branch pedals live /// inside their section objects, not as separate segments. enum BoardSegment { /// A single linear pedal in the main chain. case pedal(Pedal) /// A parallel section (`split()` → two branches → `merge()`). case parallel(ParallelSection) /// A stereo split region (`splitStereo()` → two branches → `collectStereo()`). case stereoSplit(StereoSplitSection) /// A `mergeToMono()` collapse — narrows a stereo tail back to mono. Carries no state; /// recorded so the width transition replays on rebuild. case mergeToMono }