Optional drivePre-gain (drive) into the nonlinearity. Default 1. Range 0..100; >1 = harder saturation.
Optional mixWet/dry mix (0..1); 0 = dry bypass, 1 = fully shaped. Default 1.
Optional outputPost-nonlinearity output gain (linear). Default 1. Range 0..4.
Optional shapeNonlinearity: 0 = hard clip (polynomial F0, eq.25), 1 = tanh soft clip
(F0 = log cosh, eq.20). Default 0. Accepts either the integer index or the
matching string alias ("hardclip" = 0, "tanh" = 1), translated to the
index in build().
Construction-time configuration for a WaveshaperEffect, mirroring the
waveshaperAudioWorkletProcessor's AudioParam set (see import('./processors/waveshaper').WaveshaperWorkletProcessor). All fields are optional; the worklet clamps to its documented ranges downstream.The effect is an antialiased distortion/waveshaper using first-order Antiderivative Antialiasing (Parker, Zavalishin & Le Bivic 2016, DAFx-16): y[n] = (F0(x_n) - F0(x_{n-1})) / (x_n - x_{n-1}) (eq.9), with an f(midpoint) fallback at the 0/0 singularity (eq.10). It carries an inherent 0.5-sample group delay (first-order ADAA, eq.17).