v2.4.1 release: scratchpad polish + demo cleanup
Maintenance release, no framework API changes. Scratchpad: Kill All Sound (⌘K) rename, mode-switch desync fix, code-completion prefix filtering restored (⌃Space Show Completions). Demos: GUIDemo voices + CLI EventPattern BlipVoice moved into Synthesizers/, EventPattern demo split into makeLead/makeBass, GUIDemo doc drift fixed (conductor default). LyrebirdScratch gains a SwiftPM package so the workspace shows it like GUIDemo (.xcodeproj kept for distribution). Linux live-coding scratchpad documented.
This commit is contained in:
@@ -27,8 +27,9 @@ so the controls, the oscilloscope, and the CPU meters are identical.
|
||||
## Run it
|
||||
|
||||
```bash
|
||||
swift run LyrebirdGUIDemo # vector oscillator (default)
|
||||
LYREBIRD_DEMO=sine swift run LyrebirdGUIDemo # stereo sine tone
|
||||
swift run LyrebirdGUIDemo # event conductor (default)
|
||||
LYREBIRD_DEMO=vector swift run LyrebirdGUIDemo # vector oscillator
|
||||
LYREBIRD_DEMO=sine swift run LyrebirdGUIDemo # stereo sine tone
|
||||
```
|
||||
|
||||
- **macOS** — no extra setup; a native window opens with live audio via Core Audio.
|
||||
@@ -47,12 +48,16 @@ LYREBIRD_DEMO=sine swift run LyrebirdGUIDemo # stereo sine tone
|
||||
|
||||
## What each demo shows
|
||||
|
||||
- **conductor** (default) — `ConductorDemoVoice` driven by an `EventConductor`:
|
||||
start/stop the engine, then toggle a top and a bottom part, each entering on the
|
||||
next beat and repeating while it runs, over a live oscilloscope. Showcases the
|
||||
2.4.0 event system. Nothing plays until you start the engine and a part.
|
||||
- **vector** — `VectorOscillatorUI`: an XY pad crossfades four corner wavetables
|
||||
(sine / saw-ish / triangle / Hanning); frequency and amplitude knobs; a live
|
||||
oscilloscope and CPU-load strip.
|
||||
- **sine** — `SineToneUI`: a frequency slider, amplitude and pan knobs, a level
|
||||
readout, the scope and CPU strip, and a static envelope plot.
|
||||
|
||||
Add a synth by dropping a `SynthesizerBase` subclass and a node-based view into
|
||||
`LyrebirdGUIDemoKit`, then extend `DemoSelection` and the `demoContent()` switch
|
||||
in `main.swift`.
|
||||
Add a synth by dropping a `SynthesizerBase` subclass into
|
||||
`LyrebirdGUIDemoKit/Synthesizers/` and a node-based view into `LyrebirdGUIDemoKit`,
|
||||
then extend `DemoSelection` and the `demoContent()` switch in `main.swift`.
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
// • Linux — a GTK4 `App`/`WindowGroup` scene run by `GTK4Backend`.
|
||||
//
|
||||
// Run either with `swift run LyrebirdGUIDemo`. Pick the synth with
|
||||
// `LYREBIRD_DEMO=vector` (default), `sine`, or `conductor`.
|
||||
// `LYREBIRD_DEMO=conductor` (default), `vector`, or `sine`.
|
||||
//
|
||||
// `@ViewBuilder` and the window hosts come from SwiftUI on macOS and from
|
||||
// SwiftOpenUI (re-exported through `LyrebirdUI`) on Linux — hence the single
|
||||
|
||||
@@ -11,7 +11,7 @@ import Foundation
|
||||
/// selection so one binary covers every patch.
|
||||
public enum DemoSelection: String, Sendable {
|
||||
|
||||
/// Vector oscillator with an XY blend pad (the default).
|
||||
/// Vector oscillator with an XY blend pad.
|
||||
case vector
|
||||
|
||||
/// Stereo sine tone with frequency / amplitude / pan controls.
|
||||
@@ -19,9 +19,10 @@ public enum DemoSelection: String, Sendable {
|
||||
|
||||
/// Live event ensemble: engine start/stop plus top and bottom parts driven by an
|
||||
/// ``EventConductor``. The view owns the engine, so nothing starts at launch.
|
||||
/// This is the default — it showcases the headline event system.
|
||||
case conductor
|
||||
|
||||
/// Resolve the selection from `LYREBIRD_DEMO` (defaults to `.vector`).
|
||||
/// Resolve the selection from `LYREBIRD_DEMO` (defaults to `.conductor`).
|
||||
public static func fromEnvironment() -> DemoSelection {
|
||||
let raw: String = ProcessInfo.processInfo.environment["LYREBIRD_DEMO"]?.lowercased() ?? "conductor"
|
||||
return DemoSelection(rawValue: raw) ?? .conductor
|
||||
|
||||
Reference in New Issue
Block a user