The Colour of Music : Notes of Equal Temperament

# The Colour of Music : Notes of Equal Temperament

Equal temperament and just intonation are two of the methods used to divide an octave in western classical music. While just intonation is based on ratios of simple integers, the equal temperament system uses logarithmic intervals. In part II of this series, the Nerd Druid talks about equal temperament.

## Music, sound, and frequency

Music is basically a set of well-ordered nice sounds. Sound is pressure waves in a medium–air, water, metal, the Earth. Not all pressure waves cause sound that we humans can hear. Earthquakes give rise to sounds of very long wavelength, too low for us to hear. Bats give off high frequency sounds, too sharp for us to hear. Our hearing range is $20Hz – 20kHz$; that is, we can[1] detect those pressure waves that oscillate at a rate of $20$ to $20000$ cycles per second.

Some animals are far better than us at this game. Cats and dogs can hear upto $40 kHz$, while bats and dolphins can hear sounds as sharp as $160 kHz$.

#### Notes and tunes

Since sound is music, it too is based on frequencies. Play a certain frequency and you get the fundamental musical species, a note. Play a series of frequencies, a set of notes, and you get a tune. Whether or not that is a nice tune depends very much on the notes you have chosen. Notes that have certain well-defined frequency relations among each other tend to produce nicer tunes.

In most well-developed music systems, such as western classical or Hindustani and Carnatic classical, the notes are labelled for ease of manipulation. Given a set of labelled notes, the problem is to assign frequencies to them so that they sound nice. In Part I of this series, The Colour of Music : Understanding Just Intonation, we discussed just intonation, a method of doing exactly this.

### Just intonation : A quick recap

In just intonation, the frequencies you assign to various notes are in simple numeric ratios to the first note, the unison. Consider the standard western C-major scale, comprising notes

$$C-D-E-F-G-A-B-C^{\ast} \tag{1}$$

where $C$ (frequency $f$, say) is the unison and $C^{\ast}$ is an octave above it, with frequency $2f$. $G$ is a perfect fifth above $C$, and has a frequency of $\frac{3}{2} f$. $E$ is a major third above $C$, and has a frequency of $\frac{5}{4} f$. Using these three ratios $\displaystyle {}^2\!/\!_1, {}^3\!/\!_2, {}^5\!/\!_4$ you can generate every other note in the C-major scale in five-limit tuning. I like to call these three ratios the three generators of the just intonation series. You can either ascend by multiplying by the ratio, or descend by dividing with it, which is the same as multiplying with the inverse ratio. Thus, for instance, if you wish to go to $D$ from $C$, you need to ascend by two fifths and descend by an octave ($\uparrow$ fifth $\uparrow$ fifth $\downarrow$ octave), meaning you’d have to multiply by ${}^3\!/\!_2 \times {}^3\!/\!_2 \times {}^1\!/\!_2$.

The table below is a slightly modified form of the one from the previous article, and will hopefully explains what’s going on.

Note Up/Down Frequency
$C$ (unison) = $f$
$D$ (major second) $\uparrow$ fifth $\uparrow$ fifth $\downarrow$ octave $\frac{9}{8}f$
$E$ (major third) $\uparrow$ third $\frac{5}{4}f$
$F$ (perfect fourth) $\uparrow$ octave $\downarrow$ fifth $\frac{4}{3}f$
$G$ (perfect fifth) $\uparrow$ fifth $\frac{3}{2}f$
$A$ (major sixth) $\uparrow$ octave $\uparrow$ third $\downarrow$ fifth $\frac{5}{3}f$
$B$ (major seventh) $\uparrow$ fifth $\uparrow$ third $\frac{15}{8}f$
$C^{\ast}$ (octave) $\uparrow$ octave $2 f$

For further explanation, read Part I.

#### Pure intervals

Intervals that involve the ratios of simple integers are called pure or just intervals, since they correspond to sounds created by vibrations in physical objects.

Just intonation is a good way to assign frequencies, and since the intervals are pure, the sound produced by justly tuned scales tend to be quite pleasing to the ear. However, the ratios in the rightmost column are given with respect to the unison, and thus, if we want to move from a non-unison note to another such note, we’d be in a bit of a pickle.

How much of a pickle? Here’s a problem for you, see if you can solve it. I am at $A$, major sixth, ${}^5\!/\!_3 f$. I want to go to $D$, major second, ${}^9\!/\!_8 f$. What is the simplest way to get there using the three generators? Answer in the footnote[2]. Don’t peek till you’ve tried it yourself.

As you’ll find, simply going from $A$ to $D$ in just intonation involves quite a ride! Enough of it, then. Time for equal temperament.

## Equal Temperament

Unlike just intonation, which has three generators, equal temperament has a single generator, and is thus mathematically simpler.

Well, sort of.

#### Black keys

So far I have discussed breaking up the octave into seven portions, seven notes in the C-major scale with frequencies assigned so that they sound nice. This corresponds to the seven white keys in a piano, as seen in the image above. Clearly, though, there is something incomplete about this picture. Where are the black keys? What frequencies do they represent? What are they called? Which scales include them?

Take a look at the table above. In the first column, I’ve written down the symbols designating each note. The names of the notes are in brackets. The adjective major appears quite a lot. In the C-major scale, where $C$ is the tonic or the root note, the white keys of the piano correspond to these major notes. The black keys sit in between the white keys, suggesting that their frequencies should be in-between those of the white keys.

#### Sharps $\sharp$ and flats $\flat$

Counting from $C$ on the left, you have 7 white keys, corresponding to $D-E-F-G-A-B$, and 5 black keys in between them, making up a total of 12 notes in an octave. The black notes are

$$C♯ – D♯ – F♯ – G♯ – A♯ \tag{2a}$$

where the note $C♯$ is pronounced C-sharp and corresponds to a frequency slightly higher than $C$. However, as you’ve no doubt noticed, the same note might well have been slightly lower than D, slightly flatter, if you will, and can thus be called $D♭$, D-flat. Thus the series might as well be called

$$D♭ – E♭ – G♭ – A♭ – B♭ \tag{2b}$$

or, if you are fastidious and have no eye for aesthetics, like this horribleness

$$C\sharp/D\flat – D\sharp/E\flat – F\sharp/G\flat – G\sharp/A\flat – A\sharp/B\flat \tag{2c}$$

The notes that can be both a $\sharp$ and a $\flat$ are called enharmonic equivalents.

Appending a $♯$ (sharp) to a note elevates the pitch (increases the frequency), while appending a $♭$ lowers the pitch (decreases the frequency).

But by how much?

Well, by a semitone.

### Semitone

A semitone (s) is the unit interval, the smallest frequency increment. In a piano, the interval between successive keys is a semitone. For instance, the interval between the white $C$ key and the black $C♯/D♭$ key, or that between the black $F\sharp/G\flat$ and the white $G$ key, are both semitones. Thus, if you want to get to the fifth, $G$, from the root, $C$, you would have to cross 7 semitones. Similarly, to get to the third, $E$, you’d need to cross 4 semitones.

This massively simplifies our five-limit tuning table. Instead of dealing with three generators and going up and down, as you found out earlier, going from $A$ to $D$ in equal temperament simply involves knowing how many semitones separate the two notes. You don’t even need to involve the unison, you can simply count off 7 semitones to the left of $A$ and reach $D$. Voila!

### Chopping up the octave

Time to get mathematical. Equal temperament tuning is based on logarithms, with the semitone as the unit. Clearly, if an octave has 12 semitone intervals, then we need to divide the range $f$ to $2f$ into twelve portions. A simple arithmetic method is to chop the interval $f$ up equally and assign $s = {}^f\!/\!_{12}$. If $f = 100 Hz$, then $s = 8.333…Hz$, and you are liable to be beaten up by people around you if use those notes.

Ok, not as simple as that, then. Remember that assigning frequencies to notes depends on whether those notes sound nice, not whether they are mathematically nice. Of course, in the case of just tuning, the ratios are mathematically nice. Clearly, we should attempt a method where the notes sound somewhat close to those in just intonation, but are also mathematically nicer.

#### The perfect(?) fifth

A good reference is the fifth, $G$. It is seven semitones away from the root, and its frequency ratio is $3:2$ with respect to unison. Therefore, while $G$‘s frequency is halfway between unison and the octave, $1.5 f$, there are 7 semitones on one side and 5 on the other. Clearly, then, we need a division method which gives smaller intervals early on and larger ones later on. Logarithms fit the bill perfectly.

#### Back to the semitone

I did get to logarithms in a roundabout way. Another simpler way to invoke logarithms is to realise that frequencies of the notes multiply , not add. Also, in equal temperament tuning, all semitones are equal. This immediately suggests that the best method of chopping up an octave into 12 intervals is to use, as the unit, a semitone interval of

$$s = \sqrt[ 12 ]{ 2 } = 2^{{}^1\!/\!_{12}} \tag{3}$$

Therefore, any note that is, say, seven notes away from another note, has a frequency that is higher by a factor of $7s = \sqrt[ 12 ]{ 2^7 } = 2^{{}^7\!/\!_{12}}$. This is the factor by which the frequency of a fifth $G$ in equal temperament is higher than the pitch[3] of the unison $C$. Similarly, the major third, $E$, is higher than the unison by a factor of $5s = \sqrt[ 12 ]{ 2^5 } = 2^{{}^5\!/\!_{12}}$, whereas the major sixth is higher by a factor of $10s = \sqrt[ 12 ]{ 2^{10} } = 2^{{}^5\!/\!_{6}}$.

#### Any note as root

Although I have used the unison as the root here, the same method can be used taking any key as root. For instance, I can proclaim that $A$ is root, and then descending to $D$ would simply involve lowering the pitch by a factor of $7s = \sqrt[ 12 ]{ 2^7 } = 2^{{}^7\!/\!_{12}}$. This also means that if I invert the system, and take $D$ as root, then $A$ is the fifth, a factor of $2^{{}^7\!/\!_{12}}$ higher.

Well, that’s all fine and dandy, but how does this fare with respect to that supreme condition of music, nicety? Do these logarithmic semitone intervals produce nice music? Is there any way to find out without tuning a piano and playing the notes?

### Is Equal Temperament nice?

Well, yes, compare it to the just intervals. If the notes of equal temperament are close enough to just, then our job is done.

For that, first, how much is the twelfth root of two, exactly? How does one find its value? And why do I keep bandying the word logarithm about, when we haven’t really calculated the log of anything yet?

Well, it’s time for that. Problem #2 : calculate the value of $2^{{}^1\!/\!_{12}}$ using logarithms. The steps are in the footnote[4].

Have you tried it yourself? If not, do try, it’s fun.

Since we’re dealing with logarithms and exponentials here, the value of $s$ is not a rational number. However, for our purposes, we’ll take the value of $s = 1.059463$ to be sufficiently correct.

#### 12-TET vs Just

Ok. Time to construct the twelve-tone equal temperament (12-TET) table. The frequency in equal temperament have been rounded off to the third place in decimal.

Name 12-TET Just
Unison (C) $2^{{}^0\!/\!_{12}} = 1.000$ $\frac{1}{1} = 1$
Minor Second (C♯ / D♭) $2^{{}^1\!/\!_{12}} = 1.059$ $\frac{ 16 }{ 15 } = 1.0666…$
Major Second (D) $2^{{}^2\!/\!_{12}} = 1.122$ $\frac{9}{8} = 1.125$
Minor Third (D♯ / E♭) $2^{{}^3\!/\!_{12}} = 1.189$ $\frac{6}{5} = 1.2$
Major Third (E) $2^{{}^4\!/\!_{12}} = 1.259$ $\frac{5}{4} = 1.25$
Perfect[5] Fourth (F) $2^{{}^5\!/\!_{12}} = 1.335$ $\frac{4}{3} = 1.333…$
Tritone (F♯ / G♭) $2^{{}^6\!/\!_{12}} = 1.414$ $\frac{7}{5} = 1.4$
Perfect[5:1] Fifth (G) $2^{{}^7\!/\!_{12}} = 1.498$ $\frac{3}{2} = 1.5$
Minor Sixth (G♯ / A♭) $2^{{}^8\!/\!_{12}} = 1.587$ $\frac{ 8 }{ 5 } = 1.6$
Major Sixth (A) $2^{{}^9\!/\!_{12}} = 1.682$ $\frac{5}{3} = 1.666…$
Minor Seventh (A♯ / B♭) $2^{{}^{10}\!/\!_{12}} = 1.782$ $\frac{ 16 }{ 9 } = 1.777…$
Major Seventh (B) $2^{{}^{11}\!/\!_{12}} = 1.888$ $\frac{15}{8} = 1.875$
Octave (C) $2^{{}^{12}\!/\!_{12}} = 2.000$ $\frac{2}{1} = 2$

#### The minor notes

This table also introduces additional five notes; the minor second, the minor third, the tritone, the minor sixth, and the minor seventh. Each of these notes is a semitone raised or lowered from one of the seven major notes. So, if you start playing at $C$ on a piano, these five notes correspond to the five black keys.

Equal temperament looks mathematically simple enough. All you need is to increment the power of the twelfth root of $2$ and you have a new note. However, as you can see, the frequencies of 12 tone equal temperament aren’t exactly equal to those of just intonation. This could potentially cause trouble, for as we know, the just intervals are pure, and intervals away from that might not sound nice.

#### Back to the perfect fifth

For instance, take a look at the fifth. In just, $G = 1.5f$, while in 12 tone equal temperament, $G = 1.498f$. That’s not equal, but that’s not massively far off too. However, it isn’t exactly $3:2$, and that is why I haven’t been calling it the perfect fifth anymore. However, the question still stands. Does an equal temperament $G$ sound more-or-less the same as the perfect fifth, or does it sound off?

Well, one way to verify this is to input the frequencies in some digital music software, have it play it back, and judge if the notes sound nice. However, clearly, not everyone is a good judge of good music. Besides, this is a very subjective (though perhaps more proper) way to analysing music.

#### The percentage difference

Instead, we science it out. In order for equal temperament to be nice enough, its frequencies needs to be within a certain percentage of the just frequencies. Agreed? All right, let’s take the normalised difference, or rather the percentage difference $\Delta$, given by

$$\Delta = 100 \times \frac{ E – J }{ J } \tag{4}$$

where $E$ and $J$ are the equal temperament and justly tuned frequencies, respectively.

I could list it out as another boring table, but diagrams, especially colourful diagrams, are far cooler. So, here’s a plot of the equal temperament and justly tuned frequencies, along with $\Delta$.

Blue dots (and line) are 12 tone equal temperament frequencies; red dots (and line) are justly tuned frequencies; yellow dots (and dashed line) are the percentage difference. $\Delta$ almost never goes beyond 1%. The highest difference is at $F\sharp$; the lowest are at $F$ and $G$. This means that, folks, equal temperament…or rather, 12-tone equal temperament should be quite good indeed.

And it is! You don’t really play it back to know that it is. Pianos are (almost always) tuned to 12-tone equal temperament. Just imagine a Chopin or a Mendelssohn or perhaps the Moonlight Sonata being played on an equal temperament piano.

Heaven!

### The Reference Frequency

But how do you tune a piano? I mean, in the table above, we have normalised the frequencies; $C$ (unison) is $1$, while $C^{\ast}$ (octave) is 2. We need the frequencies in actual units, in hertz, to be able to actually tune a piano and have a good player play the Moonlight. Clearly, we need a reference frequency.

Well, more on that, and a bit of the history of equal temperament, in part III. In the meantime, here’s Captain A. F. Haddock, “playing the piano”.

## Footnotes

1. Well, most of us. As we grow older, the upper limit starts diminishing. People in their thirties can only detect sound of upto 17-18 kHz in frequency. ↩︎
2. Beginning at unison $C$, I can get to $A$ using the following steps : $\uparrow$ octave $\downarrow$ fifth $\uparrow$ third. Writing this in the much more intuitive $+O-F+T$, we do the same for $D$, the major second: $-O+2F$. With a little bit of mental (or paper, if you wish), we see that we would need to add $-2O+3F-T$ to $A$ to get to $D$, since $(+O-F+T) + (-2O+3F-T)$ equals $(-O + 2F)$. This is the solution, then. Beginning at $A$, descend by two octaves, ascend by three fifths, and then descend by a third to get to $D$. Quite convoluted, as is obvious. Also, do note that we’d need to first know where the notes stand with respect to unison. There is no direct way to move from $A$ to $D$ in just, unlike in equal temperament, where you basically have to just…count. ↩︎
3. Frequency is the technical, objective term, and refers the rate of oscillations of a wave. Pitch is a human subjective term, and is the sensation of frequency. For instance, one would generally use pitch in a comparative context, such as stating that the wail of a police siren is at a higher pitch than the notes of a cello. In contrast, frequency is mostly used in an absolute sense. ↩︎
4. Let $s$ be the twelfth root of $2$, $s = 2^{{}^1\!/\!_{12}}$. Therefore, we can write $\log(s) = \frac{ \log(2) }{ 12 }$, which leads to
$$s = e^{ \left( {}^{\log(2)}/_{12} \right) }$$

which gives an approximate value of $s \approx 1.059463$. For our purposes we shall take this to be sufficiently equal. ↩︎

5. Clearly, the values of the fourth and the fifth in 12 tone equal temperament are not exactly equal to $4:3$ and $3:2$, are they? Which is why you no longer call them perfect. ↩︎ ↩︎