Subtractive Synthesis Basics

๐Ÿ”Š Subtractive Synthesis Basics: Oscillators, Filters & Envelopes

Subtractive synthesis is one of the most foundational approaches to electronic sound generation, used in virtually every analog synthesizer and many modern digital ones. It works by starting with a "rich" waveform (like a sawtooth or square) and filtering out frequencies to shape the tone.


๐ŸŽน 1. The Core Subtractive Synthesis Process

[ Oscillators ] โ†’ [ Mixer / Saturation ] โ†’ [ Filter ] โ†’ [ Amplifier / VCA ] โ†’ Output
       โ”‚                                      โ†‘                 โ†‘
       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ LFO / Modulation โ”€โ”€โ”€โ”€โ”€โ”˜                 โ”‚
                                              Filter ADSR       Volume ADSR

In classic subtractive synth design:

  1. Oscillator: Generates a waveform (e.g., sawtooth, square, triangle)
  2. Filter: Shapes the tone by cutting or boosting frequencies (low-pass, high-pass, band-pass)
  3. Amplifier: Controls volume and applies envelope shaping
  4. LFO (Low Frequency Oscillator): Modulates parameters like filter cutoff and amplitude for movement

โš™๏ธ 2. Key Components Explained

Oscillators

Oscillators establish the raw harmonic content before the filter shapes it:

Waveform Harmonic content Typical character and use
Sawtooth All integer harmonics, with amplitudes roughly decreasing as \(1/n\) Bright, buzzy leads, brass-like tones, and basses
Square / pulse Odd harmonics; pulse width changes the balance and can introduce even harmonics Hollow, woody tones and chiptune sounds
Triangle Odd harmonics that decrease roughly as \(1/n^2\) Softer, rounded tones and gentle pads
Sine Fundamental only Clean sub-bass and test tones
White / pink noise Broadband random signal; pink noise has less energy per octave Hi-hats, snares, breath, and sweeps

The waveform is a starting spectrum, not a finished sound. Detuning and mixing multiple oscillators can thicken the source before it reaches the filter.

Filters

Filters precisely control where frequencies are emphasized or attenuated:

ADSR Envelope

Controls how the amplitude changes over time:

Stage Description
Attack How quickly the sound reaches full volume when triggered (e.g., 50ms to reach peak)
Decay How quickly the sound drops after attack (before sustain)
Sustain Volume level maintained while key is held down
Release How long it takes for the sound to fade out after key release (e.g., 200ms)

LFOs

LFOs modulate parameters at low frequencies (below audio range):


๐Ÿงช 3. Real-World Applications & Examples

Classic Synth Example: Moog Filter

The Moog filter is renowned for its "warm" sound and "ringing" cut-off behavior:

  1. Begin with sawtooth wave for full brightness
  2. Apply low-pass filter at 4kHz to remove harshness
  3. Set attack time to 50ms, release to 200ms
  4. Add LFO modulation from 1Hz (vibrato) or 5Hz (tremolo)

Sound Design Strategy: Breakbeat Kick Drum

A typical digital breakbeat kick can be created by:

  1. Starting with square or triangle wave
  2. Applying a very steep high-pass filter (50Hz+) to remove low-end rumble
  3. Adding a short ADSR envelope with fast attack and release (10ms)
  4. Using a Sine wave sub-harmonic at 60Hz to provide punch and low-end body

Example Sound Generation Loop:

// Vague pseudocode for simple additive sub synthesis engine in Odin syntax  
kick_amplitude :: f32 = 1.0
filter_cutoff :: f32 = 3000.0

// Generate filtered sawtooth + sin subharmonic  
pure_saw :: f32 = generate_waveform(0, 440.0) * kick_amplitude  
sub_harmonic :: f32 = generate_waveform(1, 60.0) * kick_amplitude / 4

// Apply filter  
filtered_saw :: f32 = apply_lowpass(pure_saw, filter_cutoff) 
final_output :: f32 = filtered_saw + sub_harmonic  

// Apply envelope  
final_volume :: f32 = apply_envelope(final_output, attack_ms=10, release_ms=50)

๐Ÿ”ง 4. Modern Implementation in Game Engines

Unity & Godot Integration:

Use AudioSource with filter effects:

  1. Create a simple sine wave sound
  2. Apply "Low Pass Filter" effect (e.g., cutoff: 800Hz, resonance: 1.5)
  3. Control volume with AudioSource.volume over time using envelope controllers

C++/C# Direct Implementation:

Create your own custom filter classes with:


๐Ÿ“Š 5. Comparison to Other Synthesis Methods

Method Characteristics Best For
Subtractive Simple, powerful, classic sound design Film scoring, drum machines
Additive Build tone from harmonic sine waves Complex orchestral sounds, bell tones
FM Synthesis Modulate one oscillator to another for complex timbres Bell-like tones, harsh leads
Wavetable Pre-computed waveform banks (e.g., from sampled instruments) Sample-based pad tones, real instrument emulations

๐Ÿ› ๏ธ 6. Practical Workflow Tips

For Sound Designers:

  1. Always start with the waveform you want (e.g., warm pad sound โ†’ square wave or sawtooth)
  2. Check your low-end with a sub-harmonic (40-80Hz) to ensure punch and clarity
  3. Use filters as the primary shaping tool: most problems in modern game audio stem from incorrect frequency balance
  4. Avoid over-processing: if a simple saw wave + filter works, don't use too many effects

For Game Developers:

  1. Precompute envelope profiles for quick lookup tables to avoid real-time calculation
  2. Cache filter coefficients using fixed-point math where possible for performance
  3. Use stereo imaging effects sparingly in audio systems with many simultaneous sounds

๐Ÿง  7. Advanced Concepts

Resonance and Q-Factor in Filters:

High resonance (Q factor) creates ringing at the cutoff frequency:

Dynamic Filter Modulation:

Rather than using static filters, use:

  1. LFOs for rhythmic filter sweeps
  2. ADSR envelopes to shape how filters evolve over time (e.g., filter opens during release)
  3. VCA-driven modulation where volume change also influences perceived brightness