In part two of this series you saw how a waveform could be represented digitally. In this part, you will see how simple waveforms can be combined to create more complex waveforms, and you’ll be introduced to some of the waveforms most commonly used in sound synthesis.

Audio waveforms can be either periodic or aperiodic. A periodic waveform consists of the same shape repeated at regular intervals. This type of waveform occurs rarely outside of audio synthesis. An aperiodic waveform has a shape that changes over time. Most acoustic instruments produce aperiodic waveforms.

As well as describing a waveform by its shape, we can also describe it by its harmonic content. Musically useful waveforms have a strong fundamental frequency (this is the frequency that we identify as the pitch of the note being played), but it can also contain other frequencies that are less strong. These are known as overtones and are what gives a particular sound its character, or timbre.

The simplest type of audio waveform is the sine wave.

Why is the sine wave the simplest type of audio waveform?

- Because it is periodic.
- Because its harmonic content consists of just the fundamental frequency. In other words, it has no overtones.

If you were to plot the sine wave as a frequency spectrum, you can see that only the fundamental frequency is present (shown by the yellow line at about 2Khz).

The yellow line shows the presence of the fundamental frequency only.

By comparison, take a look at the waveform and frequency spectrum produced by a phrase played on the clarinet. You can see that the waveform is aperiodic and that the frequency spectrum contains many overtones. These characteristics are what give the clarinet its unique sound.

As you might expect, a sine wave on is own sounds quite boring:

However, raw sine waves do have their uses, for example, adding a bit of sub-sonic kick to a bass line. Where sine waves really come into their own though, is when you start to combine them to make new, more complex waveforms.

When two sine waves are combined, their signals are added together. When both sine waves are in the positive or negative parts of their cycle at the same time then the second sine wave serves to amplify the first. We say that the signals are in phase with each other. You can see this in the diagram below. The first waveform is the original sine wave. The second waveform shows what happens to it when it is combined with an identical sine wave. The amplitude of the waveform doubles. This has the effect of making the sound louder.

If one of the sine waves is in the positive part of its cycle, while the other is in the negative part of its cycle, then the second sine wave serves to attenuate the first. In this case the signals are out of phase. When the signals are out of phase by exactly 180 degrees (i.e. the first sine wave reaches its positive peak as the second sine wave reaches its negative peak) then they will cancel each other out entirely and no sound will be heard. This is known as phase cancellation and is shown in the diagram below.

The following audio example demonstrates what happens when two otherwise identical sine waves start to move out of phase with each other. At the beginning of the sound, only the first sine wave is heard. Then the second sine wave is introduced in phase with the first. You can hear it amplifying the first signal. The sine waves are then moved increasingly out of phase with each other. This results in the sound becoming softer as the two waves begin to cancel each other. Eventually the sound dies away altogether as the sine waves become out of phase by 180 degrees.

In the experiments you have seen and heard so far, both sine waves have had identical frequencies. However, even more complex waveforms can be created by combining sine waves of different frequencies.

A more musically useful experiment than phase shifting sine waves, is to detune one of the sine waves just a little from the other. Because the two waves are no longer synchronised, this will result in the second wave amplifying the first wave for a short period of time and attenuating it for another period of time, as shown in the diagram below.

This regular amplification and attenuation of the original signal is known as beating. It can be used to obtain a tremolo effect and is demonstrated in the following audio example. At first the two sine waves are at the same frequency and in sync, then the second sine wave is slightly detuned from the first to introduce a slow tremolo effect.

When sine waves of different frequencies are combined to create a complex waveform, each sine wave is known as a partial. Adding partials at random frequencies and amplitudes will often result in the sound becoming discordant, or inharmonic, as demonstrated in the following unpleasant audio example.

To make a more musical waveform requires the combination of partials that are whole number multiples of the fundamental frequency. These are known as harmonics. So, the first harmonic is twice the fundamental frequency, the second harmonic is three times the fundamental frequency, the third harmonic is four times the fundamental frequency and so on. Together, these are known as the harmonic series. The table below shows the first 10 harmonics of middle C.

Harmonic | Frequency | Approximate Pitch |
---|---|---|

Fundamental | 261.626 Hz | C4 |

1st Harmonic | 523.252 Hz | C5 |

2nd Harmonic | 784.878 Hz | G5 |

3rd Harmonic | 1046.504 Hz | C6 |

4th Harmonic | 1308.13 Hz | E6 |

5th Harmonic | 1569.756 Hz | G6 |

6th Harmonic | 1831.382 Hz | A#6 |

7th Harmonic | 2093.008 Hz | C7 |

8th Harmonic | 2354.634 Hz | D7 |

9th Harmonic | 2616.26 Hz | E7 |

10th Harmonic | 2877.886 Hz | F#7 |

You can see that, although the frequency of the harmonics increases at a constant rate mathematically, the perceived musical interval between subsequent harmonics gets smaller.

Generally speaking, the more harmonics that are introduced as partials, the more complex the sound is. Adding sine waves together to create more harmonically complex wave forms is known as additive synthesis. You can put this knowledge to good use to create four of most commonly used waves in synthesis: the triangle wave, the square wave, and the sawtooth wave.

The triangle wave consists of all the odd-numbered harmonics, with each subsequent harmonic attenuated by the inverse square of its frequency relative to the fundamental frequency.

The diagrams below show a triangle wave and its frequency spectrum.

The triangle wave still sounds quite pure, because of the scarcity of overtones, so it is often used as the basis for simulating instruments such as the flute and piccolo.

The square wave also uses only the odd-numbered harmonics but these are not attenuated as sharply as they are for the triangle wave.

The diagrams below show a square wave and its frequency spectrum.

The square wave has a richer timbre than the triangle wave, but is still quite hollow sounding, so it is often used as the basis for simulating woodwind instruments such as the clarinet and oboe.

Finally, the sawtooth wave contains every harmonic.

The diagrams below show a sawtooth wave and its frequency spectrum.

The sawtooth wave has a very rich timbre and is often used as the basis for simulating string instruments, such as the violin, or brass instruments, such as the trumpet.

In the next part of this series I’ll look at a variant of the square wave, the pulse wave, and how noise is generated.

*The images in this series were created by me using a variety of graphics tools. The audio clips in this article were recorded by me using a variety of audio tools.*