Subtractive Synthesis Generator — User Guide

Classic analog-style subtractive synthesis: oscillators, filters, and envelopes — the foundation of electronic music.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.1 (2025) License: MIT License Repo: https://github.com/ShaiCohen-ops/Praat-plugin_AudioTools
Contents:

What this does

This script implements subtractive synthesis — the synthesis method that powered the analog synthesizer revolution of the 1960s-70s and remains the foundation of most modern electronic music. The concept is elegantly simple: start with a harmonically rich waveform (oscillator), remove frequency content with filters, and shape the result over time with envelopes.

Key Features:

What is Subtractive Synthesis? Unlike additive synthesis (building sounds from sine waves) or sample playback, subtractive synthesis starts with complex waveforms containing many harmonics and then subtracts frequencies using filters. This mirrors acoustic instruments: a violin string vibrates with many harmonics, but the body filters/shapes which frequencies we hear. Subtractive synthesis digitally recreates this process with precise control.

Technical Implementation: The script follows classic analog synthesizer signal flow: (1) Oscillator generates harmonically rich waveform using formula synthesis (sawtooth formula: 2×(f×t - floor(f×t+0.5))), (2) Optional filter envelope modulates amplitude creating time-varying brightness, (3) Main filter applies frequency-domain shaping via Hann band-pass/stop-band filtering with resonance-controlled bandwidth, (4) Amplitude envelope shapes final output. The 24dB low-pass filter uses cascaded 12dB filters for steeper rolloff. Resonance is implemented through narrower filter bandwidth (higher Q factor). All processing maintains 44.1kHz sampling throughout.

Quick start

  1. In Praat, Run script…Subtractive Synthesis Generator.praat.
  2. Choose Waveform (start with "Sawtooth" — classic synth sound).
  3. Set Duration (3 seconds default) and Frequency (220 Hz = A3).
  4. Select Filter_type ("Low Pass 12dB" is most common).
  5. Set Cutoff_freq (1000 Hz good starting point, try 500-3000 Hz range).
  6. Adjust Resonance (0.3 default, higher = more emphasis at cutoff).
  7. Choose Filter_envelope ("Short Sweep" for classic synth sweep).
  8. Set Envelope_amount (0.7 = strong sweep effect).
  9. Choose Amplitude_envelope ("Percussive" for synth bass/lead).
  10. Click OK — sound generates and plays.
Quick tip: For classic analog synth bass: Sawtooth wave, Low Pass 12dB at 800 Hz, Resonance 0.5, Short Sweep filter envelope (0.7), Percussive amplitude envelope. For synth pad: Super Saw, Low Pass 24dB at 1500 Hz, Resonance 0.3, Long Sweep (0.5), Sustained envelope.

Subtractive Synthesis Theory

🎹 The Subtractive Synthesis Chain

Signal flow: Oscillator → Filter Envelope → Main Filter → Amplitude Envelope → Output

Philosophy: Start complex, sculpt away — like Michelangelo carving marble

Key insight: Harmonic content = timbre. Filtering = timbral sculpting over time.

📊 Detailed Signal Flow

  1. Oscillator Stage — Generates harmonically rich waveform at specified frequency
  2. Filter Envelope Stage — If enabled, modulates signal amplitude (creates time-varying brightness)
  3. Main Filter Stage — Removes/emphasizes frequencies based on filter type and cutoff
  4. Amplitude Envelope Stage — Shapes overall volume over time (attack, decay, sustain, release)
  5. Output Stage — Volume scaling and peak normalization to 0.9

Core Concepts

Harmonics & Timbre

All waveforms except sine contain harmonics — integer multiples of the fundamental frequency. A 220 Hz sawtooth contains 220 Hz (fundamental), 440 Hz (2nd harmonic), 660 Hz (3rd), 880 Hz (4th), etc. The relative strength of these harmonics determines timbre:

The Filter's Role

Filters remove or emphasize specific frequency ranges. A low-pass filter at 1000 Hz applied to a 220 Hz sawtooth:

Resonance (Q Factor)

Resonance emphasizes frequencies right at the cutoff frequency, creating a peak in the frequency response. This is the characteristic "analog synth" sound:

Filter Envelopes (Time-Varying Timbre)

Static filtering is useful, but filter envelopes make sounds evolve over time by modulating the cutoff frequency. Classic example: filter sweep from bright attack to dark sustain:

This creates the "wah" or "sweep" sound fundamental to analog synthesis. The filter_envelope parameter controls how the cutoff changes, envelope_amount controls how much it changes.

Historical Context: Robert Moog's modular synthesizers (1960s) popularized voltage-controlled filters where envelope generators could modulate filter cutoff frequency via control voltages. This script digitally recreates that analog control paradigm. The Minimoog (1970) made subtractive synthesis accessible, defining the sound of progressive rock, funk, and disco. Today, virtually every software synthesizer includes subtractive synthesis capabilities.

Waveforms (6 Oscillator Types)

1. Sawtooth Brightest

Formula: 2×(frequency×t - floor(frequency×t + 0.5))

Harmonic content: All harmonics (1st, 2nd, 3rd, 4th...), amplitude = 1/n

Spectrum: Complete harmonic series descending at 6dB/octave (−6dB/oct rolloff)

Character: Bright, rich, buzzy, brassy — the richest basic waveform

Analog equivalent: Sawtooth oscillator (Moog, ARP, Sequential)

Best for: Bass, leads, brass sounds, pads — most versatile waveform

Filter recommendations: Works with all filters. Low-pass 800-1500 Hz for bass, 1500-3000 Hz for leads.

Famous uses: Minimoog bass (Parliament-Funkadelic), Jupiter-8 strings, TB-303 acid bass

2. Square Hollow

Formula: if sin(2πft) > 0 then 1 else -1

Harmonic content: Only odd harmonics (1st, 3rd, 5th, 7th...), amplitude = 1/n

Spectrum: Missing even harmonics creates "hollow" quality, −6dB/oct rolloff on odds

Character: Hollow, woody, clarinet-like, nasal — distinctive 50% duty cycle

Analog equivalent: Square wave oscillator (50% pulse width)

Best for: Clarinet/oboe simulation, retro game sounds, chip music, hollow pads

Filter recommendations: Low-pass 600-1200 Hz for woodwind character, high resonance for nasality.

Famous uses: Chiptune music (NES, Game Boy), early video game sounds, Commodore 64 SID chip

3. Pulse Variable

Formula: if (f×t - floor(f×t)) < pulse_width then 1 else -1

Harmonic content: All harmonics, but strength varies with pulse width

Spectrum: Pulse width determines spectral nulls — 50% = square, narrow = thin/nasal

Character: Variable timbre based on pulse_width parameter (0.1-0.9)

Pulse width effects:

  • 0.5 (50%) = Square wave (hollow)
  • 0.3 (30%) = Thin, nasal, reedy
  • 0.1 (10%) = Very thin, whistle-like, spectral nulls

Best for: Variable timbres, PWM (pulse width modulation) effects, experimental sounds

Filter recommendations: Band-pass to emphasize formants, low-pass with high resonance for vocal quality.

Note: In analog synths, modulating pulse width over time (PWM) creates rich, evolving timbres. This script uses fixed width, but try different values (0.2, 0.3, 0.4) to explore timbral variety.

4. Triangle Mellow

Formula: (2/π) × arcsin(sin(2πft))

Harmonic content: Only odd harmonics, amplitude = 1/n² (fast decay)

Spectrum: Much fewer harmonics than square (−12dB/oct rolloff vs −6dB/oct)

Character: Mellow, soft, flute-like, pure — closest to sine after fundamental

Analog equivalent: Triangle oscillator (common in modular synths)

Best for: Flute sounds, soft pads, sub-bass, pure tones, FM synthesis carrier

Filter recommendations: Often used unfiltered or with gentle low-pass (2000-4000 Hz). Less drastic filtering needed due to naturally mellow spectrum.

Famous uses: Yamaha DX7 carriers (FM synthesis), 808 bass drum pitch component

5. Dual Saw Thick

Formula: Two sawtooths: fundamental + detuned copy (+7 Hz)

Harmonic content: Double sawtooth spectrum with beating between copies

Spectrum: Richer than single saw due to detuning — creates interference/beating

Character: Thicker, fatter, chorus-like — slight detuning adds width

Analog equivalent: Two VCOs slightly detuned (classic analog technique)

Best for: Fat bass, thick leads, rich pads, analog warmth

Detuning effect: 7 Hz separation creates ~7 beats/second — audible warbling that adds "movement" and thickness. This is how analog synth players created "fat" sounds before digital effects.

Filter recommendations: Same as sawtooth, but can use slightly lower cutoff (700-1200 Hz bass) since detuning adds richness.

6. Super Saw Massive

Formula: Five sawtooths at f×(1.0, 1.005, 0.995, 1.01, 0.99)

Harmonic content: Extremely rich due to multiple detuned copies

Spectrum: Massively dense — beating patterns between all five oscillators

Character: Huge, wide, massive, chorus/ensemble effect — thickest waveform

Analog equivalent: Roland JP-8000/8080 SuperSaw oscillator (1997)

Best for: Trance supersaw leads, massive pads, epic synth sounds, EDM

Detuning scheme: ±0.5%, ±1% creates complex beating patterns at multiple rates. This density is impossible with single oscillator — defines modern EDM "wall of sound."

Filter recommendations: Low-pass 1500-2500 Hz to control massive harmonic content. High resonance (0.5-0.7) adds focus. Slow filter sweeps create epic builds.

Famous uses: Trance leads (1998-2005 trance boom), modern EDM buildups, Skrillex-style leads

Waveform Selection Guide

Sound GoalBest WaveformWhy
Bass (sub to 200Hz)Sawtooth or Dual SawRich harmonics provide presence in mix
Lead (melody)Sawtooth or Super SawBrightness cuts through mix, filtering creates expression
Pad (sustained)Super Saw or TriangleSuper Saw = thick, Triangle = ethereal
Retro/8-bitSquare or PulseAuthentic chip music character
BrassSawtoothHigh harmonics mimic brass formants
WoodwindSquare or PulseHollow odd harmonics = clarinet/oboe
Flute/SoftTriangleFew harmonics = pure, flute-like
Modern EDMSuper SawIndustry standard for trance/progressive leads

Filters (6 Types)

1. No Filter Bypass

Effect: None — raw waveform passed through unfiltered

Use case: Hear pure waveform character, compare before/after filtering, very bright sounds

Sound: Maximum brightness, all harmonics present, can sound harsh or digital

Recommendation: Use with Triangle (already mellow) or for intentionally harsh digital tones. Most sounds benefit from filtering.

2. Low Pass 12dB Classic

Effect: Removes high frequencies above cutoff at 12dB/octave slope

Implementation: Single Hann band-pass filter (0 Hz to cutoff_freq)

Slope: 12dB/octave = gentle rolloff, natural sound

Character: Warm, smooth, musical — most common filter type

Resonance effect: Creates peak at cutoff frequency, more pronounced with higher resonance (narrow bandwidth)

Analog equivalent: 2-pole filter (Moog ladder filter, most analog synths)

Best for: General-purpose filtering, bass, pads, leads — works for everything

Settings guide:

  • 300-600 Hz: Deep bass, sub-bass, kick drums
  • 600-1200 Hz: Bass synth, warm pads
  • 1200-2000 Hz: Leads, brass, balanced tone
  • 2000-4000 Hz: Bright leads, plucks, preserve attack transients

3. Low Pass 24dB Steep

Effect: Removes high frequencies above cutoff at 24dB/octave slope

Implementation: Two cascaded 12dB filters for steeper rolloff

Slope: 24dB/octave = steep rolloff, dramatic effect

Character: Darker, more aggressive filtering than 12dB, sharper cutoff

Resonance effect: Very pronounced peak, can self-oscillate at high resonance

Analog equivalent: 4-pole filter (TB-303, Juno-60, Jupiter-8, MS-20)

Best for: Acid bass (TB-303 style), aggressive filtering, dramatic sweeps

Comparison to 12dB: At cutoff 1000 Hz, 12dB leaves more 2000 Hz content (−12dB) vs 24dB (−24dB). 24dB creates "sharper" divide between passed/rejected frequencies.

Famous uses: TB-303 acid bass, Juno-60 pads, Jupiter-8 brass

4. High Pass Bright

Effect: Removes low frequencies below cutoff, passes highs

Implementation: Hann stop-band filter (0 Hz to cutoff_freq blocked)

Character: Thin, bright, reduces bass/warmth — opposite of low-pass

Use cases:

  • Remove muddiness from complex mixes
  • Create thin, telephone-like effects
  • Hi-hat/cymbal emphasis
  • Reduce low-end rumble

Settings guide:

  • 100-200 Hz: Remove sub-bass only (clean up low end)
  • 300-500 Hz: Thin sound, reduce warmth
  • 800-1200 Hz: Telephone effect, lo-fi
  • 1500+ Hz: Extreme thinness, whistle-like

Combo technique: High-pass on one layer + low-pass on another = split spectrum for layering

5. Band Pass Focused

Effect: Only passes narrow frequency band around cutoff, removes both lows and highs

Implementation: Hann pass band (cutoff ± bandwidth/2)

Character: Telephone/radio-like, nasal, focused on specific frequency region

Resonance effect: Controls bandwidth — high resonance = narrow band (more resonant), low = wide band

Bandwidth: 50 + (1-resonance)×150 Hz. At resonance 0.3: 155 Hz wide. At 0.8: 80 Hz wide.

Use cases:

  • Vocal formant simulation (800-1200 Hz)
  • Telephone/radio effects
  • Nasal/mid-range emphasis