Adding sine waves: additive synthesis and the tonewheel organ
A synthesiser makes musical sounds from scratch, with electronics or arithmetic instead of strings, reeds or pipes. There are several ways to do it, and the history of synthesisers is roughly a history of each method running into its limits and the next one getting round them. This page is the first in a series, and starts with the most direct method of all: if every sound is a sum of sine waves, then build sounds by adding sine waves together. That’s additive synthesis.
Its most famous instrument wasn’t digital at all. The tonewheel organ, from 1935, makes its sine waves with spinning metal wheels, and mixes them with sliders called drawbars. Most of this page is about that organ: how it works, and why its sound has something that “perfect” sine waves don’t.
It leans on:
- The Fourier transform, for the idea that any repeating wave is a sum of sine waves.
- Exploring harmonics, which builds a square wave from its harmonics.
- Radar and sonar, for the Doppler shift, which comes back in section 7.
Playing the figures
Section titled “Playing the figures”Most figures on this page have a keyboard. Click or touch its keys, or use the computer’s keys: A is C, W is C♯, S is D, and so on along the row up to ’, with the row above for the black keys, as on a piano. Z and X move the computer keys down and up an octave.
To use a MIDI keyboard, plug it in and press Use a MIDI keyboard on any figure (Chrome, Edge and Firefox can do this; Safari can’t). The computer keys and MIDI play whichever figure you last touched, and the keyboard that’s listening has a faint outline.
If your controller has knobs or sliders, press Link knobs, click one of the figure’s sliders (a drawbar, say), and turn a knob: they’re linked. Repeat for as many as you like, then press Done. Controllers differ in which messages their knobs send, so linking them by hand works with any of them; the links are remembered for each page, in your browser. Everything is made in your browser: nothing is recorded or sent anywhere.
A few terms first:
- A note’s pitch is how high or low it sounds; physically, it’s how many times a second the wave repeats, its frequency, in hertz (Hz).
- Timbre (said “tam-ber”) is everything else that makes a note sound like itself: why a flute and a violin playing the same note sound different.
- A partial is one of the sine waves a sound is made of. When the partials are at whole-number multiples of the note’s frequency, they’re harmonics.
1 · A note is a set of sine waves
Section titled “1 · A note is a set of sine waves”A single sine wave is the plainest sound there is: a pure, soft hum, like a tuning fork or a whistle. Real instruments make many sine waves at once. A note at 110 Hz, played on almost any instrument, contains sine waves at 110 Hz, 220 Hz, 330 Hz, 440 Hz and so on: the 1st, 2nd, 3rd and 4th harmonics, all at whole-number multiples of the first one, the fundamental. Because they’re whole-number multiples, they all line up again at the end of every cycle of the fundamental, and the wave repeats. That’s why the ear hears one note with one pitch, rather than a cluster of separate tones.
The amount of each harmonic is what changes the timbre. Here are three classic recipes. Turn the number of harmonics up a step at a time, and listen to the sound get brighter as the shape takes form.
Top: the wave, two cycles of it, built from harmonics 1 up to the number on the slider (blue), with the newest harmonic on its own (grey). Bottom: how much of each harmonic there is. Play the keyboard to hear it; the sound changes as you move the slider.
Every harmonic at 1/n of the first (1, ½, ⅓, ¼, …) builds a sawtooth: bright and buzzy, like a brass or bowed string sound. Odd harmonics only, at 1/n, build a square wave: hollow, a bit like a clarinet. Odd harmonics at 1/n², which die away much faster, build a triangle wave: soft and flute-like. The ripples near the square’s corners are the Gibbs ripple, from Exploring harmonics.
So in principle, additive synthesis can make any steady sound: find its recipe of harmonics, and add up that many sine waves.
Why the harmonics fuse
Section titled “Why the harmonics fuse”Try this in the figure above: hold a note, and move the slider while it plays. Each harmonic you add or take away is easy to hear, as a separate, higher tone arriving or leaving. Now let go and play the note again. The tone you just heard has vanished into the note’s timbre. The sound is the same; what’s changed is how your hearing has sorted it.
The ear receives one jumble of frequencies, from every sound around you at once, and the brain has to work out which of them belong together. This is called auditory scene analysis, and it works by rules of thumb about how real sounds behave:
- Common onset: partials that start at the same moment almost certainly came from the same thing (one string plucked, one pipe blown), so they’re fused into one sound, heard as its timbre.
- Common fate: partials that change together (getting louder, fading, wobbling in pitch) belong together. One that appears, disappears or changes on its own suggests a second source, and is heard as one.
- Harmonicity: partials at whole-number multiples of one fundamental are grouped. A harmonic that’s noticeably out of tune with the rest stops fitting, and stands out.
So moving the slider mid-note breaks the first two rules: one harmonic starts on its own. The figure below breaks each rule on purpose. In listening experiments, a harmonic that starts a few tens of milliseconds before or after the rest already counts for less in the note’s timbre, and one mistuned by a few percent starts to be heard as a tone of its own; the figure lets you find your own thresholds.
A3 (220 Hz) made from its first 10 harmonics, each at 1/n, drawn over time like a piano roll (thicker is louder). One harmonic (orange) can start late, be mistuned, or both. Play the note, then that harmonic alone, then the note again: hearing a harmonic on its own first makes it much easier to pick out afterwards, as Helmholtz noticed in the 1860s.
Things to listen for: with no delay and no mistuning, can you hear the harmonic at all? Start it 300 ms late: does it arrive as a new tone, and does it stay separate or melt into the note after a while? Then set the delay back to 0 and move the mistuning up from 0 to 8% (133 cents): where does it start to stand out?
Everyone’s hearing does this, and synthesiser designers rely on it: additive synthesis only works if the partials of a note move together, or the note falls apart into separate tones. The same rules explain why a singer’s vibrato helps them stand out from an orchestra: all of the voice’s partials wobble together, and differently from everyone else’s.
Before going further, though, there’s a snag in how a keyboard is tuned.
2 · Harmonics against the keys
Section titled “2 · Harmonics against the keys”A piano keyboard divides each octave (a doubling of frequency) into 12 equal steps, the semitones. Each key’s frequency is the one below it times , about 1.0595. That’s equal temperament: every key is equally in tune with every other, so music can move to any key. A4 is set at 440 Hz, and every other key follows:
where n is the key’s number, counting as MIDI does: middle C (C4) is 60, A4 is 69.
The harmonics of a note don’t follow that ladder. The 2nd harmonic is exactly an octave up, which is a key. But the 3rd harmonic is 3 times the frequency, and (the key 19 semitones up) is 2.9966, not 3. Musicians measure small differences like this in cents: hundredths of a semitone, so 1200 to the octave.
How far each of the first 16 harmonics of C3 (130.81 Hz) lands from the nearest key, in cents. The note names under the axis are those keys. Pick a harmonic, then play the root (C3, with its own harmonics), the harmonic on its own, the key nearest it, and pairs of them.
The octaves (harmonics 1, 2, 4, 8 and 16) land exactly on keys. The 3rd harmonic is 2.0 cents above G4, the 5th 13.7 cents below E5, and the 7th 31.2 cents below A♯5. The 11th and 13th are nearly half a semitone off (−48.7 and +40.5 cents), between keys.
A few cents is hard to hear by comparing two notes one after the other, especially without musical training. Played together, it’s much easier, because of beats: two tones close in frequency drift in and out of step, and the sound swells and fades at the difference between them. The 5th harmonic and E5 beat 5.19 times a second; the 7th and A♯5, 16.64 times; the 3rd and G4, only 0.44 times.
The musically important pair is root + key. The root already contains the harmonic, so the key beats against the root’s own 5th harmonic, at the same 5.19 times a second: that’s the slow shimmer of an equal-tempered major third. Root + harmonic lands exactly on the root’s harmonic, in step with it, so it adds no new tone at all: it only turns that harmonic up by 6 dB. With the 5th, the whole note gets 0.32 dB louder (0.83 dB with the 3rd), and it can be hard to tell from the root alone. That’s fusion again: there’s nothing new for your hearing to pick out. Tick root as a pure sine and play both again. Root + harmonic becomes two separate tones, an interval rather than a brighter note, so it’s much easier to hear; and in root + key, with no 5th harmonic in the root, there’s nothing for the key to beat against.
So the keyboard’s notes and the harmonic series disagree, a little for the 3rd harmonic and a lot for the 5th and 7th. That matters for the next instrument, because it makes its harmonics from the keyboard’s notes.
3 · Making sine waves with wheels
Section titled “3 · Making sine waves with wheels”Making one clean sine wave electronically was hard in the early 20th century, and making dozens, all in tune, was harder. The answer was mechanical. Thaddeus Cahill’s Telharmonium, around 1906, made its tones with huge spinning dynamos and sent music down telephone lines; it weighed around 200 tonnes. Laurens Hammond’s organ of 1935 shrank the same idea to fit in a living room, and its sound became one of the best-known in music.
Each sine wave comes from a tonewheel: a steel disc a few centimetres across, whose edge rises and falls in smooth bumps. It spins next to a pickup, a magnet wrapped in a coil of wire. Each bump that passes changes the magnetic field through the coil, which makes a small voltage, and one smooth bump makes one smooth cycle of a wave. So the frequency is simply
A tonewheel turning past its pickup (drawn much slower than real: the figure says by how much), and the voltage the pickup makes: one wave per bump. Change the number of bumps, or the gear driving the wheel, and Listen to the tone at the real speed.
With A’s gear the wheel turns 27.5 times a second, so 16 bumps make exactly 440 Hz, A4. Every doubling of the bumps is an octave up: 32 bumps make 880 Hz, A5.
One motor drives all the wheels, through a long shaft and gears. The motor is a synchronous motor: it turns in step with the mains electricity, so the organ’s pitch is as steady as the power station’s frequency. It turns the shaft 20 times a second. (Organs for countries with 50 Hz mains, such as Australia and Britain, were geared so the shaft still turns 20 times a second, and they play at the same pitch.)
There are 12 gear pairs, one for each note of the octave, and each one turns its wheels at a ratio of whole numbers of teeth. Wheels for the same note in different octaves sit on the same gear and have 2, 4, 8, 16, 32, 64 or 128 bumps. The top seven of the organ’s 91 wheels have 192 bumps and share the shafts of F to B. Since gear teeth must be whole numbers, the ratios can only come close to equal temperament:
How far each gear makes its wheels from equal temperament, in cents (blue bars), with each gear’s ratio of teeth under its note. The top seven wheels (orange dots, at the notes they play: C to F♯) use 192 bumps on the F to B gears.
A’s gear, 88/64, is exact: 20 × 88/64 × 16 = 440 Hz. The furthest gear, G♯, is 0.71 cents flat; the top seven wheels are all within 1.98 cents. These errors are far too small to hear on their own.
So the wheels give a nearly perfect equal-tempered keyboard, 91 sine waves, from C1 (32.7 Hz) to F♯8 (about 5.9 kHz), all spinning all the time while the organ is on.
4 · Drawbars: mixing the wheels
Section titled “4 · Drawbars: mixing the wheels”Each key doesn’t have its own wheels. Instead, it borrows the wheels of other keys. Pressing a key closes nine small switches, and each one connects a wheel to one of nine drawbars: sliders that set how loud that wheel is, from 0 (pushed in, off) to 8 (pulled all the way out). Each step is about 3 dB.
The drawbars are named after pipe-organ stops, by the length of pipe that would sound them: an 8-foot (8′) pipe plays the key’s own note, a 4′ pipe an octave higher, a 16′ pipe an octave lower. So:
| Drawbar | 16′ | 5⅓′ | 8′ | 4′ | 2⅔′ | 2′ | 1⅗′ | 1⅓′ | 1′ |
|---|---|---|---|---|---|---|---|---|---|
| Harmonic of 8′ | ½ | 1½ | 1 | 2 | 3 | 4 | 5 | 6 | 8 |
| Wheel (semitones above the key) | −12 | +7 | 0 | +12 | +19 | +24 | +28 | +31 | +36 |
The 16′ and 5⅓′ are the 1st and 3rd harmonics of the note an octave below, so the “note” can sound deeper. There’s no drawbar for the 7th harmonic, which is 31 cents from any key (section 2): it would sound out of tune. The 1⅗′‘s 13 cents is under 1%, close enough that it mostly fuses with the rest (Why the harmonics fuse), though, as section 5 shows, it doesn’t go unnoticed.
Organists write a mix of drawbars as nine digits: 888000000 is the first three fully out and the rest in.
The drawbars, and the wheels they bring in. Play a note: the figure draws the last key you played (A3 until you do). Top: 20 ms of its wave. Bottom: each wheel’s frequency, in harmonics of the note, with its drawbar’s name and how far it is from the perfect harmonic it stands in for (dashed lines), in cents (¢). Move a drawbar while you hold a note: it changes as it sounds, as on the real organ.
On A3, the 2⅔′ wheel (E5) is 2.1 cents below the perfect 3rd harmonic, and the 1⅗′ (C♯6) is 13.0 cents, 8.29 Hz, above the 5th. That’s section 2’s mismatch, built in: the drawbars take their harmonics from equal-tempered wheels.
Above the top wheel there’s nothing to borrow, so near the top of the keyboard the highest drawbars fold back an octave: they take the wheel an octave lower instead. The figure’s organ does the same.
5 · Why “slightly wrong” sounds right
Section titled “5 · Why “slightly wrong” sounds right”So the organ’s harmonics are a little out: a few cents for most drawbars, and 13 cents for the 1⅗′. A perfect version is easy to imagine, and easy to build digitally: give each key its own sine waves at exactly 2, 3, 5 and so on times its frequency. It sounds worse. The figure shows why, and lets you hear both.
There are two effects, one in a single note and one in a chord.
In one note, the tonewheel harmonics aren’t exact multiples of the fundamental, so they don’t line up again at the end of each cycle. The wave’s shape keeps slowly changing: it never quite repeats. With perfect harmonics it repeats exactly, forever, which the ear hears as static and lifeless. Acoustic instruments are never that exact, and neither is the organ.
In a chord, something different happens. Play C, E and G together. With perfect harmonics, C’s 3rd harmonic (784.88 Hz) and G’s 2nd (783.99 Hz) are two separate sine waves 0.89 Hz apart, and they beat, like the pairs in section 2. With tonewheels, both keys borrow the same wheel, the G5 wheel, so there’s only one sine wave, and nothing to beat against. The organ’s chords sound solid in a way no group of separate instruments can.
Top: two cycles of one note (A3) at three moments, 0, ¼ and ½ a second apart, played with the chosen harmonics. Bottom: in a C major chord (C4, E4, G4), the partials two keys share: with tonewheels each is one wheel, steady (blue); with perfect harmonics each is a pair of sine waves that beat (orange). Play either chord with the buttons, or play the keyboard in either mode.
With every drawbar out (888888888), the tonewheel A3’s wave has changed by 81% a quarter of a second later; with perfect harmonics, by 0%. In the chord, perfect harmonics make four beating pairs, at 0.44, 0.89, 10.38 and 1.77 Hz, and the slowest swell all the way to silence and back, since the two partials are equally strong. With tonewheels there are none. With 888000000, the wave changes by 36%, and the chord has one beating pair (C’s 5⅓′ against G’s 8′, at 0.44 Hz).
So the organ’s “wrongness” does two useful things at once: it keeps each note moving, and it locks chords together. A perfect additive synth gets neither for free. It’s a lesson that comes back throughout the history of synthesisers: exactness is easy for a computer, and it usually sounds dull.
6 · Click, percussion and leakage
Section titled “6 · Click, percussion and leakage”Three more things make the organ sound like itself, and all three began as side effects.
- Key click. A key’s nine switches are springy metal contacts, and they don’t all close at the same instant, and each one bounces. Each wheel is switched in wherever its wave happens to be, so a note starts with a short, sharp click. Hammond’s engineers saw it as a fault; players came to love it, especially for fast, percussive playing.
- Percussion. Added in the mid-1950s: an extra 2nd or 3rd harmonic that sounds only at the start of a note and fades away, like a struck bell. It is single-trigger: it sounds only on a note played after all the keys were up, so a smooth (legato) line gets it only on its first note. Turning it on also makes the rest of the sound 3 dB quieter, unless it’s set to soft.
- Leakage. With 91 wheels spinning beside one another, every pickup hears a faint trace of its neighbours, and the wiring adds more. Every note carries a quiet haze of other wheels.
One note (A3) with the chosen registration. Top: its first 20 ms. Middle: its loudness over the first 1.2 s. Bottom: the spectrum of the held note (from 0.4 s on), in dB. Play the keyboard to hear each setting.
With key click on, the nine contacts close at their own moments within the first 3 ms, and each bounces, so the wave starts in ragged steps; with it off, the note fades in smoothly over 10 ms. In this model, the percussion starts twice as loud as a full drawbar (as loud as one, when soft), and fades with a time constant of 0.2 s (“fast”) or 1 s (“slow”): it loses 8.7 dB in each time constant. With leakage on, the other wheels appear across the spectrum 50 to 65 dB below a full drawbar (this model’s level).
The real organ had one more effect built in, a scanner vibrato and chorus: a spinning switch that sweeps the sound along a chain of delays, wobbling its pitch. This page leaves it out: section 7’s rotating speaker does a similar job, more famously.
7 · The rotating speaker
Section titled “7 · The rotating speaker”The organ’s other half is often a separate cabinet, Don Leslie’s rotating speaker, from the 1940s. Inside, a horn spins for the treble, and a drum with an opening spins under the bass speaker. A crossover filter splits the sound between them, at about 800 Hz in this model.
The spinning does two things to what you hear. As the horn’s mouth swings towards you, the sound’s path gets shorter while you listen, and its pitch rises; as it swings away, the pitch falls. That’s the Doppler shift, the same effect a radar uses to measure speed (Radar and sonar). And the horn is louder when it points at you. Together they make a swirling, shimmering sound. Players switch between two speeds: slow (“chorale”) and fast (“tremolo”), and the change takes a moment, because the horn and drum have weight to speed up or slow down.
The square: the horn, seen from above, with the listener below. The curves: what the listener hears from a steady 1 kHz tone over the last two seconds: its pitch, in cents, and its loudness. Change the speed and watch it ease to the new one. The keyboard plays the whole organ (drawbars, click) through the rotating speaker, in stereo, with two microphones a quarter of a turn apart.
In this model, the horn’s mouth goes round a circle 15 cm in radius, so its path to you changes by 0.87 ms each turn. At the fast speed, 6.7 turns a second, the mouth moves at 6.3 m/s, and the pitch swings ±31.6 cents, a third of a semitone. At the slow speed (0.83 turns a second), it swings ±3.9 cents.
The drum turns slower and takes longer to change speed (about 4 seconds, against the horn’s 0.8 in this model), so when the speed changes, bass and treble drift apart for a moment. Players use that.
8 · Where adding sine waves runs out
Section titled “8 · Where adding sine waves runs out”The organ works so well because it doesn’t try to imitate anything: its notes start, stay steady while the key is down, and stop. Real instruments are harder. Pluck a string, and its harmonics don’t just fade: each fades at its own rate, the high ones first, so the note gets duller as it dies away. The shape of the wave changes as well as its size.
A plucked note made by adding 24 harmonics. Top: the level of each harmonic over 3 s, in dB: the 1st, 2nd and 3rd in colour, then the rest up to the 10th in grey. Bottom: the wave just after the pluck, and 1 s later (scaled up to the same height, to compare shapes). Switch between each harmonic fading at its own rate and all of them fading together, and play the keyboard to hear the difference.
When each harmonic fades at its own rate, the high ones are gone first, and a second later the wave is smoother: the note has mellowed, as a real string does. When all of them fade together, the wave only gets smaller, and the note sounds like the organ with its volume turned down. Even this simple note needs 48 numbers: a starting level and a fade rate for each of 24 harmonics.
That’s the trouble with additive synthesis. A realistic sound needs dozens of partials, each with its own envelope (how its level changes over time), and often its own small drift in pitch, plus noises that aren’t partials at all, such as a bow’s scrape or the breath in a flute. Digital additive synthesisers of the late 1970s and 1980s could do all that, and could even analyse a recording and rebuild it from sine waves. But they were expensive, and setting hundreds of numbers by hand made them notoriously hard to program.
The next method turned the problem round. Instead of building a bright sound up from sine waves, start with one that’s already full of harmonics (a sawtooth, say) and carve away the ones you don’t want with a filter. That’s subtractive synthesis, the sound of the classic analogue synthesisers, and the next page.
Summary
Section titled “Summary”- A steady note is a sum of sine waves at whole-number multiples of its frequency: its harmonics. How much of each there is sets its timbre: 1/n of every harmonic makes a sawtooth, odd ones only a square wave.
- An equal-tempered keyboard divides the octave into 12 equal steps. Only the octave harmonics land on keys: the 3rd is 2.0 cents off, the 5th 13.7 cents, the 7th 31.2 cents.
- The tonewheel organ makes 91 sine waves with spinning wheels and pickups (frequency = turns a second × bumps), driven by one synchronous motor through 12 gears. The gears come within 0.71 cents of equal temperament.
- Drawbars mix nine wheels for each key, standing in for harmonics ½ to 8. Because they borrow other keys’ equal-tempered wheels, they’re slightly off: the 1⅗′ is 13 cents sharp of the 5th harmonic.
- That “wrongness” helps: a note’s wave never quite repeats, and a chord’s keys share wheels, so they lock together instead of beating. Perfect harmonics give a static note and beating chords.
- Key click, percussion and leakage began as side effects and became part of the sound.
- The rotating speaker adds Doppler pitch swings (±31.6 cents at the fast speed, in this model) and changes in loudness.
- Real instruments’ harmonics each change in their own way over time, which takes a great many numbers to describe with sine waves. Hence the next page: subtractive synthesis.
Further reading
Section titled “Further reading”- Laurens Hammond, US patent 1,956,350, “Electrical musical instrument” (1934): the tonewheel organ itself, with its wheels and gearing.
- Jussi Pekonen, Tapani Pihlajamäki and Vesa Välimäki, “Computationally efficient Hammond organ synthesis”, Proceedings of the 14th International Conference on Digital Audio Effects (DAFx-11), 2011: the wheels’ frequencies, the drawbars, key click, percussion and leakage, as a digital model.
- Julius O. Smith, Stefania Serafin, Jonathan Abel and David Berners, “Doppler simulation and the Leslie”, Proceedings of the 5th International Conference on Digital Audio Effects (DAFx-02), 2002: modelling the rotating speaker.
- Albert S. Bregman, Auditory Scene Analysis: The Perceptual Organization of Sound (MIT Press, 1990): how hearing sorts frequencies into sounds, including onsets, common fate and harmonicity.
- C. J. Darwin, “Perceiving vowels in the presence of another sound: constraints on formant perception”, Journal of the Acoustical Society of America 76, 1984: a harmonic that starts early counts for less in a vowel.
- Brian C. J. Moore, Brian R. Glasberg and Robert W. Peters, “Thresholds for hearing mistuned partials as separate tones in harmonic complexes”, Journal of the Acoustical Society of America 80, 1986.
- Curtis Roads, The Computer Music Tutorial (MIT Press, 1996; 2nd edition 2023): the standard guide to every kind of synthesis, including additive synthesis and analysis–resynthesis.
- Mark Vail, The Hammond Organ: Beauty in the B (Backbeat Books, 2nd edition, 2002): the organ’s history, and how players use it.