Stuck with a SynthEdit project?

Tag: Harmonics

Additive Synthesis part 1.

Additive synthesis is a technique that is little known and often poorly understood–especially compared to the more usual subtractive and FM synthesis methods of sound sculpting.
However when used effectively, it can be a powerful tool for making sounds that are difficult to create by other means. So what is additive synthesis , and how can we create an instrument that uses it? First we need to understand exactly what it is and how it works to create sounds.

How additive synthesis works.

To understand additive synthesis, let’s compare it to the better known, subtractive synthesis as used in the early Moog, Roland and ARP synthesizers.
A subtractive synth starts by generating a rich, full waveform, like a square or sawtooth wave. We then use filters, envelopes etc to tailor this sound, until we achieve the sound we want. This is the method along with FM that we are more familiar with.
Additive synthesis starts work from the opposite end. Rather than starting with a complex sound and changing it to our needs, we build our sound from scratch, one element at a time. This sounds dauntingly complex, but approached piece by piece it’s quite easily understood and managed.
A Hammond drawbar organ for example can be considered as a basic additive synthesizer We start with our strong fundamental frequency that give the tone its definite pitch. Lets take 440 Hz (A4) to start with, we can then start adding in more tones such as 2nd harmonic 880 Hz (A5), 3rd harmonic 1320 Hz (A6), and so on. Doesn’t sound so daunting when compared to a Hammond organ does it?

To further understand how this works, we’ll need to understand harmonics.
A very basic example is; as we have already seen, complex sounds can be approximated by layering sine waves at different frequencies (pitches) and amplitudes (volumes). These extra tones are known as “Partials” rather than harmonics (you’ll see why later).
A harmonic waveform, like a square or a sawtooth, contains a sine wave at the “fundamental frequency”: that’s the lowest frequency in the sound, and the one whose pitch we hear. It’s also called the first harmonic.
After this we have more layers of sine waves, or harmonics (partials) which all add together to create our unique sound. In this case they are at whole-number multiples of that fundamental frequency (x2, x3, x4 etc).
As an example: A 100 Hz sawtooth wave will contain the fundamental frequency at 100 Hz, and can then be created using more sine waves (or harmonics) at 200 Hz, 300 Hz, 400 Hz, and so on, gradually diminishing in level as we increase in frequency.
The number of upper harmonics that are present in a sound, and how loud they are, is what gives the sound it’s distinctive timbre.
A square wave, for example, features only harmonics that are odd-numbered multiples of the first harmonic: so, 300 Hz, 500 Hz, and so on (x3, x5, x7) but they are still whole number multiples.
In the illustration below you can see (especially in the lower frequency region) the difference in harmonic (partial) structure of the sawtooth and square wave signals, which are both set at 220 Hz.

Additive synthesis makes use of this, allowing us to build new sounds from scratch by controlling the frequency and amplitude (volume) of their harmonics.
Naturally, this is a long-winded way to make a square or a sawtooth wave: for that we just need to switch on our faithful Moog or ARP.
Stepping outside the boundaries.
However by getting involved in controlling the individual harmonic components of our sounds, we can leap far beyond the bounds of these familiar sounds, and create sounds that are less accessible using other forms of synthesis.
By changing the amplitudes of a sounds constituent harmonics over time, by using LFOs or Envelopes we can create some really interesting sounds that are completely unlike other instruments.
Inharmonic Partials.
A further leap forward is also possible by introducing inharmonic (not harmonically related) partials which are not whole number relatives, but partial numbers such as x2.5 for example, we can then create some really unusual sounds, such as percussion, bells, metallic sounds and some quite “other worldly” effects, we end up with sounds that are sometimes like ring modulation and some that are beyond what we can do with a ring modulator and two VCOs.

If you want a really in depth explanation of the principles of additive synthesis (warning: there’s a lot of advanced maths in this article- think Fourier analysis) then have a read of this Wikipedia article on the subject.

In the next post I’ll start to delve into how we can achieve some of this in Synthedit.

Creating a Voltage Controlled Waveshaper in SynthEdit.

Having some control over the waveshaper (although not over the actual transfer curve in the module) is possible in as far as the depth of the shaping effect, and the polarity of the shaping effect can be voltage controlled using a few stock modules, and one extra from Elena Novaretti’s module packs at www.elenadesign.eu, the ED Range Clipper which limits the amount by which the control voltages can be varied- this is used to prevent the control voltage exceeding the normal range for the waveshaper and causing unpredictable results.
The Intensity (or depth) of the effect can be varied between 0 V (minimum shaping) and 10 V (maximum shaping). This is then fed to the X-Mix module directly to Input B, and through an Inverter2 module to Input A. This allows us to effectively change the polarity of the waveform, which is then added to the Input audio at the final Level Adj module.
Of course you’re not limited to just using the Waveshaper3 module, you could just as easily use the Waveshaper2 module and use a formula for the transfer curve.

Voltage controlled waveshaper diagram

So far this is the best I have been able to come up with, but I’m as always going to keep experimenting so “watch this space” for updates on this technique

SynthEdit Oscillators.

The oscillator is arguably (OK we could say the keyboard, but let’s not get picky) the starting point for sound generation in a Synthesizer, after all it’s where almost all of the sounds are created.
An oscillator is a module which produces a voltage which rises and falls in a set manner, at a rate that can be used to produce an audible tone. In SynthEdit this “voltage” will vary between -5 volts and +5 volts.
The classic analogue Oscillator or VCO in a synthesizer had a choice of five basic waveforms: Sine Wave, Triangle wave, Sawtooth, Ramp (which is the reverse of a sawtooth), and Pulse.

Oscillator waveshapes and noise.

Saw and pulse waves’ spectral content is very rich. For example, a saw wave with a base frequency of 500 Hz comprises harmonics spaced at equal intervals, with exponentially decaying amplitude as shown below.

Sawtooth harmonic spectrum

However, many physical instruments harmonics are of lower amplitude at high frequencies, or may have resonances at particular frequencies. We can achieve this by filtering out, or boosting different frequencies with various types of filter.

The waveform affects the harmonics.
The exact relation between waveform and harmonic content is a very complex mathematical subject (Fourier analysis).
Sawtooth wave:
A sawtooth waveform contains all harmonics in inverse proportion to their number – with all these mathematical relationships you know something ‘natural’ is going on. So the 2nd harmonic is half the amplitude of the fundamental, the 5th harmonic is a fifth the amplitude and so on. Being so rich in harmonics, sawtooth waves are commonly used for brass, strings and some woodwind sounds.


Square or pulse wave:
The square wave contains only odd-numbered harmonics in the same proportion as in sawtooth waves. It produces a ‘hollow’ sound and is typically used for clarinets and reed instruments.


Triangle wave:
Triangle waves contain only odd harmonics, as with square waves, but at much lower amplitudes. In fact – yes, it’s more maths – the relationship is the square of the harmonic number. The 3rd harmonic has an amplitude one ninth (3×3) of the fundamental, the 5th has an amplitude of 1/25th (5×5) and so on. Although triangle waves do contain harmonics, they are not very dominant and triangle waves sound somewhat sine wave like. Some synthesizers dispense with a sine wave in favour of a triangle waveform.

Sine wave Harmonics:
A pure sine wave produces just the fundamental frequency, with no (or as close to as possible) Harmonics.
Complex Wave: Usually referred to as Noise, this is an almost random variation in audio voltage with no fixed frequency content. Useful for creating percussion sounds, and adding breath sounds when synthesising flutes or similar instruments.

We don’t need to get into the technicalities of how the shapes are created, just how to use, and control them.

Basic VCO module

The Pitch plug: This controls the frequency or “Pitch” of the oscillator, the default voltage to frequency response is 1 octave per volt, the same as an analogue synthesizer.
We connect this to a Detuner Module so that the frequency can be set by octave, semitone, and fine tuned as an offset against any other oscillators if required.
The pitch of SynthEdit’s Oscillator modules are calibrated in Volts per Octave.
This means that signal of 5 Volts on the pitch plug sets the oscillator frequency to 440 Hertz or Middle A, (the note in the centre of a piano keyboard). Increasing the input by 1 Volt will cause the pitch to rise one octave- so the oscillator frequency doubles to 880 Hz .

How pitch is related to voltage

Simplified: volts=1.442695041* Log(0.07272727273Hz)
To convert Volts to Frequency; Frequency = 440*2^(Volts-5)

To convert MIDI note number to Volts;
There are 128 midi notes. There are 12 semitones on an Octave.  5.0 Volts is middle-A (MIDI note 69) 
Volts = 5.0+(MIDI note number-69)/12


The Pulse Width Plug: This controls the on and off times of the Pulse wave form- (see the diagram below) which in turn controls the sound of the tone due to the change in the number of harmonics in the waveform. Note: This control only varies the output when the pulse waveform is selected.

Effect of varying the pulse width

The waveform plug: Connects to a drop down list or similar selector control, so you can select the required waveform.
Sync: This plug allows you to synchronize the oscillator against another oscillator, which can produce some interesting (and outright ugly in some cases) harmonic changes dependent on the frequencies of the two Oscillators.
Phase Mod plug: allows you to phase shift the oscillator waveform by applying a voltage within the range of -5 Volts to +5Volts. By connecting this to the audio output of another Oscillator this allows you to create FM type effects from the two Oscillators.
PM Depth plug: This allows you to control the amount of the signal applied to The Phase Modulation plug that affects the Oscillator.

Smooth Peaks, or The Gibbs Effect.
In the oscillator’s Properties window you will see an advanced
option called Smooth Peaks (Gibbs Effect). Now compare the two oscillators’
waveform in a scope, and you will discover they are different. The top display is with Smooth Peaks turned off.
We can see a sharp peak with a ripple effect preceding the peak.
If we enable Smooth Peaks then the waveform will more closely resemble a saw wave. Disable smooth peaks, and a big ripple and spike appear at the edge.

Gibbs effect or Peak Smoothing


Why is this? Without going into very complex maths and programming,
the waveform is band-limited, meaning that its frequencies
range no further than from 0 Hz to half the sampling rate.
The Fourier series tells us summing an infinite number of sine waves
creates a band-limited saw wave. Summing a limited number of sine
waves creates what programmers and mathematicians call the Gibbs effect; we call it ripples at the edges.
The same happens to other waveforms with sharp
edges—ramp and pulse come to mind. So, this rippling waveform is a
fixture in the digital domain. Smooth Peaks curtails the effect, but also
noticeably diminishes high frequency content above 4 kHz.

Sync X-Fade (Anti Alias):-
Reduces Aliasing noise when Syncing Oscillators at Audio rates. This can be disabled to provide precise note-on phase sync (useful for phase modulation patches) at the expense of introducing aliasing artefacts into the audio output.

Oscillator Sync:

When we Synchronise two oscillators in Synthedit, we ensure that the both start in phase (at the 0 volts part of the cycle) here we have two oscillators which are running at different frequencies, but are Synchronised.

Oscillator synchronized

With the Sync connection removed they are no longer starting at the 0 volts/0 degrees point as they did when synchronised.

Oscillators unsynchronized

When the first oscillator in the chain is higher in pitch than the following oscillator, this sync trick causes it to sound as if the following oscillator is tracking the leading oscillator’s pitch: any changes to the leading oscillator’s pitch will also cause a change in the following oscillator’s pitch. This works because you’re forcing the follower to reset in sync with the natural resets on the leading oscillator, locking them to the same frequency.
This crude form of pitch tracking can be used in a pinch to cause multiple oscillators to track together—but it’s a bit crude and has a noticeable side effect. The higher the frequency of the first oscillator, the more truncated the following oscillator’s shape will become—ultimately changing both its timbre and its amplitude. As such, this method of oscillator synchronization isn’t typically used for pitch tracking—after all, in most situations, you could just use the same keyboard, sequencer, or pitch control voltage to control both oscillators simultaneously anyway. So … what does this form of oscillator sync achieve?
Well it does produce some harmonically richer sounds by syncing even a simple sine wave, and once we get to a sawtooth the harmonics can become really wild especially when the first oscillator is lower in frequency than the second.

Oscillator 1 has a lower frequency than Oscillator 2

Oscillator 1 has a higher frequency than Oscillator 2 (Note that as Oscillator 1 rises in frequency the amplitude of Oscillator 2 will decrease)


Oscillator sync becomes very interesting once you start affecting the follower’s frequency independently from the leader. By modulating the follower’s frequency (with LFOs, envelopes, random voltages, etc.), you can achieve a crazy range of sounds some usable others- well a noise. Many of these sounds can be heard in synth lines from the 1980s (Cars, Keith Emerson to name but a few).
This is something that it’s better to try out for yourself than to hear and see the results than for me to attempt to describe