**The basic physics of music could help you in music theory, sound design, and using Operator. Why do some notes sound good together and some not?**

**Notes sound good together when the ratios of their frequencies are simple ones. This is explained in detail below. **

Don't be put off by the word physics, this article assumes no prior knowledge of the subject, and hopefully will make learning music easier. Instead of trying to memorise a whole load of music theory, it's easier to start with understanding the basics of the actual science behind music. This should also be interesting for Operator users because the way Operator works perfectly demonstrates the science behind music. First let's look at what sound actually is.

**Sound waves**

In physics, a wave is a disturbance or oscillation that travels through spacetime, accompanied by a transfer of energy. Think of a wave on the ocean rolling towards the beach, with a seagull sitting on top. The actual water doesn't really move towards the beach, it just goes up and down. The seagull bobs up and down but doesn't come any nearer. It's the *wave* that moves. It's the same with sound waves. The air pressure oscillates, and the sound wave travels through the air.

One complete up and down cycle = 1Hz

Actually, ocean waves are a bit more complex than that, and sound waves differ from the gif above. In sound waves the oscillation is on the horizontal plane and this kind of wave is called longitudinal. See these links for more - 1,2,3.

**Pitch**

The air pressure can be made to oscillate by a monitor cone. The cone in the speaker vibrates at a certain frequency and this causes oscillations in the air pressure at that frequency. Let's look at an example. Play the note C3 in Live in Operator using just one sine wave. If you don't have Operator use a sine wave sample in Simpler. Look at it in the free scope listed in the plugins page.

C3 = 261.3 cycles per second. The scope makes these visible to the eye.

The C3 frequency is approximately 262 Hz, actually 261.63 Hz, and is known as the "middle C". Wikipedia calls this frequency C4. Live uses a midi standard where the frequency of a pitch is one octave higher, so C3 in wiki and other charts will often be 130.81 Hz. Hz (Hertz) is the frequency of the oscillations of the sine wave in Operator, the monitor cone, and the air pressure. 1 Hz is 1 per second. The human ear can hear about 20-20,000 Hz (20 kHz). You hear the frequency as the pitch (approximately).

Modern western music is based on the tuning in which A4 (A3 in Live) is 440Hz. The frequency spectrum is divided into octaves, groups of 12 semitones, e.g. from C3 to C4 and so on. Look at Spectrum in pitch mode, you will see that **each time you go up an octave, the frequency doubles.** So C3 is 262, C4 is 523, and C5 is 1046 Hz. One thing I should add is that the way we perceive pitch is not always exactly the same as frequency, for instance if the fundamental (see below) is missing, the brain can imagine that it's still there.

**Harmonics and overtonesThe most pleasing sounds are those where frequencies are combined in such a way as to have simple ratios. This is how musical intervals are derived. **

C4 is double the frequency of C3, and this simple relationship is called a harmonic, C3 being the fundamental. C4 (or any frequency doubled) is called the second harmonic, or first overtone.

The third harmonic, three times the fundamental frequency (3f) is a fifth (perfect fifth, 7 semitones) above the second harmonic. 7 semitones is called a fifth because it includes the first 5 notes from the major and natural minor scales, see Basic music theory. So the third harmonic is G4, 784 Hz. Draw in the first 3 'partials' in Osc A in Operator and you'll see they produce frequencies at C3, C4 and G4.

The 4th harmonic (C5) is 4 times the fundamental frequency (4f), two octaves above the fundamental, and is also a perfect fourth above the 3rd harmonic. A perfect fourth is 5 semitones, and is called a fourth because it contains 4 notes from the major and minor scales.

Draw in the first 4 partials in Operator and you'll see these in Spectrum. Operator is producing sine waves at frequencies f, 2f (2 x f), 3f and 4f, i.e. C3, C4, G4 and C5. Each wave is called a partial, and together they make up a more complex sound.

The first 4 harmonics ('partials' in Operator) starting from C3. Triple the frequency of a note and you go up an octave plus 7 semitones, double it and you go up an octave.

**As well as simply multiplying a fundamental, music is made up of other ratios, their relationships to other notes.** G4 is 784 Hz and is 3 times C3 which is 262 Hz (calculations not always exact as the numbers are rounded). But 784 is also 523 (C4) x 3/2. This may seem obvious, but it's important to note. So a fifth, 7 semitones, is the ratio of 3/2 in terms of frequency. It is **the next simplest ratio** after 2/1 (octave), and so is a **strong harmonic**.

The 4th harmonic is C5 and is double the frequency of C4 and 4 times the frequency of C3. C5 is also a fourth above G4 and is G4 x 4/3. This is the next simplest ratio and this is why a fourth is called a perfect fourth, and the next strongest harmonic after the (also perfect) fifth.

The 5th harmonic at 5f (5 x 262) is E5, 1319 Hz, and is 4 semitones (a major third) above C5. A major third is calculated here by multiplying the frequency of C5 by 5/4, i.e. 1047 x 5/4 = 1308. So a major third is 5/4. This should be obvious by now, if not re-read the above 'til it is (think of it as dividing the frequency of C5 by 4 to get back to the fundamental C3 and then multiplying by 5 to get back to the 5th harmonic). These simple ratios are what make certain notes combinations sound good together. A major third is often used in electro, to combine two oscillators into one interesting sound.

These ratios are often expressed as 3:2, 5:4 etc.

So why is E5 designated 1319 and not 1308? This discrepancy is 13.69 cents, a cent being 1/100th of a semitone. This is the way western music is done, on a compromised scale called equal temperament (for more on this see below), which was created to solve various tuning problems. So if you zoom in you will see the 5th harmonic is a bit lower than E5 in fact.

So we have created C, G and E, and this is the basis of how the frequencies of all notes are calculated. If we take this E5 at 1318 Hz and multiply by 3/2 we get 1977 Hz, B5, a perfect fifth up. In our Operator however, the next partial is G5, which relates nicely to the C5, but then we get a flat A# (7f - 1829 Hz), before the C6, rather than a B. This out of tune note is a phenomenon known as the seventh harmonic, and musicians do various things to avoid it happening or to minimise it.

The first 4 harmonics ('partials' in Operator) starting from C3. Triple the frequency of a note and you go up an octave plus 7 semitones, double it and you go up an octave.

So to summarise, we have:

Harmonic | Note | Freq Hz | Details |

1 | C3 | 261.6 | fundamental (f) |

2 | C4 | 523.3 | octave, 2nd harmonic (2f), 1st overtone, C3 x 2/1 |

3 | G4 | 784.0 | 3rd harmonic (3f), a fifth above C4, C4 x 3/2 |

4 | C5 | 1046.5 | 4th harmonic (4f), a fourth above G4, G4 x 4/3 |

5 | E5 | 1318.5 | 5th harmonic (5f), major third above C5, C5 x 5/4 |

6 | G5 | 1568.0 | a fifth above C5 |

7 | A# but flat | the dodgy one to avoid | |

8 | C6 | 2093.0 | 8 x fundamental |

More on this later, but first let's look at Operator a bit more.

**FM synthesis**

Ok, lets go back into Operator and back to one partial, but then turn up the volume on Osc 2 using the same settings as Osc 1.

There are only two identical sine waves at work here, producing 14 visible harmonics.

This is two identical sine waves at C3, one modulating the other, and this is frequency modulation (FM) synthesis. Instantly we get the same series as above, C3, C4, G4, C5, E5, G5, the odd A#, and then C6, plus a few more. Turn the level of B Osc back down to -20 and you will just see the first 3 spikes as less modulation is applied.

**Saw and square waves**

By combining sine waves we can make other kinds of waves, saw waves and square waves. Operator has these built in but it's interesting to see how they can be constructed. For instance if you load the 1st, 3rd and 5th and 7th partials into Osc 1 and progressively drop their volumes, you get something evolving towards a square wave. Ignore the odd one that looks wrong, it's just a function of the freeze speed in the scope.

If we load up the first 5 partials and again progressively drop their levels, we get something close to a reverse saw wave. The maths gets a bit complicated.

Load up different saw and square waves in Operator and see how they are constructed and what they look like in the scope.

**12 tone equal temperament tuning - modern solution to an old problem **

As mentioned earlier, E5 is designated 1319 Hz, but should be 1308 Hz when calculated by multiplying the frequency of C5 (1047 Hz) by 5/4. This is because we use the equal temperament tuning which is a compromise. It was introduced to suit keyboards, fretted instruments, and to allow music that can change freely between different keys. A key is "the tonic note and chord, which gives a subjective sense of arrival and rest." **The problem with natural overtones (the Just Scale) is that the tuning is different for different scales, and the intervals between notes are not constant.** It's actually still sometimes used in orchestras and choirs, and this is one reason why orchestras have to retune in between pieces. For more modern instruments however, we have adapted the equal temperament tuning. However it's useful to understand the overtones series as this is how music is derived, with a slight tweak to create a continuous and even tuning.

1/1 | 16/15 | 9/8 | 6/5 | 5/4 | 4/3 | 45/32 | 3/2 | 8/5 | 5/3 | 9/5 | 15/8 | 2/1 |

C | C# | D | D# | E | F | F# | G | G# | A | A# | B | C |

The Just Scale, based on the naturally occurring overtone series.

The problem is complex, but a quick example. If you start from a note, and move up a fifth (7 semitones), and keep moving up by fifths, you will eventually get to the same note, 7
octaves higher, over 12 intervals. Only not quite. An octave's ratio is 2/1, and a fifth's is 3/2 as we saw earlier. 2^{7 }(2x2x2x2x2x2x2)^{ }is 128 and (3/2)^{12 }is 129.7. The maths is shown here and here.

Basically the difference between twelve just perfect fifths and seven octaves is about a quarter of a semitone. Nature was nearly perfect but not quite! The equal temperament tuning is used so that the ratio of each note to the next is the same.

It's worked out as follows. You want to start with 1, multiply it by a number x, then multiply that result by x, and do this 11 times and arrive at 2, so you have 12 numbers starting with 1 and ending in 2. This x is approx. 1.0595 and is the 12th root of 2, ^{12}√^{ }2. Multiplying each number by x takes you from 1 to 2 in 12 steps, and this is worked out for all notes, producing an exponential curve. It's called the 12 tone equal temperament tuning, although the 12 'tones' are of course semitones. If you imagine the vertical scale in Spectrum is frequency it would look something like this.

This scale works because pitch is perceived by the human ear exponentially (roughly). The equal tempered scale is closest to the just scale at certain points. A perfect fifth as we saw earlier is 3/2. ^{12}√^{ }2^{7 *}(the equal tempered method) is 1.498, or 0.1% different. The next best sounding ratio is a perfect fourth, 4/3 or 1.33333. Well ^{12}√^{ }2^{5} is 1.335, less that 0.4% different. The worst matching one is the minor third. Further reading.

^{*12}√^{ }2^{7 }means a number (which happens to be 1.0595) which when multiplied by itself 12 times in succession arrives at 2, and that number has been multiplied by itself just 7 of those times.

**Inharmonic sounds**

So, what about sounds that contain frequencies that are not harmonic? Well it depends how much. Musical instruments often do produce a bit of inharmonicity, and the musicians deal with that as best they can. At the other end of the spectrum we have instruments like cymbals which contain a whole range of inharmonicity and no discernible pitch. Just look at different sounds in Spectrum and the scope.

In Operator you can quickly try out inharmonicity. Load one up and then switch on Osc 2 to modulate Osc 1 as before. You get the first dozen harmonics, C3, C4, G4, C5, E5, G5, dodgy A#5, C6 etc. Double the coarse tuning of 2 and you get C3, G4, E5, dodgy A#, D6, a dodgy F#6, a dodgy G#6 and then a B6. We now have a few more dodgy frequencies. Some overtones are missing. The F# is the 11th harmonic (including the missing ones) and is even worse than the 7th. These are all shown here. Unsurprisingly it sound a bit harsh. But turn down the volume of Osct 2 and it sounds a lot better. Now turn up the fine tuning of Osc 2. It sounds harsh until you get to 500 and then the peaks line up with suitable frequencies again. Turn off Osc 2 and load noise into 1. You can see the frequencies are all over the place. This is the sort of sound typical in a cymbal, hat, clap or snare, and it looks pretty similar in the scope.

** **