v2.4.0 release: event patterns + live event conductor

This commit is contained in:
2026-12-03 08:45:07 -08:00
parent a175c437de
commit 6da3615707
40 changed files with 4223 additions and 19 deletions
+41
View File
@@ -7,6 +7,47 @@ functionality in a backward-compatible way.
---
## 2.4.0 — Event patterns and the live event conductor
An additive, source-compatible release that adds a declarative, event-driven
layer on top of the existing routine/clock system. It is modelled on the
pattern-event idea familiar from other synthesis environments, but the public
API is named for what each type does rather than after any one of them.
**New — `EventPattern`.** A declarative pattern that binds typed key paths on a
voice to value patterns and plays one voice per event, scheduling each event's
start and release from a duration/`legato` pattern. A voice releases in one of
two ways, and never both: a self-timed envelope if it conforms to
`EventSustainAware` (it is handed the event's sustain in seconds), or a
pattern-driven gate note-off if it conforms to `EventGated`. When a voice
conforms to both, the **gate wins** — `setEventSustain` is skipped so the two
release paths never fire together. A plain voice (neither conformance) is
removed by the pattern after `sustain + releaseTail`.
**New — `MonoEventPattern`.** One reused voice whose parameters are rewritten
per event, with an optional `EventRetriggerable` re-strike. Gains a
`play(on:startAfterBeats:)` lead-in so a mono part can enter an ensemble on a
delayed beat.
**New — `ParallelEventPattern`.** Heterogeneous `EventPatternPlayable` children
started together under one merged `EventPatternHandle`; `add` enters with the
group and `addAfter(beats:)` staggers a child's entry.
**New — `EventConductor` + `EventConductorHandle`.** A live, clock-driven
ensemble you can feed while it runs: `add(_:quantize:)` is thread-safe from a
UI, OSC, or MIDI callback, and entry is **clock-deferred** — quantised by an
`EventQuantum` (`.now`, `.nextBeat`, `.nextMultiple(ofBeats:)`, `.atBeat`,
`.afterBeats`) against the conductor's own clock, so entry is tempo-independent
and each part keeps its own timing afterward. `add` returns an
`EventConductorHandle` that stops a single part — cancelling it if it is still
pending, stopping it if it is already playing.
All new types; no existing API changed, so this is drop-in over 2.3.x. See
`docs/tooling/routine-task.md` (§ EventPattern / § EventConductor) and the new
`.conductor` demo in `LyrebirdGUIDemo`.
---
## 2.3.0 — Edit-ended callback on continuous controls
A small, additive, source-compatible release. The continuous `LyrebirdUI`