Replace test tone with an E-minor Karplus-Strong arpeggio

TestLoopSource now plays a repeating pluck arpeggio over the open lower
four guitar strings (E2, A2, D3, G3) in E minor: one Impulse drives both
the KarplusStrong excitation and a Demand/DemandSequence that steps the
pitch per pluck. Fixed-seed WhiteNoise exciter keeps the tone deterministic
(so two source renders match, e.g. the overdrive bypass-equals-dry test).
Adds a sampleRate init param (default 48k) sizing the KS delay line;
ShoeGaze.addBoard passes the engine's actual rate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-22 13:25:56 -07:00
parent c491f97440
commit 5633ede630
2 changed files with 55 additions and 25 deletions
+4 -1
View File
@@ -138,7 +138,10 @@ public final class ShoeGaze {
// Route the input source to the board head bus.
switch inputSource {
case .testLoop:
let source: TestLoopSource = TestLoopSource(targetBus: board.headBus.index)
let source: TestLoopSource = TestLoopSource(
targetBus: board.headBus.index,
sampleRate: engine.sampleRate
)
// Plain add → head of mainGroup (evaluates before any pedal).
try engine.add(source)
testLoopSources.append(source)