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
@@ -0,0 +1,33 @@
// DSLTestSupport.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
import LyrebirdGraphDSL
/// Shared offline engine for DSL round-trip tests.
@MainActor
func makeDSLTestEngine() -> SynthesisEngine {
SynthesisEngine(
blockSize: 16,
controlBlockSize: 16,
sampleRate: 48_000,
numOutputChannels: 2,
numInputChannels: 0,
numAudioBuses: 16,
numControlBuses: 16,
eventQueueCapacity: lyrebirdDefaultEventQueueCapacity,
driver: OfflineDriver()
)
}
/// `true` when any sample in bus `bus` of `engine` is non-zero.
@MainActor
func busHasSignal(_ engine: SynthesisEngine, bus: Int) -> Bool {
(0..<engine.blockSize).contains { engine.audioBuses[bus][$0] != 0.0 }
}
/// Wrap a signal value as a `DSLValue` for direct `DSLBuiltin.make` calls.
func sig(_ value: any ValidGeneratorInput) -> DSLValue { .signal(value) }