Files
Lyrebird/RELEASES.md
T

8.3 KiB
Raw Permalink Blame History

Releases

Notable changes per release. Newest first.

This project follows semantic versioning: a minor bump (1.0 → 1.1) adds functionality in a backward-compatible way.


1.1.1 — Real-time performance + score-timing fixes (planned)

A patch release: real-time CPU improvements to the synthesis engine's hot path, internal generator consolidation, and two score-side timing fixes. Fully backward-compatible — no public API changes.

Real-time performance

The generator render path (_computeSamples) is now Accelerate-accelerated where it was previously scalar. Wins are largest for the primitives that appear in nearly every patch:

  • Unary math waveshapers (Sin / Cos / Exp / Log / Sqrt / Floor / Ceil / Abs) — vectorized via vForce / vDSP (~3× faster on a typical chained-op voice).
  • Arithmetic operators (+ − × ÷ on generators, via BinaryOpGenerator) — vDSP dispatch, bit-identical to the scalar result (divide uses true-division, never reciprocal-multiply). Roughly 2–3.5× faster; applies to every osc * gain + offset-style graph.
  • LinLin — single fused vDSP_vsmsaD affine map (~27% faster).
  • State-variable filter (SVF) — shared per-block kernel; generator-driven cutoff uses block-boundary coefficient interpolation instead of a per-sample sin().
  • Chorus / Flanger — power-of-two delay lines (bitwise index wrap).
  • Butterworth band-pass / band-reject — now use the same background-thread vDSP biquad-cascade path the low-pass / high-pass filters already had.

All vectorized paths keep a scalar fallback for short upstream blocks, so output is unchanged on every code path (transcendentals within tolerance; arithmetic and filter sums bit-exact).

Internals (no API impact)

  • Generator consolidation: the duplicated Butterworth cascade machinery, SVF block body, unary-math and binary-op inner loops, and power-of-two buffer sizing are now shared helpers (ButterworthSectionEngine, runSVFBlock, UnaryMathVectorHelpers, BinaryOpVectorHelpers, lyrebirdNextPowerOfTwo, computeButterworthQs). Several hundred lines of duplication removed.
  • New LyrebirdBenchmark target with before/after reference numbers (docs/benchmarks/gp-baseline.md).
  • Language-side consolidation: shared isCounterExhausted / resetAll Pattern helpers, a _RandomPatternBase for the random pattern engines, a TemporalAlgorithmBase for the counter-driven temporal algorithms, a shared MusicXML <direction> / <pitch> emit helper, and a single engine-mutation-to-main-queue dispatch helper shared by the routine/process contexts.

Score / MusicXML

  • ScorePart entrance offset — a part can enter later than the start of its section via offset: (ScoreOffset.measures(_:) / .beats(_:) / .fraction(_:)). Resolved at build time into leading rests (the same way FillMeasure() is resolved), so it flows through section sizing, MusicXML bar splitting, and flatten() with no special handling.
  • MusicXML barline-fill fix — corrected two emit-side defects in sectioned scores with rest-padded short parts: a barline-crossing atom that exactly filled a bar left the measure open (shifting every later note by one division, rendering constant 4/4 as 5/4), and section auto-padding used meter-agnostic rests that straddled barlines. Padding is now bar-grid aligned (clean whole-measure rests; anacrusis-aware). Lowering/playback math was already correct — both fixes are export-only.

1.1 — Enhanced algorithmic composition tools

Release 1.1 turns Lyrebird's score side from a thin event list into a full algorithmic composition and notation toolkit: a spelling-aware music-theory layer, a pattern/sequence library, a composable score DSL, and lossless MusicXML and Standard MIDI File round-trips. The real-time synthesis engine is unchanged — this release is additive and language-side.

Music theory toolkit

  • Spelling-aware Interval, Scale, and PitchCollection types (cells, sets, 12-tone rows) built on the existing Letter / Accidental / NoteName / Pitch foundation.
  • Diatonic-vs-chromatic transposition that preserves enharmonic spelling (B♯ stays B♯, never collapses to C), scale-degree mapping between scales, and conversion straight to Hz / seconds for synthesis.
  • Pitch.mapIntoRange(low:high:) — fold a pitch into a register by whole octaves while preserving pitch class and spelling.
  • See docs/stdlib/theory.md.

Patterns

  • Pattern<T> factory catalog for sequences, series, random and stochastic distributions (uniform, brownian, gaussian, cauchy, beta, weighted, shuffle…), and combinators (map, filter, stutter, switching, interleave, round-robin…).
  • Pattern.sequence(_:repeats:offset:) — start a sequence partway through its list via offset.
  • Euclidean rhythm generator.
  • See Sources/Lyrebird/Lyrebird.docc/RoutineTask.md.

Score DSL and notation

  • A result-builder score DSL — Score, Part, Note, Rest, Chord, Tuplet, Voice, Staff — that flattens to sample-accurate ScoreEvents and plays back through ScorePlayer.
  • Notation features: dynamics, articulations, crescendo / diminuendo hairpins, slurs (a Slur { } block plus per-note spanners: for shared-boundary and overlapping spans), authored ties, grace notes, repeats and volta endings, mid-piece tempo changes, key signatures and transposing parts, mid-voice clef changes, grand-staff Staff grouping, and sustain Pedal marks.
  • Meter: TimeSignature + segmented MeterMap, mid-piece meter changes, anacrusis (pickup) bars, and polymeter (per-part meter overrides).
  • ScoreTimeline musical addressing (BeatPosition) with overlap policies and multi-voice fills.
  • See Sources/Lyrebird/Lyrebird.docc/ScoreSystem.md.

Score structure and page layout

  • Section { } blocks group parts into sequential sections, each with its own local bar/beat numbering. Assembled into a Score, sections render sequentially with continuous global measure numbers and a rehearsal mark per section; tacet instruments are auto-filled so every staff stays bar-aligned. ScorePart gains an id (defaults to name) to match the same instrument across sections.
  • PageLayout sets MusicXML page defaults: page size (letter / legal / tabloid / a4 / a3 / custom mm), portrait / landscape orientation, per-side odd/even margins, and <scaling>. Authored in millimeters and converted to MusicXML tenths on export.
  • NoteDisplay per-note display overrides via a display: parameter on Note / Chord: custom notehead shape (x, diamond, slash, .hidden, raw .other(_), …), note size (cue / large), hidden stem, and hidden beam.
  • Glissandos / slides between two notes via the spanner API (.beginGlissando(_:) / .endGlissando): glissando (wavy/curved) or slide (straight) kind, a line type (solid / dashed / dotted / wavy), and an optional text label.

Import / export

  • MusicXML export and import (score-partwise 4.0) with a spelling- and event-faithful round trip across the notation features above.
  • Standard MIDI File round-trip (Score ↔ SMF).

API and internals

  • Score.timeSignature and the Score initializers take a typed TimeSignature (a (numerator, denominator) pair converts via TimeSignature(_:)) instead of a raw tuple.
  • Internal cleanups with no API impact: the MusicXML encoder and parser were split from two monoliths into focused, grouped extension files, and the parser's per-<note> state was extracted into a dedicated value type.

Namespace note: the score DSL exposes capitalized free functions (Note, Chord, Voice, Slur, Crescendo, …). Voice in particular can collide with same-named types from other frameworks — qualify or alias if you hit an ambiguity.


1.0 — Initial release

First public release: the real-time synthesis engine, the Generator / Synthesizer protocols and standard-library generators, the Core Audio and non-real-time drivers, LyrebirdUI, the lyrebird CLI and project scaffolding, and the AUv3 plug-in support.