Subtractive Synthesis Generator — User Guide
Band-limited oscillator synthesis followed by a continuously moving recursive filter, resonance/Q control, a separate amplitude envelope, and final target peak normalization.
What this does
The generator creates a mono oscillator source, optionally filters it with a time-varying recursive filter, applies a separate amplitude envelope, and then peak-normalizes the finished note.
polyBLEP / band-limited oscillator → cutoff control → recursive filter + Q → amplitude envelope → target peak normalization
No input Sound is required. The tool can synthesize one note of the requested Duration or, when Bass line demo is enabled, concatenate a fixed four-note pattern.
Version 2.2 is substantially different from older versions of this tool: the filter envelope now controls cutoff frequency directly, the main filters are recursive IIR filters rather than frequency-domain Hann operations, and resonance is mapped to filter Q rather than to transition-band width.
Quick start
- Choose Custom or one of the six presets.
- Select the oscillator Waveform and Frequency.
- Select a Filter type, Cutoff frequency, and Resonance.
- Select a Filter envelope and Envelope amount.
- Select an Amplitude envelope and Duration.
- Enable Edit details if you need to change sample rate, Pulse width, or Output peak.
- Run the script. A mono Sound is created and optionally visualized and played.
Signal flow
Actual v2.2 processing chain
1. Generate a band-limited oscillator source.
2. Generate a sample-by-sample cutoff-frequency control curve.
3. Convert the moving cutoff to recursive filter coefficients.
4. Apply the selected low-pass, high-pass, band-pass, notch, or bypass topology.
5. Multiply by the selected amplitude envelope.
6. Peak-scale the complete non-silent result to Output peak.
The filter envelope and amplitude envelope are independent. The first changes spectral filtering; the second changes signal gain.
Oscillators
Discontinuous source waveforms are built from a polyBLEP sawtooth primitive. The correction around waveform discontinuities reduces the strongest aliasing that would occur with naive sample-by-sample saw, square, and pulse formulas.
| Waveform | Current implementation |
|---|---|
| Sawtooth | One polyBLEP saw at the selected frequency, scaled to 0.85. |
| Square | Difference of two polyBLEP saws separated by half a cycle, scaled to 0.85. |
| Pulse | Difference of two polyBLEP saws separated by the selected Pulse width, with DC correction for the chosen duty cycle. |
| Triangle | A band-limited square derived from polyBLEP saws is numerically integrated, DC-centered, then peak-scaled internally to 0.85. |
| Dual Saw | Two polyBLEP saws at f and f + 7 Hz, mixed at 0.45 each. |
| Super Saw | Five polyBLEP saws at f × {1, 1.005, .995, 1.01, .99}, mixed at 0.18 each. |
Pulse width
Pulse width is available only on the Details page and is accepted from 0.1 to 0.9. A value of 0.5 produces the symmetric square-wave case; asymmetric values change the pulse spectrum.
Filter models
The current filters are time-varying RBJ-style recursive biquads. Their coefficients are recalculated sample by sample from the moving cutoff curve.
Resonance → Q
For the 12 dB/octave low-pass, high-pass, band-pass, and notch filters:
Thus Resonance = 0 gives approximately the Butterworth second-order value Q = 0.707, while Resonance = 1 gives Q = 10.
| Filter | Topology | Resonance behavior |
|---|---|---|
| No Filter | Source copied unchanged through the filter stage. | Resonance and cutoff do not alter the audio. |
| Low Pass 12dB | One second-order low-pass biquad. | Q from .707 to 10. |
| Low Pass 24dB | Two cascaded second-order low-pass stages. | Stage 1 fixed at Q=.5411961; stage 2 rises from Q=1.306563 to 10. At Resonance=0 the pair forms the standard fourth-order Butterworth Q pair. |
| High Pass | One second-order high-pass biquad. | Q from .707 to 10. |
| Band Pass | One second-order band-pass biquad centered on the moving cutoff. | Higher Q narrows and emphasizes the pass region. |
| Notch | One second-order notch biquad centered on the moving cutoff. | Q controls the spectral width of the rejection region. |
Filter envelopes
The selected Filter envelope creates an explicit cutoff-frequency Sound. The cutoff is always clamped to:
| Envelope | Actual cutoff trajectory |
|---|---|
| No Envelope | Constant at the selected Cutoff frequency. |
| Short Sweep | Starts at cutoff × (1 + 2 × amount) and falls linearly to the base cutoff during the first max(20 ms, 25% of note duration); then remains at the base cutoff. |
| Long Sweep | Rises linearly over the complete note from the base cutoff to cutoff × (1 + 1.5 × amount). |
| Attack Emphasis | A short parabolic excursion during the first max(20 ms, 20% of duration), peaking at cutoff × (1 + 3 × amount), then returning to the base cutoff. |
| Decay Sweep | Starts at cutoff × (1 + 2 × amount) and falls linearly to the base cutoff across the complete note. |
Envelope amount ranges from 0 to 1 and scales the excursion above the base cutoff. These envelopes never sweep below the selected base cutoff.
Amplitude envelopes
Every amplitude envelope explicitly starts and ends at zero or approaches zero through a short cosine fade, reducing note-boundary clicks.
| Envelope | Actual implementation |
|---|---|
| Percussive | Fast cosine attack, exp(-8t) decay, and a short release fade. |
| Sustained | Fast attack followed by the slower exp(-1.5t) decay and a longer release. It is more sustained than Percussive, but it is not a flat ADSR sustain stage. |
| Slow Attack | Cosine attack up to 0.5 s or 40% of the note, unity middle section, then a slow release. |
| Pluck | Very short attack, strong exp(-20t) decay, and short release. |
| Gate | Fast attack, near-unity body, then a release of up to 100 ms or 25% of the note. |
Controls
Main page
| Control | Default | Meaning |
|---|---|---|
| Preset | Custom | Custom plus six complete synthesis configurations. |
| Bass line demo | off | Replaces the single note with the fixed four-note demonstration described below. |
| Waveform | Sawtooth | Oscillator source. |
| Frequency | 220 Hz | Single-note oscillator frequency. Bass-line demo uses its own fixed note frequencies. |
| Filter type | Low Pass 24dB | Recursive filter topology or bypass. |
| Cutoff frequency | 1000 Hz | Base cutoff before filter-envelope modulation. |
| Resonance | .30 | Maps to filter Q; valid 0–1. |
| Filter envelope | No Envelope | Selects the moving-cutoff trajectory. |
| Envelope amount | .70 | Depth of the cutoff excursion; valid 0–1. |
| Amplitude envelope | Sustained | Controls note gain over time. |
| Duration | 3.0 s | Single-note duration. Ignored by Bass-line demo audio, whose four notes are each 0.25 s. |
Details page
| Control | Default | Meaning |
|---|---|---|
| Sampling frequency | 44100 Hz | Direct synthesis and output sample rate; minimum 8000 Hz. |
| Pulse width | .30 | Used only by Pulse; valid .1–.9. |
| Output peak | .90 | Target peak normalization; valid >0…1. |
Presets
Presets override Waveform, Frequency, Filter type, Cutoff, Resonance, Filter envelope, Envelope amount, and Amplitude envelope. They do not override the Details-page Sample rate, Pulse width, or Output peak.
| Preset | Source | Filter | Control / amplitude envelope |
|---|---|---|---|
| Moog Bass | Saw, 110 Hz | LP24, 600 Hz, res .60 | Decay Sweep .80 / Percussive |
| ARP Lead | Saw, 440 Hz | LP12, 2000 Hz, res .40 | Short Sweep .90 / Sustained |
| TB-303 Acid | Saw, 220 Hz | LP24, 800 Hz, res .80 | Attack Emphasis 1.00 / Pluck |
| String Pad | Super Saw, 220 Hz | LP12, 1500 Hz, res .20 | No Envelope / Slow Attack |
| Plucked Bass | Saw, 110 Hz | LP24, 1200 Hz, res .50 | Short Sweep .70 / Pluck |
| Synth Brass | Saw, 330 Hz | LP12, 2500 Hz, res .30 | Long Sweep .60 / Slow Attack |
Bass-line demo
When enabled, the normal Frequency and Duration controls no longer define the output note sequence. The script renders four independently synthesized notes:
110 Hz × 0.25 s
220 Hz × 0.25 s
196 Hz × 0.25 s
The four notes use the current preset/filter/envelope settings and are concatenated into a one-second mono Sound.
Each 0.25 s note passes through the complete synthesis engine and is peak-normalized independently before concatenation.
Sampling and safety
The script requires at least 8000 Hz sample rate and at least 16 samples across the requested note duration.
The highest oscillator frequency used by the selected source must remain below:
For Dual Saw this check uses f + 7 Hz; for Super Saw it uses 1.01 × f.
The moving cutoff is independently clamped between 20 Hz and 45% of Sample rate.
Version 2.2 uses polyBLEP correction for the discontinuous oscillators, but there is no oversampling stage.
Output and level
| Property | Behavior |
|---|---|
| Input | No input Sound required. |
| Channels | Mono. |
| Duration | Single-note mode: exactly Duration. Bass-line demo: exactly 1.0 s. |
| Sample rate | Exactly the Details-page Sampling frequency. |
| Normalization | Every non-silent synthesized note is peak-scaled to Output peak. This is target normalization, not a down-only ceiling. |
| Single-note name | subtractive_<waveform>_<preset>. |
| Bass demo name | subtractive_bassline_<preset>. |
The earlier Volume control was removed because a common gain applied before unconditional target peak normalization cannot change the final peak level.
Visualization and QC
| Panel | What it shows |
|---|---|
| A — Source oscillator | Up to the first 40 ms of the actual band-limited source waveform. |
| A2 — Measured spectral sculpting | Praat LTAS curves for the raw oscillator and the post-filter signal, plotted together up to min(8 kHz, Nyquist). |
| B — Filter control | The actual cutoff-frequency trajectory over the note, with the current filter-envelope name and displayed Q. |
| C — Amplitude control | The exact amplitude-envelope Sound used to shape the filtered source. |
| D — Measured output | The final normalized waveform used for verification. |
The QC grid summarizes source type, realized cutoff range, filter topology, Q/resonance, amplitude envelope, peak, and RMS.