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:
2026-12-03 11:39:40 -08:00
parent 6da3615707
commit ec72bd3a4c
29 changed files with 510 additions and 110 deletions
@@ -54,13 +54,14 @@ window.open {
| ⌘↩ | Compile + run the **whole buffer**. Removes the previous run's *anonymous* synths first (named slots persist). |
| ⌘⇧↩ | Compile + run the whole buffer additively. Keeps previously played synths in the engine. |
| ⌘E | Compile + run just the **selection**, always additively — adds it to whatever is already playing. No-op with no selection. Works in both Swift and Graph DSL modes. |
| Esc / F5 | Invoke code completion at the caret (Swift mode). Manual only — never auto-triggered on `.`. See the Code completion section below. |
| Esc / F5 / ⌃Space | Invoke code completion at the caret (Swift mode). Manual only — never auto-triggered on `.`. ⌃Space is the **Show Completions** menu item; Esc and F5 map to the same handler. See the Code completion section below. |
| ⌥⌘F | **Format Code** — pretty-print the buffer with the toolchain's `swift-format`. No-op on a blank buffer; a parse error is logged to the console and leaves the text untouched. |
| ⌥⌘R | **Render to File…** — bounce the selection (or the whole buffer) to an audio file offline instead of playing it live. The save dialog carries a **Format** popup (WAV 32-bit float / 16-bit / 24-bit, AIFF, CAF, RF64 WAV for files past 4 GB, or compressed AAC / Apple Lossless `.m4a`) and a **Duration** field; it remembers the last format. Renders faster-than-real-time via `NRTDriver` at the live engine's sample rate and channel count, then reveals the file in Finder. Only **sample-clock** timing renders — see *NRT: sample-clock timing only* under Functional snippets & scheduling. |
| ⌘K | **Kill All Sound** — panic stop. Calls ``LyrebirdScratchModel/clearTracked()``: removes the anonymous tracked synths *and* every named slot, and silences the engine. |
The toolbar exposes both as buttons plus a `Clear Synths` button that calls
``LyrebirdScratchModel/clearTracked()`` — a full reset that removes both the
anonymous tracked synths and every named slot.
The toolbar exposes the run actions as buttons; **Kill All Sound** (⌘K) lives in
the menu and calls ``LyrebirdScratchModel/clearTracked()`` — a full reset that
removes both the anonymous tracked synths and every named slot.
**Run Selection (⌘E)** evaluates only the highlighted text and *adds* it to the
running graph, without touching the rest of the buffer or the whole-buffer
@@ -459,7 +460,7 @@ macOS view; the difference is the editor and its chrome:
- **Run** — a *Run (fresh)* button clears the previous snippet's synths; *Run
(additive)* layers on top. Selecting one or more lines evaluates just those
(the selection is mirrored out of the editor).
- **Stop audio** — a panic button calling ``LiveSession/resetAll()``.
- **Kill audio** — a panic button calling ``LiveSession/resetAll()``.
- **Live scope** — a `LyrebirdScopeView` of the session's output.
- **Save / load** — a native File menu (`New`, `Open…`, `Save`, `Save As…`) with
`Ctrl+N` / `Ctrl+O` / `Ctrl+S` / `Ctrl+Shift+S` accelerators, backed by