What is waveshaping in music?

What is waveshaping?

Synthesis & Sound Design

A synthesis and processing technique that changes a signal's waveform through a nonlinear transfer function. Waveshaping can introduce harmonics, distortion and other timbral changes.

What does waveshaping mean?

Waveshaping changes a signal by mapping its instantaneous amplitude through a transfer function. In its basic form, each input sample determines a corresponding output value. The curve can round peaks, clip them, fold them or reshape them in other ways. Drive changes how far the input travels along that curve, so the same waveshaper can sound different at different input levels.

A nonlinear curve can generate frequencies that were absent from the input. A steady sinusoid can acquire harmonics, while a mixture of frequencies can also generate intermodulation products. The result depends on the source and the function; waveshaping need not produce a harsh or heavily distorted sound.

Memoryless Waveshaping

y[n]=F(x[n])y[n]=F(x[n])
F(x)=tanh⁡(gx)F(x)=\tanh(gx)

Here n is an integer sample index, x[n] and y[n] are dimensionless amplitudes, and F maps the current input to the current output. For the example F(x)=tanh(gx), g>0 is a dimensionless drive: at g=1, x=0, 1 and 2 yield approximately 0, 0.7616 and 0.9640. This odd, smoothly saturating curve approaches ±1 for very large positive/negative inputs but does not imply that all waveshapers use tanh. The formula is memoryless; adding filters, feedback or dynamic parameters can introduce state. Nonlinear output harmonics may alias at finite sample rates.

Common confusions and distinctions

A linear gain change scales the waveform without creating new spectral components. Nonlinear waveshaping changes its shape. Digital implementations must manage newly generated high-frequency content to limit aliasing; oversampling can help, but is not itself a different waveshaping curve.

Back to the glossary