2c970aa344
- Recall router state in applyState: the lightweight (no-rebuild) recall path now positionally applies router branch pedal params and the splitter/merger blend, instead of silently dropping them for routed rigs. Test added. - Simplify first-run seeding: RigLibraryStore.save persists asynchronously (best-effort, logged not thrown), so the previous per-entry rollback could never fire for a real disk failure. Replaced with an honest best-effort save + working-rig fallback, and a comment stating the semantics. - Move FactoryRigBuild to its own file (one public type per file). - Document that a router's output master gain is intentionally not persisted, matching BoardState's treatment of board master gain. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
18 lines
691 B
Swift
18 lines
691 B
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)
|
|
}
|