Van der Pol Tube Distortion — Waveshaping
Memoryless waveshaping through the Liénard characteristic F(x) = x³/3 − x — van der Pol's own model of the triode's current-voltage curve. Odd symmetry produces odd harmonics only. Two character modes: authentic fold (the original curve) or monotonic tube (peak-hold cubic soft clip).
What this does
This script implements memoryless waveshaping through the Van der Pol / Liénard characteristic: y = x − μ·(x³/3). This is (up to sign) the Liénard characteristic F(x) = x³/3 − x of the Van der Pol oscillator — van der Pol's own model of the triode's current-voltage curve. This is not an approximation of the tube equation; it is the historical tube nonlinearity the equation was built from. Odd symmetry produces odd harmonics only.
Key Features:
- 5 Presets — Subtle Coloration, Gentle Tube Warmth, Classic Tube Saturation, Aggressive Drive, Fold-back Extreme
- 2 Character modes — Authentic fold (the original curve) or Monotonic tube (peak-hold soft clip)
- Drive, Mu, Output_Gain — control the waveshaping curve
- Safety net — tanh fallback + final hard clamp to ±0.999
- Stereo support — Formula works per channel
- Visualisation — transfer function, parameter report, output waveform, summary bar
Quick start
- In Praat, select exactly one Sound object.
- Run script… →
VanDerPol_Tube_Distortion.praat. - Choose a preset from the dropdown (5 options, plus Manual).
- Select Character: authentic fold (the original curve) or monotonic tube (peak-hold soft clip).
- If Manual, adjust Drive, Mu, Output_Gain.
- Click OK — script applies waveshaping, creates output
originalname_VdP_Dist_presetname.
5 Presets
| Preset | Drive | Mu | Output Gain | Character |
|---|---|---|---|---|
| Subtle Coloration | 1.05 | 0.2 | 0.98 | Very light harmonic enhancement — barely noticeable. |
| Gentle Tube Warmth | 1.2 | 0.5 | 0.95 | Warm, subtle saturation — gentle odd harmonics. |
| Classic Tube Saturation | 2.5 | 1.0 | 0.85 | Classic Van der Pol fold-back — inverts above input 0.69. |
| Aggressive Drive | 5.0 | 1.5 | 0.6 | Heavy folding and inversion — aggressive distortion. |
| Fold-back Extreme | 9.0 | 3.0 | 0.4 | Deep inversion — extreme fold-back, very low output gain to compensate. |
Theory — Van der Pol / Liénard Characteristic
Van der Pol oscillator
x'' − μ·(1 − x²)·x' + x = 0
The Liénard characteristic is F(x) = x³/3 − x
This script implements y = x − μ·(x³/3) which is −μ·F(x) — the triode's current-voltage curve.
Odd symmetry: F(−x) = −F(x) → odd harmonics only.
- Input scaling: x = sample × Drive
- Cubic: y = x − μ·(x³/3)
- Character (authentic fold): if |y| > safetyThreshold, apply tanh fallback (bounded)
- Character (monotonic tube): if |x| > 1/√μ, hold peak value (2/3)/√μ
- Output gain: y = y × Output_Gain
- Hard clamp: y = clamp(y, -0.999, 0.999)
- Fold onset: |x·Drive| = 1/√μ
- Inversion onset: |x·Drive| = √(3/μ)
- Authentic fold: the curve folds back and inverts — this is the historical Van der Pol curve. The tanh fallback bounds extreme outputs but does not prevent inversion.
- Monotonic tube: holds the cubic's peak beyond the fold point — classic cubic soft-clip, guaranteed monotonic at any setting.
Controls
Waveshaping parameters
| Parameter | Range | Description |
|---|---|---|
| Character | authentic fold / monotonic tube | Authentic = original Van der Pol curve (folds/inverts). Monotonic = peak-hold soft clip. |
| Drive | >0 | Multiplies the input before the cubic — higher = more distortion. |
| Mu | >0 | Coefficient of the cubic term — higher = more severe fold-back. |
| Output_Gain | 0–1 | Post-processing gain — compensates for amplitude changes. |
Applications
Subtle tube warmth (Gentle Tube Warmth)
Use case: Add gentle harmonic enhancement without aggressive distortion.
Settings: Gentle Tube Warmth preset, Character = monotonic tube. The curve adds odd harmonics without folding, preserving the waveform's shape.
Classic tube saturation (Classic Saturation)
Use case: The historical Van der Pol distortion — odd harmonics, fold-back, warm saturation.
Settings: Classic Saturation preset, Character = authentic fold. The curve folds above input 0.69 and inverts above 1.73 — classic tube-like behaviour.
Extreme fold-back (Fold-back Extreme)
Use case: Extreme distortion — deep inversion, chaotic fold-back.
Settings: Fold-back Extreme preset, Character = authentic fold. The curve inverts deeply, producing a highly distorted, aggressive texture.
Soft clip / limiter (monotonic tube)
Use case: A smooth, monotonic waveshaper for soft clipping or limiting.
Settings: Character = monotonic tube, Drive=1.2, Mu=0.5. The curve saturates smoothly without folding or inverting.
Workflow: Voice → Gentle warmth
Source: Spoken word or vocal recording.
Settings: Gentle Tube Warmth preset, Character = monotonic tube.
Result: The voice gains a subtle, warm harmonic enhancement — odd harmonics enrich the sound without distortion.
Workflow: Synth pad → Classic saturation
Source: Synth pad.
Settings: Classic Saturation preset, Character = authentic fold.
Result: The pad develops a warm, saturated character with odd harmonics — the fold-back adds texture without harsh clipping.
Workflow: Drum loop → Extreme fold-back
Source: Drum loop.
Settings: Fold-back Extreme preset, Character = authentic fold.
Result: The drums are heavily distorted — transients are folded and inverted, producing a chaotic, aggressive texture.
• Output has no distortion: Increase Drive or Mu. For subtle settings (Drive=1.0, Mu=0.2), the cubic is nearly linear.
• Output is inverted / phase-flipped: This is the authentic fold character. Switch to monotonic tube if you need a non-inverting waveshaper.
• Output is silent or very quiet: Aggressive presets have low Output_Gain to prevent clipping. Increase Output_Gain manually.
• Output clips: The hard clamp prevents clipping, but if you see distortion, reduce Drive or Output_Gain.
• Transfer function shows weird curve: The visualisation draws the exact curve including tanh fallback and hard clamp — what you see is what you hear.
Visualisation
- Title bar — script name, preset, Drive, Mu, Output_Gain
- Transfer function — the waveshaper's input-output curve (red line). Shows fold-back, inversion, and tanh safety boundaries.
- Parameter report — Drive, Mu, safety threshold, curve character description.
- Output waveform — the distorted sound (blue for mono, blue/orange for stereo).
- Summary bar — preset, parameters, curve character, output duration and peak.