v1.3.0 release: graceful-release fix, quickstart template + demo, documentation accuracy pass

- Fixed: SynthesizerBase subclasses' release/free now dispatch correctly (gated
  synths were hard-freed instead of released).
- New: quickstart project template + LyrebirdQuickstartDemo.
- Docs: every example typechecked or provably illustrative (426->542); ~20
  wrong-API examples fixed; root docs brought under the compile guard.
- Fixed: NRT/Score demo Package.swift build from terminal again.

See RELEASES.md for details.
This commit is contained in:
2026-07-17 14:05:01 -07:00
parent 63d6e0746f
commit 560724d116
149 changed files with 5010 additions and 1029 deletions
+22 -22
View File
@@ -20,20 +20,20 @@ silently dropped — no allocation, no error.
struct GrainState {
var isActive: Bool // true while grain is playing
// Buffer-reading (BufferGrain, InputGrain)
var phase: LyrebirdFloat // fractional buffer frame
var phaseInc: LyrebirdFloat // playback rate (frames/sample)
var phase: Double // fractional buffer frame
var phaseInc: Double // playback rate (frames/sample)
// Common
var remaining: Int // samples left in grain
var amp: LyrebirdFloat // amplitude at trigger time
var pan: LyrebirdFloat // [-1, 1]; 0 = centre
var windowPhase: LyrebirdFloat // window table position (index units)
var windowInc: LyrebirdFloat // window advance per sample
var amp: Double // amplitude at trigger time
var pan: Double // [-1, 1]; 0 = centre
var windowPhase: Double // window table position (index units)
var windowInc: Double // window advance per sample
// Synthesis (SineGrain, FMGrain)
var synthPhase: LyrebirdFloat // carrier oscillator phase (index units)
var synthPhaseInc: LyrebirdFloat // carrier phase increment
var modPhase: LyrebirdFloat // FM modulator phase (index units)
var modPhaseInc: LyrebirdFloat // FM modulator increment
var modIndex: LyrebirdFloat // FM β (modulation depth)
var synthPhase: Double // carrier oscillator phase (index units)
var synthPhaseInc: Double // carrier phase increment
var modPhase: Double // FM modulator phase (index units)
var modPhaseInc: Double // FM modulator increment
var modIndex: Double // FM β (modulation depth)
}
```
@@ -109,8 +109,8 @@ from their `ValidGeneratorInput` sources (block-constant via fan-out cache).
```swift
public final class SineGrain: AudioGenerator {
@LiveParam public var density: LyrebirdFloat = 10.0 // grains/sec
@LiveParam public var duration: LyrebirdFloat = 0.1 // seconds
@LiveParam public var density: Double = 10.0 // grains/sec
@LiveParam public var duration: Double = 0.1 // seconds
public init(freq: any ValidGeneratorInput = 440.0, // Hz, polled at trigger
amp: any ValidGeneratorInput = 0.5, // amplitude, polled at trigger
@@ -146,8 +146,8 @@ Each grain generates a windowed two-operator FM tone. All four parameters are
```swift
public final class FMGrain: AudioGenerator {
@LiveParam public var density: LyrebirdFloat = 10.0
@LiveParam public var duration: LyrebirdFloat = 0.1
@LiveParam public var density: Double = 10.0
@LiveParam public var duration: Double = 0.1
public init(carrierFreq: any ValidGeneratorInput = 440.0, // Hz
modFreq: any ValidGeneratorInput = 440.0, // Hz
@@ -194,13 +194,13 @@ grains from that history.
```swift
public final class InputGrain: AudioGenerator {
@LiveParam public var density: LyrebirdFloat = 10.0
@LiveParam public var duration: LyrebirdFloat = 0.1
@LiveParam public var position: LyrebirdFloat = 0.0 // 0=recent, 1=oldest
@LiveParam public var positionSpread: LyrebirdFloat = 0.0
@LiveParam public var rate: LyrebirdFloat = 1.0
@LiveParam public var rateSpread: LyrebirdFloat = 0.0
@LiveParam public var amp: LyrebirdFloat = 1.0 // output scaler
@LiveParam public var density: Double = 10.0
@LiveParam public var duration: Double = 0.1
@LiveParam public var position: Double = 0.0 // 0=recent, 1=oldest
@LiveParam public var positionSpread: Double = 0.0
@LiveParam public var rate: Double = 1.0
@LiveParam public var rateSpread: Double = 0.0
@LiveParam public var amp: Double = 1.0 // output scaler
public init(input: any ValidGeneratorInput,
window: LyrebirdBuffer? = nil,