Add mono→stereo routing to PedalBoard

Introduce chain width propagation (mono=1 / stereo=2, capped at 2),
represented as a pair of mono buses to reuse existing infrastructure.

- Pedal: width-parameterized build() with channelKind (mono / widener /
  stereoNative); effect() runs per channel for auto-stereoize, shared knobs.
- PedalBoard: width tracking, add() dispatch, mergeToMono(), splitStereo()/
  collectStereo() with four route modes (stereo / leftOnly / rightOnly /
  bypass), centered solo, click-free lagged gains.
- BoardOutputMaster: width-aware (Pan2 mono, direct L/R stereo).
- New routing nodes: StereoSplitter, StereoRouteCollector, StereoSplitSection.
- Reference pedals: OctaveUpSplitterPedal (widener), PingPongDelayPedal
  (stereo-native).
- 12 stereo-routing tests; full suite 108/108.

Design: docs/stereo-routing-design.md

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-21 16:48:25 -07:00
parent ca4cabb42f
commit f89229282f
14 changed files with 1486 additions and 34 deletions
+2 -1
View File
@@ -181,7 +181,8 @@ public final class ShoeGaze {
/// - Throws: `EngineAddError` if the engine rejects the master node.
public func finalizeBoard(_ board: PedalBoard) throws {
let master: BoardOutputMaster = BoardOutputMaster(
boardOutputBusIndex: board.outputBus.index
boardOutputBusIndex: board.outputBus.index,
boardOutputBusRightIndex: board.outputBusRight?.index
)
// The master evaluates after the entire chain (pedals, splitters, mergers).
// `board.tailNode` returns the last inserted node (any Synthesizer), which covers