bugfixes, better MusicXML support and 1.1.0

This commit is contained in:
2026-06-10 08:41:07 -07:00
parent 6d3a0930a1
commit f59fd3b55a
228 changed files with 32271 additions and 2586 deletions
@@ -475,9 +475,9 @@ struct LFLineNoiseTests {
// first random endValue produced by the seeded xorshift64 in init.
// With freq=1, sampleRate=100: 100 samples per segment.
// endValue value pre-computed from the seed XOR-mixed with LFLineNoise.Audio's
// unique mix constant (Phase 191: 0xD9C8_B7A6_9584_7362), then one xorshift64 step
// mapped to [-1, 1]. Phase 191 unique per-(type, rate) mix constants changed this
// value from its pre-191 baseline.
// unique mix constant (0xD9C8_B7A6_9584_7362), then one xorshift64 step
// mapped to [-1, 1]. Unique per-(type, rate) mix constants determine this
// value.
// At samplePos=0: t=0/100=0, output = startValue + (endValue - startValue)*0 = 0.0
// At samplePos=50: t=50/100=0.5, output = endValue * 0.5
let endValue: Double = 0.9148710322550571
@@ -2590,7 +2590,7 @@ struct DelayLineTests {
#expect(s.allSatisfy { abs($0) <= 1.0 + 1e-6 })
}
/// Phase 176 — branchless wrap on the power-of-2 ring buffer exercised across
/// Branchless wrap on the power-of-2 ring buffer exercised across
/// many wraps. With `maxDelay = 0.01` (≈ 441 samples at 44.1 kHz, rounded up
/// to the next PoT = 512), a ~2 s render at blockSize 64 = ~1378 blocks does
/// ~172 full wraps of the ring buffer. Drive a small but non-zero input
@@ -3018,7 +3018,7 @@ struct LFCurveNoiseTests {
// a = 0.5*(y0+y2) - y1, b = 0.5*(y2-y0)
// output = (a*0 + b)*0 + y1 = y1
// y0, y1, y2 seeded by three xorshift64 calls from the mixed seed.
// Pre-computed under Phase 191's unique per-(type, rate) mix constant
// Pre-computed under the unique per-(type, rate) mix constant
// (LFCurveNoise.Audio = 0x4B2C_3A1D_8E7F_6D5C). y1 = second of three
// xorshift64Next() draws after seeding with `12345 XOR mixConstant`.
let expectedFirstSample: Double = 0.049728941172129115
@@ -3044,15 +3044,14 @@ struct LFCurveNoiseTests {
let graph2: SynthGraph = makeSynthGraph(engine: engine2)
let testFreq: Double = 5.0
// Phase 191 — LFCurveNoise.Audio and LFLineNoise.Audio now have
// LFCurveNoise.Audio and LFLineNoise.Audio have
// distinct mix constants, so a "shared seed" no longer produces
// identical PRNG trajectories. The smoothness ordering check
// (parabolic interpolation second-diff RMS < linear-interpolation
// second-diff RMS) is an intrinsic property of the interpolation
// mode, but the specific sample sequences make it data-dependent.
// Seed 42 lands a clean ordering; see Phase 191 cleanup commit for
// the seed-sweep that confirmed >half of small seeds preserve the
// ordering after decorrelation.
// Seed 42 lands a clean ordering; a seed-sweep confirmed >half of
// small seeds preserve the ordering after decorrelation.
let sharedSeed: UInt64 = 42
let numBlocks: Int = 50
let blockCount: Int = 100