v2.1.1 release: delay-click fix + internal consolidation
Mirror of Lyrebird dev HEAD (9f791c7c) minus maintainer-only paths. Patch release: fixes the allpass fractional-delay click (DelayLine/CombFilter/AllpassFilter/ DelayLineFeedback under a modulated delay) and lands the internal code-quality consolidation pass (~160 deduped sites + shared base classes/helpers, bit-identical output). No public API removed or changed. See RELEASES.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -61,8 +61,7 @@ public enum LinCongStepped {
|
||||
}
|
||||
|
||||
/// Snapshot the per-block parameters into the fields `iterate()` reads.
|
||||
@inline(__always)
|
||||
func readParams(graph: SynthGraph) {
|
||||
override func readParams(graph: SynthGraph) {
|
||||
_a = aInput.floatValue(graph: graph)
|
||||
_c = cInput.floatValue(graph: graph)
|
||||
_m = mInput.floatValue(graph: graph)
|
||||
@@ -109,20 +108,7 @@ public enum LinCongStepped {
|
||||
|
||||
public func _computeSamples(graph: SynthGraph, count: Int) -> [[Double]] {
|
||||
_checkCount(count)
|
||||
guard count > 0 else { return _result }
|
||||
|
||||
readParams(graph: graph)
|
||||
primeIfNeeded()
|
||||
let dphase: Double = stepRate(freq: _freqInput.floatValue(graph: graph), sampleRate: graph.engine.sampleRate)
|
||||
|
||||
for i: Int in 0..<count {
|
||||
_result[0][i] = chaoticInterpolate(_interpolation, phase: _phase,
|
||||
hM1: _hM1, h0: _h0, h1: _h1, h2: _h2)
|
||||
advancePhase(by: dphase)
|
||||
}
|
||||
|
||||
_mulAdd.applyIfNeeded(to: &_result, graph: graph, count: count)
|
||||
return _result
|
||||
return renderAudioBlock(graph: graph, count: count)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,10 +126,7 @@ public enum LinCongStepped {
|
||||
/// - interpolation: Bridging between iterations. Defaults to `.none`.
|
||||
/// - mul: Output multiplier. Defaults to `1.0`.
|
||||
/// - add: Output offset. Defaults to `0.0`.
|
||||
public final class Control: _Base, ControlGenerator {
|
||||
|
||||
public var previousOutputValue: Double = 0.0
|
||||
private var _rampTarget: Double = 0.0
|
||||
public final class Control: _Base, BlockRateControlGenerator {
|
||||
|
||||
public func floatValue(graph: SynthGraph) -> Double { previousOutputValue }
|
||||
|
||||
@@ -168,30 +151,12 @@ public enum LinCongStepped {
|
||||
) {
|
||||
super.init(freq: freq, a: a, c: c, m: m, xi: xi,
|
||||
interpolation: interpolation, mul: mul, add: add)
|
||||
_setupSubBlockBuffer()
|
||||
}
|
||||
|
||||
// Bypass sub-block loop: the map advances exactly one audio block per call.
|
||||
public func calculatedSamples(graph: SynthGraph, count: Int) -> [[Double]] {
|
||||
_calculatedSamplesBlockRate(graph: graph, count: count)
|
||||
}
|
||||
|
||||
public func _computeSamples(graph: SynthGraph, count: Int) -> [[Double]] {
|
||||
_checkCount(count)
|
||||
guard count > 0 else { return _result }
|
||||
|
||||
readParams(graph: graph)
|
||||
primeIfNeeded()
|
||||
let dphase: Double = stepRate(freq: _freqInput.floatValue(graph: graph), sampleRate: graph.engine.sampleRate)
|
||||
advancePhase(by: dphase * Double(count))
|
||||
let target: Double = chaoticInterpolate(_interpolation, phase: _phase,
|
||||
hM1: _hM1, h0: _h0, h1: _h1, h2: _h2)
|
||||
|
||||
let rampStart: Double = _rampTarget
|
||||
_rampTarget = target
|
||||
previousOutputValue = fillRampedResult(
|
||||
into: &_result, from: rampStart, to: target, mulAdd: _mulAdd, graph: graph, count: count)
|
||||
return _result
|
||||
return renderControlBlock(graph: graph, count: count)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user