Files
josh 06bdcbbe92 v2.3.1 release: cross-platform LyrebirdGUIDemo + Linux demo ports + doc refresh
- New Demos/LyrebirdGUIDemo: one shared source (synths + node-based views) that
  bootstraps SwiftUI on macOS and GTK4/SwiftOpenUI on Linux; LYREBIRD_DEMO=vector|sine.
- The four CLI demos (Quickstart/Demo/NRT/Score) now build and run on Linux.
- README + Linux getting-started refreshed; LyrebirdATK row removed from the
  Extensions section pending collaborator sign-off.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-29 11:34:24 -08:00

59 lines
2.4 KiB
Markdown

<!--
README.md
Lyrebird
Copyright (c) 2026 Joshua Parmenter / realizedsound
SPDX-License-Identifier: MIT
-->
# LyrebirdGUIDemo — one GUI demo, two platforms
A live-controllable synth GUI that builds and runs from a single source tree on
**macOS** (AppKit + SwiftUI) and **Linux** (GTK4 + SwiftOpenUI). It is the
cross-platform counterpart to the richer, macOS-only `LyrebirdMacOSDemo` Xcode
project.
The split follows the "mostly in a package, thin entry points" shape:
| Piece | Where | Platform |
|---|---|---|
| Synths + views | `Sources/LyrebirdGUIDemoKit/` | shared — one source |
| App bootstrap | `Sources/LyrebirdGUIDemo/main.swift` | one `#if` (AppKit vs GTK4) |
The view bodies are written to the subset of the View DSL that SwiftUI and
SwiftOpenUI share, so there is **one** body per view — not a macOS copy and a
Linux copy. Both back ends bind the same core `@UIParam` / `UIParamNode` model,
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
```
- **macOS** — no extra setup; a native window opens with live audio via Core Audio.
- **Linux** — needs `libgtk-4-dev` (GUI) and `libasound2-dev` + a sound device
(audio). Without a sound backend the window still opens and the controls work;
there is just no sound (`isLiveAudioAvailable` reports it, and the console says so).
## Open in an IDE
- **Xcode (macOS)** — open the folder (or `Package.swift`); Xcode treats it as a
SwiftPM package. Pick the `LyrebirdGUIDemo` scheme and Run. No `.xcodeproj` to
maintain — the package *is* the project.
- **VS Code (Linux)** — open the folder with the Swift extension
(`swiftlang.swift-vscode`); it picks up `Package.swift`. Run `LyrebirdGUIDemo`
from the test/run explorer or a terminal.
## What each demo shows
- **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`.