Blog / Sound Design

Pulse Width Modulation: Why One Oscillator Can Sound Like Two

Pulse Width Modulation: Why One Oscillator Can Sound Like Two

The classic PWM string sound is everywhere: lush, wide, slightly chorused even though there is only a single oscillator playing. Most synthesis tutorials describe it as "the pulse width sweeping back and forth" and leave it there. But there is a precise mathematical reason why a single oscillator with modulated pulse width sounds spatially wide, and understanding it changes how you use the technique.

What a Pulse Wave Actually Contains

A pulse wave is just a square wave with adjustable duty cycle. If the wave is high for 50% of each period, you have a square wave. If it is high for 25%, you have a narrow pulse.

The harmonic content of a pulse wave with duty cycle D follows this amplitude formula for the nth harmonic:

An = (2 / π) · sin(n · D · π) / n

The first thing this reveals is what happens at different duty cycles:

At D = 0.5 (square wave), sin(n · 0.5 · π) = 0 for all even n. Every even harmonic drops out. The result is the classic hollow square wave sound: only odd harmonics, falling at -6 dB per octave.

At D = 0.25, every fourth harmonic cancels: harmonics 4, 8, 12 and so on go to zero. The remaining spectrum has a brighter, thinner quality.

At D = 0.1, every tenth harmonic cancels. The wave sounds reedy and nasal, with a dense cluster of harmonics in the low-mid range.

This is why changing pulse width changes timbre in a predictable way. The sinc function sin(n·D·π)/n creates a moving null pattern across the harmonic series as D changes.

The Equivalence That Explains Everything

Here is the fact that most synthesis explanations skip: a modulated PWM oscillator is not merely "similar" to two detuned oscillators. Gordon Reid, writing for Sound On Sound, demonstrated that a pulse-width modulated pulse wave is mathematically equivalent to the sum of a constant-frequency sawtooth and a frequency-modulated sawtooth.

In practice, this means: take two sawtooth oscillators, tune one slightly sharp relative to the other, and mix them. The result is all but identical to a single pulse oscillator with LFO-modulated pulse width. The beating between the two detuned fundamentals corresponds exactly to the cycling through harmonic null patterns in the PWM wave.

This equivalence is why PWM produces that chorus-like width. The "two oscillators" are not a metaphor. They are embedded in the Fourier representation of the waveform. As the duty cycle moves, harmonics grow, shrink, and cycle through zero in a pattern that your auditory system interprets as two slightly asynchronous pitch sources moving in and out of phase.

Narrower modulation depth gives subtle warmth. Deeper modulation pushes toward the unmistakable "string machine" sound of the 1970s and 1980s.

How Analog Synths Implemented It

The original Minimoog (1970) did not have dynamic PWM. It offered three fixed pulse waveforms at preset duty cycles but no way to modulate pulse width continuously. You could select a narrow or medium pulse and leave it there.

The Sequential Circuits Prophet-5 (1978) was the instrument that established LFO-modulated PWM as a standard synthesis feature. Both oscillators carried variable-width pulse waves. The LFO could modulate pulse width on both oscillators independently, and the Poly-Mod section allowed the filter envelope or Oscillator B to drive Oscillator A's pulse width alongside pitch and filter cutoff. This gave the Prophet-5 its layered, animated pads.

The Oberheim OB-X (1979) followed with similar capability. Its LFO could route to pulse width on all voices, and later OB models expanded the routing options.

The Roland Juno-106 (1984) added a technical twist. Juno DCOs were described as "digital" but the reality is a hybrid: a digital counter chip (the Intel 8253 programmable interval timer) generated a precise timing reference to eliminate the pitch drift of analog VCOs. The actual audio waveform remained analog. The sawtooth was produced by a capacitor charging through an integrator, and the pulse wave was derived from it by feeding the sawtooth into a comparator: an op-amp that snapped its output high or low depending on whether the input was above or below a DC reference voltage. Raising or lowering that reference voltage moved the comparator threshold up or down the sawtooth slope, directly changing the duty cycle.

PWM on the Juno-106 meant automating the comparator reference voltage via LFO or manual knob. The actual waveshaping stayed entirely in the analog domain even though the timing was locked digitally. This is why Juno PWM sounds different from a Prophet-5, despite both using pulse-wave oscillators.

The Digital Implementation Problem

When PWM moved into software, aliasing became the main obstacle. A naive digital pulse oscillator works by comparing a phase accumulator against a threshold. If the accumulator is below the threshold value, output is +1; above it, output is -1. The transition between those two states is instantaneous in the digital domain, which means infinite harmonic bandwidth, which means harmonics fold back below Nyquist as inharmonic noise.

For a standard square wave this was solved with BLEP (Bandlimited Step). The approach: precompute the integrated sinc correction kernel for a bandlimited step function, and apply it at each waveform discontinuity. The correction blends the ideal bandlimited transition into the existing output buffer, suppressing the aliased content.

PWM complicates BLEP because the pulse wave has two edges per cycle, not one. Both the rising edge and the falling edge must receive their own correction kernel. As the duty cycle changes, the position of the falling edge shifts every cycle, so the kernel timing recalculates continuously. At extreme duty cycles approaching 0% or 100%, the two edges get very close together and the corrections interact. Most implementations clamp the duty cycle range for this reason.

The lighter-weight alternative, PolyBLEP, uses a polynomial approximation of the correction instead of a precomputed table. It is cheaper and close enough for most purposes, though it leaves small aliasing artifacts at very high pitches under strong PWM modulation.

Using PWM Effectively

Slow LFO modulation at low depth gives an ensemble quality without obviously moving pitch. This works well on pads because the brain interprets the slow harmonic cycling as the acoustic spread of a real instrument section rather than an oscillator artifact.

Faster modulation, above about 4 Hz, starts to add a clearly audible tremolo quality to the timbre change. That range is useful for leads where you want animated texture rather than width.

The duty cycle resting point matters. Starting at 50% and sweeping toward 25% and back produces a different character than starting at 25% and sweeping asymmetrically. Starting near 50% emphasizes the even/odd harmonic transition; starting narrow keeps the sound consistently bright with a cycling hollow quality.

In software, u-he Diva implements the most circuit-accurate analog PWM oscillator models, including the Juno and Oberheim topologies. Vital has a dedicated pulse-width warp mode on its oscillators. Serum can approximate PWM but the developer Steve Duda noted on the Xfer forums that standard PWM modulation in Serum introduces a pitch artifact requiring -50% phase compensation from the same modulation source.

The two-oscillator equivalence also suggests an alternative in any synth that lacks proper PWM: detune two sawtooth oscillators by 2 to 5 cents, mix them at equal levels, and run the result through a high-pass filter to thin the sub content. The result is not identical to PWM but lands in similar psychoacoustic territory: wide, moving, unison without obvious chorus processing.

Why It Works

The core insight is that the sinc envelope governing harmonic amplitudes in a pulse wave is not decorative. It is structural. Moving the duty cycle sweeps that sinc null pattern across the harmonic series, selectively cancelling and re-introducing partials at a rate set by the LFO. Your auditory system tracks those partial relationships and interprets them as two coherent pitch sources moving apart and together.

One oscillator, two apparent voices. The math was there from 1822 in Fourier's original series. Synthesizer designers just needed a potentiometer and an LFO to make it audible.