fix(tunedverb): silence the wash until a moment is captured
An uncaptured TunedVerb has no filter template, so it must output silence — but the live cross-map was pouring the dry pass-through straight into the reverb, so every TunedVerb hummed on startup (and looked like a stale capture surviving a restart). Gate the reverb input by the Capture latch: `masked * $captured` feeds the reverb zero until the footswitch fires. Because `captured` is 0 by default, reset to 0 on every graph rebuild (resetForRebuild) and on engine stop (engineDidStop -> releaseHold), the same gate also guarantees a fresh app launch or engine restart comes up silent with no carried-over capture. The analysis side-chain keeps tracking while gated, so pressing Capture still freezes the current-moment spectrum. FreezVerb is unaffected: its Freeze holds a working reverb's tail, so it should produce sound before freezing. Tests: new wetIsSilentUntilCaptureThenAudible; panShiftsTheLeftLeg and captureLocksTheFilter... updated to the new contract (capture before measuring the wash). 856 tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -196,9 +196,18 @@ public final class TunedVerbPedal: Pedal {
|
||||
stages: [.dual(map, sideChain: sideChain)]
|
||||
)
|
||||
|
||||
// Gate the wash by the Capture latch. Until a moment is captured there is no filter template,
|
||||
// so the reverb must be fed silence rather than the live pass-through — otherwise an
|
||||
// uncaptured TunedVerb pours the dry signal straight into the tail. `captured` is `0` until the
|
||||
// footswitch fires and is reset to `0` on every rebuild and on engine stop (`resetForRebuild`
|
||||
// / `releaseHold`), so a fresh app launch or an engine restart comes up silent with no stale
|
||||
// capture. The analysis side-chain inside `masked` keeps tracking while gated, so pressing
|
||||
// Capture still freezes the current-moment spectrum.
|
||||
let gatedIntoVerb: any ValidGeneratorInput = masked * $captured
|
||||
|
||||
// A large room for a cavernous tail; `time` sets the T60, `damp` the brightness.
|
||||
let reverb: GVerb.Audio = GVerb.Audio(
|
||||
source: masked,
|
||||
source: gatedIntoVerb,
|
||||
roomSize: roomSize,
|
||||
reverbTime: $time,
|
||||
damping: $damp,
|
||||
|
||||
Reference in New Issue
Block a user