Nonlinearity — Distortion & Waveshaping
Change the mathematical relationship between input and output. Until now, many of our operations preserved the basic proportional relationship of the signal. Nonlinearity changes that — and can create frequencies that were not present in the input.
1. One experiment — three views
Listen while watching the transfer function, the resulting waveform, and its spectrum.
Transfer function
X = input sample. Y = output sample. A straight line is linear; bending the line is waveshaping.
Waveform
Faint trace = raw input. Solid trace = processed output.
Spectrum
Sine source: fundamental + newly created harmonics, with predicted alias locations shown in red when oversampling is off. Loaded audio: actual processed spectrum.
Make it music
A sine wave makes the mathematics easy to see. Now load a real audio sample and try the same experiment.
Compare Soft Clip, Hard Clip, Asymmetric, Even Harmonics, Polynomial and the Inflator-style curve. They are all nonlinear functions, but different transfer curves reshape the signal differently and therefore create different spectra.
Push the Drive control, then switch Oversampling and the Post-Distortion LPF on and off. Notice how oversampling plus anti-alias filtering greatly reduces high harmonics folding back into the audible spectrum as aliasing.
2. First prove what linear means
Turn the sine down
The samples get smaller, but the relationship remains proportional. A sine goes in; a smaller sine comes out. No new harmonics are created.
Now bend the rule
Different input values are no longer scaled by the same amount. The waveform changes shape. A periodic waveform that is no longer a pure sine requires additional harmonics to describe it.
3. Different curves → different distortion
Hard vs soft
Hard clipping abruptly stops the waveform exceeding a limit. Soft clipping bends progressively into saturation. Both are nonlinear, but they create different harmonic structures.
Symmetry matters
If positive and negative halves are treated differently, the distortion becomes asymmetric. Watch the transfer curve lose its symmetry and notice the stronger even-harmonic content.
4. Waveshaping doesn't have to mean fuzz
A nonlinear curve can be tiny and subtle or completely destructive. Saturation, clipping, harmonic enhancement, analogue-style colour, and inflator-style loudness and density enhancement all live somewhere in this family.
The important abstraction is not the name on the plugin. It is:
5. We just created new frequencies. What happens at Nyquist?
Raise the oscillator frequency and add drive. The nonlinear function keeps generating harmonics:
Eventually some of those harmonics want to exist above Nyquist. A sampled system cannot represent them there.