Files
Lyrebird/Sources/Lyrebird/AUv3/LyrebirdAUFactoryPreset.swift
T
josh b6fdee8bfc Lyrebird 2.0.0 — Linux support
Consolidated release: the cross-platform Linux port (engine, generators, CLI,
REPL, NRT, portable DSP), live ALSA audio + ALSA MIDI + POSIX OSC + portable
WAV codec, the GTK4 GUI (LyrebirdUI on the SwiftOpenUI backend), and the Linux
live-coding scratchpad (LiveCompile). Apple platforms unchanged; all additive.
See RELEASES.md and LINUX_README.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-10 21:09:11 -07:00

45 lines
1.5 KiB
Swift

// LyrebirdAUFactoryPreset.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
#if canImport(AudioToolbox)
import Foundation
import AudioToolbox
/// One named factory preset that a `LyrebirdAudioUnit` subclass returns from
/// `factoryPresetsForLyrebird()`.
///
/// A preset combines:
/// - `name`: human-readable name shown in the host's preset menu.
/// - `scalarValues`: per-parameter scalar values keyed by `@LiveParam` /
/// `@UIParam` property name.
/// - `sourceSlots`: optional per-parameter source-slot generator descriptors.
/// Each descriptor's `typeID` must be registered with
/// ``LyrebirdAUPresetSourceRegistry`` for the host's preset-load path to
/// reconstruct the generator.
public struct LyrebirdAUFactoryPreset: Sendable {
/// Human-readable preset name shown by the host.
public let name: String
/// Per-parameter scalar values keyed by property name.
public let scalarValues: [String: AUValue]
/// Per-parameter source-slot generator descriptors. Only parameters that
/// were actively driven by a registered source generator are listed.
public let sourceSlots: [String: LyrebirdAUPresetSourceDescriptor]
public init(
name: String,
scalarValues: [String: AUValue] = [:],
sourceSlots: [String: LyrebirdAUPresetSourceDescriptor] = [:]
) {
self.name = name
self.scalarValues = scalarValues
self.sourceSlots = sourceSlots
}
}
#endif