@maruaudio/dsp/distortion/drive is a rational drive over the fixed-4× oversampling stage of @maru/distortion-oversampled-waveshaper. The transfer is
k = amount × 100
y = (1 + k)·x / (1 + k·|x|)Each input is interpolated to four points, each shaped and stored at f32, and one output is taken through the shared 31-tap FIR. The output is fully wet.
Parameters
| Setter | Range the setter enforces | Default |
|---|---|---|
setDriveAmount | 0 to 1 | 0.4 |
Lifecycle
initDriveNode allocates the 32-value history → setDriveAmount → driveNodeTick → resetDriveNode, which zeroes the history and marks the state uninitialized. The first tick after init or reset starts the interpolation from the current input. Ticks allocate nothing and do no I/O.
When to use it
A single-control drive on guitar, bass or synth where gain and soft saturation rise together.
Limits
- Mono sample tick, wet only, with the FIR's 15 oversampled frames (3.75 samples) of delay.
- The transfer is not bounded to ±1 for inputs beyond ±1: at amount 0.4,
driveTransfer(2)is 1.0123. - At amount 0 the transfer is the identity.
- Amount changes apply at once, with no smoothing.