2aea609f34
Replace the code-built Garcia with the user's hand-authored version, transcribed verbatim as a ShoeGazeState: Board 1 (Bass Octaver, Mutant, Overdrive, Graphic EQ, Phaser, Delay, Fullerton Reverb) and Board 2 (Overdrive, Graphic EQ, Compressor, Fullerton Reverb), preserving exact mix, graphic-EQ slider, cab-selector and amp sag/bias values. Input source and channel counts are omitted so the rig stays input-agnostic. Adds a FactoryRigBuild.state case (and matching FactoryRig init) for rigs shipped as a pre-captured state rather than a live builder, and bumps seedVersion to 3 so existing libraries refresh Garcia to the new version. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
25 lines
1.2 KiB
Swift
25 lines
1.2 KiB
Swift
// FactoryRigBuild.swift
|
|
// Lyrebird
|
|
//
|
|
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
/// How a ``FactoryRig`` builds its graph at seed time.
|
|
public enum FactoryRigBuild: Sendable {
|
|
|
|
/// Appends pedals to a single pre-made, empty board; the seeding driver calls `addBoard` before
|
|
/// and `finalizeBoard` after.
|
|
case singleBoard(@MainActor (_ session: ShoeGaze, _ board: PedalBoard) throws -> Void)
|
|
|
|
/// Builds the whole graph against the session (boards and/or routers), owning its own
|
|
/// `addBoard`/`finalizeBoard` and `makeChainRouter`/`finalize` lifecycle.
|
|
case session(@MainActor (_ session: ShoeGaze) throws -> Void)
|
|
|
|
/// Ships a pre-captured ``ShoeGazeState`` directly — the entry is built from it with no live
|
|
/// session. Use for a complex, hand-authored rig captured from the app, where transcribing the
|
|
/// exact `PedalState` arrays (mix, sliders, selectors, advanced values) is more faithful than
|
|
/// re-deriving them through typed setters. The closure returns the state so the case stays
|
|
/// `Sendable` without requiring `ShoeGazeState` itself to be `Sendable`.
|
|
case state(@MainActor () -> ShoeGazeState)
|
|
}
|