v1.4.0 release: live-coding scratch editor, interpreted Graph DSL, ClosureSynthesizer + SampleLoop

This commit is contained in:
2026-07-20 10:02:49 -07:00
parent 560724d116
commit 38d2107f64
104 changed files with 14471 additions and 105 deletions
+13
View File
@@ -3,6 +3,13 @@
A step-by-step guide to implementing correct, RT-safe generators in Lyrebird.
Every built-in generator in `Sources/Lyrebird/Generators/` follows the patterns here.
> Before you write a whole type: for one-off custom sample-accurate DSP — especially a
> **single-sample feedback loop** (one-pole, waveguide, comb/allpass) — reach for `SampleLoop`
> (`Sources/Lyrebird/Generators/Core/SampleLoop.swift`) first. It gives an RT-safe,
> allocation-free per-sample body with typed `inout` feedback state and channel inference, no
> new `Generator` declaration. Promote to a full generator (this guide) when you want
> parameters, Quick Help, reuse, and raw-pointer speed.
---
## 1. Protocol Choice — `AudioGenerator` vs `ControlGenerator`
@@ -609,6 +616,12 @@ final class MyGenerator: GeneratorBase, AudioGenerator {
## 10. Testing Checklist
> Debugging a generator that compiles but computes the wrong numbers: tag the
> instance with `GeneratorBase.debugTag`, set an LLDB conditional breakpoint on its
> `_computeSamples`, and/or read its post-block output from a Synthesizer debug tap.
> Full workflow in the DocC article `<doc:Debugging>`
> (`Sources/Lyrebird/Lyrebird.docc/Debugging.md`).
Write tests for every new generator using Swift Testing (`@Test`, `#expect`, `@Suite`).
> The `makeTestEngine`, `makeSynthGraph`, and `advanceBlock` helpers are defined in `Tests/LyrebirdTests/TestHelpers.swift`. Test files must use `@testable import LyrebirdSynth` and belong to the `LyrebirdTests` target to access them.