// DemoSelection.swift // Lyrebird // // Copyright (c) 2026 Joshua Parmenter / realizedsound // SPDX-License-Identifier: MIT import Foundation /// Which synthesizer the demo runs, chosen by the `LYREBIRD_DEMO` environment /// variable. Both front ends (AppKit on macOS, GTK4 on Linux) read the same /// selection so one binary covers every patch. public enum DemoSelection: String, Sendable { /// Vector oscillator with an XY blend pad (the default). case vector /// Stereo sine tone with frequency / amplitude / pan controls. case sine /// Resolve the selection from `LYREBIRD_DEMO` (defaults to `.vector`). public static func fromEnvironment() -> DemoSelection { let raw: String = ProcessInfo.processInfo.environment["LYREBIRD_DEMO"]?.lowercased() ?? "vector" return DemoSelection(rawValue: raw) ?? .vector } /// Title-bar text for the window hosting this demo. public var windowTitle: String { switch self { case .vector: return "Lyrebird — Vector Oscillator" case .sine: return "Lyrebird — Sine Tone" } } }