Build with this node

Start with a prompt in Studio, or copy it into your own coding agent.

Ask Studio

@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

SetterRange the setter enforcesDefault
setDriveAmount0 to 10.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.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Parameters

ParameterTypeSetter
Value valuefloatsetDriveAmount

Ports

  • In ininput · audio · mono
  • Out outoutput · audio · mono

One sample per driveNodeTick call.

Dependencies

Dependents

No other node imports this one.

Used by