What is phase distortion synthesis?

Oli Larkin: PD synthesis doesn't phase him.
Oli Larkin: PD synthesis doesn't phase him.

Oli Larkin is responsible for VirtualCZ, a plugin emulation of Casio's classic CZ hardware synths from the '80s.

Who better, then, to explain the science behind the phase distortion synthesis methods that powered these instruments, and are still useful today?

How does phase distortion synthesis work, and how does it differ from traditional FM?

"To understand Phase Distortion (PD) synthesis and its relationship to FM, it's good to start with an idea of how a basic digital "table lookup" oscillator works, since both are usually based on this kind of oscillator. It's a bit complex so bear with me!

"A digital oscillator produces a periodic signal, which is simply a repeating pattern of values that creates a wave shape (eg, Sine, Square, Saw, Triangle etc). The fundamental frequency of the oscillator (and the pitch that we hear) is determined by how fast the shape is repeated.

"One way of making different wave shapes - and was possible on early 1980s hardware - is to use a 'wavetable', which stores in digital memory what is effectively an audio recording of a single copy of the shape. The wavetable is often only a few hundred values in length (512 samples is a typical length for decent sound quality). By continuously looping the wavetable at different speeds we generate the wave shape at different frequencies.

"So, a 'table lookup' oscillator actually comprises two things:

"A) A counter to determine which point in the table to read. This can be seen as an oscillator itself, generating a basic ramp/saw shape at the fundamental frequency. This part generates the so called 'phase' of the waveform. The count keeps on looping from zero up to the table size (eg, 512) and jumps back down to zero.

"B) A wave shape stored in memory (the wavetable). For both the Casio CZ and the early Yamaha DX synths there was only one shape, which was a sinusoid (eg, a sine wave).

"In Casio's PD synthesis, the phase part of the oscillator described in A) is distorted in eight different ways (corresponding to the eight wave shapes on the synth) and the amount of distortion is controllable via a parameter called DCW (Digitally Controlled Wave-Shaping). When the DCW is at zero, you just hear a sine wave sound, but as you increase the DCW, the sine wave can be warped into a square or sawtooth (or one of the other eight CZ wave shapes). This produces a very similar sound to what you hear when you play with the filter cutoff on a subtractive synth (there are no filters in traditional PD synths!).

"If you can picture a sine wave, imagine how you could compress or expand certain bits of it to change it into a saw or square shape. This is what happens when the phase part of the oscillator is distorted.

"Further to this, three of the eight wave shapes - the so called 'resonant' waves - are slightly different in that they use an extra hard-sync effect to simulate the squelchy sound of a resonant filter. If you look at the output of these oscillators on a spectrogram you see a peak in the spectrum at a certain point above the fundamental frequency. Changing the DCW changes the position of the peak.

"With these resonant waveforms, a sine wave is generated at multiples of the fundamental frequency of the oscillator (the multiplication is linked to the DCW value). The output of this sine wave is then shaped by a volume envelope that differs depending on the type of resonant wave chosen. The volume envelope is actually a ramp, trapezoid or triangle oscillator which loops at the (lower) fundamental frequency. The envelope means that there are no discontinuities in the output (which would cause nasty glitches). The higher frequency oscillator is reset by the one at the fundamental frequency (hence why I said it is a hard-sync effect).

Different to FM

"With FM synthesis, at least two table lookup sine wave oscillators are used in combination, but the phase part is not distorted like it is in PD. The output of one 'modulator' oscillator modulates the frequency of the other one (the 'carrier' oscillator), which is the one that you hear.

"In fact, due to the specifics of its implementation, Yamaha's FM should really have been called 'Phase Modulation' - but that's another (long) story! FM synths often use more than two oscillators, each with its own envelope, which together are called an 'operator' (the DX7 had six of these).

Both types of synthesis allow you to generate very pure sounds but also very harsh, complex sounds. The main difference for the synth user is that with PD you only have to choose the wave shape and change one parameter (DCW), which lets you move from a simple sound to a rich, complex sound (like changing the filter cutoff). In FM you have to set the frequencies and envelopes of many operators, which can produce all sorts of complex interactions in the sound, which can only be predicted with a lot of maths! You don't need a PhD in DSP to program a CZ!"

Are there any advantages and/or disadvantages to consider when programming a PD synthesiser?

"I've described the basics of a PD oscillator above, but the CZ synths sound great because of the architecture of the whole synth voice, not just the oscillator. The fact that you have two 'lines' per voice, each of which includes one PD Oscillator and three MSEG envelopes (one for pitch, one for DCW and one for volume) makes it very powerful. Detuning, ring modulating and noise modulating the two lines together gives you loads of options. You have to remember that this technique can easily generate aliasing distortion when you push it hard, but you can embrace that and use it as a feature!"

Can you elaborate on the Casio CZ and VirtualCZ's 'alternating waveforms' thing? We know that's not part of phase distortion as such - it's just something Casio included on those synths - so it'd be good if you could clarify how that fits into everything.

"Sure. One repetition of a wave shape is called a 'cycle'. On the CZs you can alternate between two of the eight wave shapes on each cycle. So if DCW is set to max and you've chosen Saw and Square waveforms, the oscillator will flip between the two: saw, square, saw, square… and so on. In practice this is like having a load of extra wave shapes - each combination has a different sound.

What kind of sounds can be created using phase distortion synthesis techniques?

"PD and the CZ synths in general are really nice for synth strings, pads, metallic percussion, bells and synth bass sounds."

- Where should the novice synthesist begin when creating their first PD patch? Any tips or tricks?

When first starting out, probably the best thing to do is to tweak the factory presets and listen to the results. With VirtualCZ I have taken the same synthesis architecture from the CZ series and added features that make it easier and more fun to program like easy to use ADSR envelopes and randomisation. Another approach, when you understand the synth a bit better is to initialise the patch (to a basic sawtooth sound) and to tweak the parameters one at a time, starting with only one of the "lines" enabled.

Get the full lowdown on FM synthesis, from first steps to advanced techniques, plus 33 more pro production videos, in the next issue of Computer Music magazine, which hits the shelves on 25 March.

Computer Music

Computer Music magazine is the world’s best selling publication dedicated solely to making great music with your Mac or PC computer. Each issue it brings its lucky readers the best in cutting-edge tutorials, need-to-know, expert software reviews and even all the tools you actually need to make great music today, courtesy of our legendary CM Plugin Suite.