Zoë Blade's notebook

Pulsewidth modulation

Static sounds made from precisely repeating shapes sound boring. To make the sound dynamic and interesting, you can modulate it in a variety of ways, even with the oscillator itself, before getting as far as introducing a filter.

The most common way to modulate an oscillator is to select its pulse wave output, and use an LFO's triangle wave to change the pulse's width (pulsewidth for short). This can slowly change it from a deep and rich square wave, through to a narrow and tinny sliver of a pulse wave, and back again. This makes a much more interesting sound.

There are different ways of looking at what's going on. The most literal way of looking at it is that the oscillator's waveform is changing shape, continually getting narrower and wider again. As a result, bearing in mind that each shape is equivalent to lots of different sine waves of different frequencies and amplitudes working together, the different shapes have different sine waves in them, emphasising (and outright adding and removing) different harmonics.

Another way of looking at it is that pulsewidth modulation is essentially making two sawtooth waves, one rising and one lowering. The frequency of the LFO is how far apart the frequencies of the two sawtooth waves are. This explains why it sounds better when the LFO is especially slow — the two waveforms mixed together are more in tune with each other, and indeed the rest of the music. You can achieve a very similar effect with two oscillators slightly detuned from each other.

Synthesis: Envelope generator | Footing | Frequency shifter | Noise | Oscillator | Periodic waveform | Program (synthesiser) | Pulsewidth modulation | Sub-oscillator