Why are pianos out of tune?
- Extra Reading
This lecture explores various ideas of tuning and temperament from the time of Pythagoras, via Isaac Newton and J.S. Bach, to the present day.
This is a part of the series, Maths and Music, which explores a range of connections between these two related disciplines.
The other lectures include:
The Geometry of Music by Professor Wilfred Hodges
Composing with numbers by Professor Jonathan Cross
Why are pianos out of tune?
Emeritus Gresham Professor of Geometry
This is the first of three talks on mathematics and music, and is on various forms of tuning and temperament. Some of you will have heard some of it before, because a shortened version of it formed the first half of a lecture I gave called YEA, WHY TRY HER RAW WET HAT?, which you can view on the Gresham website.
The second half of that lecture was on geometrical patterns in music, a subject I learned from Professor Wilfrid Hodges of Queen Mary, University of London, and he'll be saying more about this in the second lecture here on 30 November.
The third lecture is on mathematical devices in recent music, and is being given by Professor Jonathan Cross of Oxford University on 14 December. Among other composers, it will mention Xenakis, who was Gresham Professor of Music in the 1970s.
For today, I'd like to share with you some rather basic aspects of music that have connections with arithmetic. This is an enormous topic, and so I'll concentrate on a few topics that interest me - and there'll be some music for you to listen to - and also to join in with.
Possibly the most fundamental feature of music 'and one which is, by its very nature, mathematical - is rhythm.
From earliest times people derived pleasure from the noises obtained by beating flat surfaces with sticks or clapping one's hands, and a number of composers have incorporated such pitchless rhythms into their music.
Here's a short extract from a piece based on African gahu rhythms from Ghana by the American composer Carlton Gamer.
[CD1 - extract from Gahu]
The 20th-century American composer Steve Reich developed this idea in his mathematically-based 'clapping games'.
Here's one of his simplest, with two competing rhythms. Let's all try rhythm 1:
[Audience claps rhythm 1]
Now try rhythm 2:
[Audience claps rhythm 2]
Now let's put them together. If your age is an even number, clap rhythm 1, and if your age is an odd number, clap rhythm 2.
[Audience combines them]
As you saw, we got a pleasant cross-rhythm emerging, the sort of cross-rhythm clapping you get in Spanish flamenco music.
More relevant to today is the second feature of music, which is musical pitch - how high or low notes are. This relates to melody - the horizontal structure of the music. The third feature, harmony, which relates to the vertical structure of the music, we won't look at today.
The connections between musical pitch and mathematics have been recognized for at least 2500 years. There's a story (probably untrue) that the Greek mathematician Pythagoras was passing a blacksmith's forge when he heard the hammers giving off harmonious sounds as they beat out iron on the anvil. As he supposedly remarked:
Those hammers which gave the consonance of
an octave were found to weigh in the ratio 2 to 1.
He took that one which was double the other
and found that its weight was four-thirds the weight of a hammer with which it gave
the consonance of a fourth.
Again he found that this same hammer was
three-halves the weight of a hammer
with which it gave the consonance of a fifth.
Indeed, to the Pythagoreans, 'everything was number'. They desired to assign simple whole numbers to everything - and in particular they assigned ratios of numbers to musical intervals.
For example, as Pythagoras noted,
a ratio of 2 to 1 corresponds to an interval of an octave, such as low C to high C [demonstrate].
Similarly, a ratio of 3 to 2 corresponds to a perfect fifth, such as C to G [demonstrate],
and a ratio of 4 to 3 corresponds to a perfect fourth, such as low C to F [demonstrate], or G to high C [demonstrate].
The Greeks regarded such ratios as providing a key to the structure of the whole universe, as they were supposed to relate to the ratios of distances between the planets. Here's what Aristotle said about them:
Why are a double fifth and a double fourth
not concordant, whereas a double octave is?
Is it because a fifth is in the ratio 3 to 2, and a fourth
in that of 4 to 3? Now in a series of three numbers
in the ratio of 3 to 2, or 4 to 3, the two extreme numbers will have no ratio to one another;
for neither will they be in a super-particular ratio
nor will one be a multiple of the other.
What does all this mean? To answer this, let's see what happens when we combine intervals. To do so, we simply multiply the ratios. So to combine a fifth (that's 3 to 2) and a fourth (that's 4 to 3), we multiply these ratios, giving 4 to 2, which is the same as 2 to 1, an octave [demonstrate]. And, as Aristotle said, if we take two perfect fifths or two perfect fourths, the ratios are 3/2 × 3/2 (which is 9/4), and 4/3 × 4/3 (which is 16/9) neither of which is concordant. The first is the interval from C to upper D, and the second is the interval from C to B flat, and both of these are discordant.
But using these ratios - indeed, just the single ratio of a perfect fifth - we can construct the entire Pythagorean scale.
We'll start with middle C and call it 1, and we'll take its frequency to be 256 cycles per second (261 is more accurate, but 256 is easier to calculate with).
Then a fifth up is G with ratio 3/2 and frequency 384.
Going another fifth up gives us upper D with ratio 3/2 × 3/2 = 9/4, and we get the lower D by going down an octave, dividing by 2, giving a ratio of 9/8 for the whole tone from C to D, and a frequency of 288.
Going from D up another fifth takes us to A with ratio 9/8 × 3/2 = 27/16, and another fifth takes us to upper E with ratio 81/32, giving 81/64 for lower E. Thus a major third has the unlikely ratio of 81 to 64.
Finally, another fifth takes us to B with ratio 243/128. If you want the black notes too, you can carry on in this way, giving you F sharp, C sharp, and so on. And the interval of a semitone (such as between B and C) has a ratio of 2 to 243/128, which is 256/243.
Plato referred to this in his Timaeus, when he described how God created the soul, one component of which was constructed from divisible elements in the physical world. As he explained:
He began the division as follows.
He first marked off a section of the whole, and then another of twice the size of the first; next a third, half as much again as the second and three times the first, a fourth twice the size of the second, a fifth three times the third, a sixth eight times the first,
a seventh twenty-seven times the first.
And later he says:
These links produced intervals of 3/2 and 4/3 and 9/8 within the previous intervals, and he went on to fill all intervals of 4/3 with the interval 9/8; this left, as a remainder in each, an interval whose terms bore the numerical ratio of 256 to 243. And at that stage the mixture from which these sections
were being cut was all used up.
The Greeks were also familiar with the harmonic series, the notes we get by taking a vibrating string and dividing it into 1, 2, 3, or more parts. Stopping a string halfway along gives the note an octave higher, stopping it one-third of the way along gives a fifth above that, stopping it one-quarter of the way along gives a fourth above that, and so on. These harmonics are also the notes we get from a valveless horn, such as a hunting horn or a garden hose, by increasing our breath pressure.
So here are the first few notes: bottom C, low C, low G, middle C, E, G, and so on. But they get increasingly out of tune the further along the sequence we go.
Several composers have used this idea in their compositions. Here's the Prologue from Benjamin Britten's Serenade for tenor, horn and strings, played without valves, and giving quite an eerie sound. I've marked the notes of the harmonic scale on the music: those with circles around them are at best approximations to the notes written.
[CD2 - Prologue from Britten's Serenade]
These harmonics explain why two different instruments (say, a violin and a recorder) playing the same note can sound quite different. Each musical note is a mixture of these harmonics: a pure tone is represented by a sine wave, and we get different tone qualities by adding to this sine wave a succession of harmonics that differ for the different instruments.
However, these Pythagorean intervals can cause us trouble. Let's do a little arithmetic, and try to spot intervals from their position in the harmonic series.
For example, the ratio of 12 to 6 is the same as the ratio of 2 to 1, so we get an octave, G to G' [demonstrate];
the ratio of 15 to 10 is the same as 3 to 2, so we get a perfect fifth, E' to B' [demonstrate];
and the ratio of 12 to 9 is the same as 4 to 3, so we get a perfect fourth, D' to G' [demonstrate].
But what about the interval from D' to A'? That's also a perfect fifth [demonstrate], but its ratio is 13 to 9, which is smaller than 3 to 2. We're in trouble!
And we get into even more trouble if we try to compare 7 octaves with 12 fifths. Let's look at the ratios. For 7 octaves we find the overall ratio by multiplying 2 seven times, which is 128. But for 12 fifths we need to multiply 3/2 by itself twelve times, and that's over 129. So they're not the same, even though they agree on a piano.
What's going on here? We've been going around the circle of fifths, C, G, D, A, E, B, F#, C#, G#, D#, A#, E# (or F), and finally C. But what we've really reached from E# is B#, which is not the same note as C, even though they're the same on a piano. Their frequencies are in the ratio of about 129.7 to 128. In the trade, this discrepancy is called a Pythagorean comma. Although a circle of fifths is appropriate for a piano, we should really have a spiral of fifths to represent the intervals accurately.
Later we'll see one way out of this difficulty, but it will be through a compromise. Basically, the Pythagorean system is flawed.
In spite of these problems, the Pythagorean approach to music came to play a prominent role in study and education.
Plato, in his Republic, listed the subjects he considered to be a necessary part of the education of the ideal ruler: the four mathematical arts of arithmetic, geometry, astronomy, and music studied in the Pythagorean way, with intervals corresponding to ratios of whole numbers.
These mathematical arts, later called the quadrivium, combined with the three areas of the trivium (grammar, rhetoric and logic) to comprise theseven liberal arts, the corner-stone of learning from Greek times onwards, through the medieval period in Europe (Italy, Paris, Oxford, and so on), until around the 17th century. If you'd been at university in the Middle Ages, you'd have studied these subjects too.
Let's now have some more music. By the 11th century, music was still based largely on octaves, fourths and fifths, and pieces using parallel fourths and fifths were common in churches and monasteries.
To see how 'churchy' fifths in parallel can sound, let's take the National Anthem and sing it in parallel fifths. Here's the tune, starting on G.
[Demonstrate first half of 'God save the Queen', starting on G]
Let's all sing this now, to 'la'.
[Audience sing, starting on G]
Now let's all sing it through to 'la', but starting on a low C.
[Audience sings first half, starting on low C]
Now let's put the two together, and sing the whole song in parallel fifths. If your age is an even number, start on G, and if your age is an odd number, start on C.
[Audience sings all of tune in parallel fifths]
As you can hear, it's quite an interesting effect.
Incidentally, a good mental exercise is to sing the National Anthem, but starting each new line on the same note as you finished the previous line. [Demonstrate].
What other tunings are there? As the years went on, there was increasing use of other intervals, such as the major third, from C to E, with ratio 5 to 4 [demonstrate];
the major sixth from C to A with ratio 5 to 3 [demonstrate];
and the minor third from E to G with ratio 6 to 5 [demonstrate].
These numbers are larger than the 1s, 2s, 3s and 4s we had earlier, and give us what we call just intonation. The great advantage is that we now have the nice interval of 5/4 for a major third, rather than the unpleasant Pythagorean one of 81/64. Note that 5/4 is the same as 80/64, so it's flatter than Pythagoras's ratio.
Here are the ratios we get in just intonation, based on 5/4 instead of81/64. Several (like 3/2 and 4/3) are the same as before, while B (which is a fifth above E) is now 3/2 times 5/4, which is 15/8 - a great improvement on 243/128.
But with these extra intervals, our earlier difficulties become even more horrendous than before. For example, to go up from C to D we can go up a fifth to G and then down a fourth, giving a ratio of 3/2 divided by 4/3, which is 9/8. Or we could go up a fourth to F and then down a minor third, giving a ratio of 4/3 divided by 6/5, which is 10/9. Surely 9/8 and 10/9can't both be correct. We seem to have tones of two different sizes.
Several people tried to smooth over these difficulties, such as the early seventeenth-century Minimite friar Marin Mersenne, a mathematician who wrote extensively about music (here's his Harmonie universelle), and the German astronomer Johannes Kepler, who returned to the Greek idea of musical intervals between the various planets - the harmony of the spheres - each planet had its own scale.
And even Isaac Newton got in on the act. He was not musical - he once heard Handel play on the harpsichord, and all he could think of to comment on was the elasticity of Handel's fingers.
Newton spent much time on musical scales, and even tried to link the seven notes of the musical scale with the colours of the spectrum. That's why we often say that there are seven colours in the rainbow - it arises from Newton's combined researches into optics and music.
To get around these problems, a number of different scales were proposed. One was mean-tone, in which the major third was taken as the basic feature. (Notice that three major thirds of four semitones each make up an octave of twelve semitones - C to E, E to G#, and G# (or Ab) to C.) This means that the ratio for the perfect fifth is no longer equal to3/2 - it emerges as the fourth root of 5, which is about 1.495, which still is pretty good. But there's still a discrepancy - another so-called comma - and this is usually dealt with by inserting one larger-than-usual fifth between two black notes - often taken as Eb and G# in the key of C.
How close are these three scales - Pythagorean, just tempering, and mean-tone tuning? Although they're all pretty close, which is why each was successfully used for hundreds of years, but they do sound slightly different: in their usual versions, the Pythagorean system has sharp thirds, while just intonation has two bad major triads, and mean-tone has one bad fifth. See if you can hear the differences in this German hymn-tune, which we'll hear three times. [Demonstrate]
As music developed, it became increasingly necessary to be able to play equally in all twelve keys, and eventually the idea of equal temperamentemerged. In an equally tempered scale we give each of the twelve semitones in an octave the same ratio - it's the twelfth root of 2 (which is about 1.059 to 1). So the frequencies of the twelve semitones form a geometrical progression - a form of exponential growth.
Equal temperament turns out to solve most of our problems, except that now every interval other than the octave is slightly out of tune.
Here's a table comparing the ratios for equal temperament with the Pythagorean ratios. The fifth is pretty accurate - 1.498 compared with3/2, or 1.5 - and so is the fourth - 1.335 compared with 4/3, or 1.333. But the major third is about 1.26, which compared with 5/4, or 1.25, is rather sharp. So any keyboard tuned to equal temperament (as they usually are) must necessarily be slightly out of tune!
Of course, if we use equal temperament, then there's no reason why we should stick to scales with twelve semitones, especially since we can now produce notes electronically as accurately as we wish. So why not use scales with 7 notes (for example), or with 31 or 53 notes in the octave?
In fact, such scales have already been used - in many countries and over many centuries: 7-note scales are used by the gamelan orchestras of Indonesia, and scales based on 53 notes have been used in China.
These scales are particularly interesting, as they give us very accurate fifths, fourths and thirds. Here's a baroque keyboard with 31 notes to the octave. Such keyboards were actually built - in fact, Handel may have played on one - and composers have even composed in the 31-note equal-tempered scale. There's also 'Bosenquet's enharmonic harmonium' with 53 notes to the octave.
To end with, here's one 31-tone piece, Organum, composed by Carlton Gamer in the 1970s, and based on words by Ezra Pound; the vocal and instrumental lines were all electronically synthesized from the composer's voice.
[CD3 - Organum]
© Robin Wilson, 9 November 2009
This event was on Mon, 09 Nov 2009
Gresham College has offered an outstanding education to the public free of charge for over 400 years. Today, Gresham plays an important role in fostering a love of learning and a greater understanding of ourselves and the world around us. Your donation will help to widen our reach and to broaden our audience, allowing more people to benefit from a high-quality education from some of the brightest minds.