Files
ShoeGaze/Sources
josh 53b506adeb fix(pedal): audio-rate linear bypass crossfade to kill on/off click
The engaged↔bypassed crossfade smoother was a one-pole Lag.Control,
whose exponential curve is front-loaded (steepest slope at the very
start). That clicked when the two crossfade legs are decorrelated and
full-scale — e.g. a wet-only pitch shifter swapping against the dry
note — and was only masked when wet ≈ dry.

A block-rate smoother does not fix it: at the engine's 512-sample block
a short fade is just a few coarse steps, each its own click.

Switch to an audio-rate linear Slew.Audio, which ramps one step per
sample regardless of block size, driving an equal-power crossfade. The
old `private let bypassLagTime` becomes an overridable `open var
bypassFadeTime`, clamped to a positive floor before taking its
reciprocal so a subclass override of 0 or negative cannot reintroduce
an instantaneous (clicking) or inverted slew. Affects every pedal's
on/off transition.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-15 12:11:06 -08:00
..