25 lines
731 B
Swift
25 lines
731 B
Swift
// DSLOutput.swift
|
|
// Lyrebird
|
|
//
|
|
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
// One built statement from a DSL program: a graph, and the slot name it should
|
|
// play into (nil for an anonymous output). The host turns these into
|
|
// `context.play` / `context.play(slot:)` calls.
|
|
|
|
import LyrebirdSynth
|
|
|
|
/// A built DSL statement ready for the host to play.
|
|
public struct DSLOutput {
|
|
/// The named slot to play into, or `nil` for an anonymous output.
|
|
public let slot: String?
|
|
/// The built generator graph.
|
|
public let graph: any ValidGeneratorInput
|
|
|
|
public init(slot: String?, graph: any ValidGeneratorInput) {
|
|
self.slot = slot
|
|
self.graph = graph
|
|
}
|
|
}
|