♪Music, Built

Act I · Sound

Part 6 of 68

Tuning

Foundationsstarts at this level46 min of film12 chaptersprerequisites: none

If the pure intervals cannot all be had at once, where should an instrument put the error, and why did the world settle on twelve equal steps?

A progression of four chords is sung four times in perfectly pure chords, and ends most of a semitone flat. The cause is arithmetic. Twelve pure fifths overshoot seven octaves by the Pythagorean comma, and no stack of fifths can ever close, because no power of three is a power of two; four pure fifths overshoot a pure third by the syntonic comma; three pure thirds fall short of an octave. Pythagorean tuning keeps eleven fifths pure and pays with a wolf and restless thirds. Just intonation, laid out as a lattice of fifths and thirds, makes chords pure, needs two versions of some notes, and drifts by a comma each time round the pump. Then three ways of tempering. Quarter-comma meantone narrows each fifth until the thirds are pure in eight keys, and leaves a wolf in the others. Werckmeister's well temperament closes the circle and grades the error, so that every key is usable and each has its own character: the tuning of Bach's title. Equal temperament, computed by Zhu Zaiyu in 1584 to twenty-four decimal places, makes every key the same, with thirds fourteen cents wide; it is tuned by counting beats and laid out on every guitar's frets. Twelve is the denominator of the best small fraction for a fifth; nineteen, thirty-one and fifty-three do better and are harder to play. Pianos stretch their octaves because their strings are stiff, and voices and strings adjust every note. The Tune is played with chords in eight tunings.

What you need. Part 1 for ratios and stiff strings; Part 5 for beats and for why the just ratios are smooth. Fractions, powers and logarithms; cents.

Ideas, mathematics and history
the Pythagorean and syntonic commas, just intonation, meantone and wolves, well temperament, Zhu Zaiyu and Stevin, continued fractions and why 12, stretched pianos
What we build, compute and hear
the tuning lattice; the Tune in eight temperaments; a comma pump that drifts flat

What you will be able to do

Foundations

  • Explain the Pythagorean and syntonic commas and why no chain of pure fifths closes.
  • Describe Pythagorean tuning, just intonation, meantone, a well temperament and equal temperament by what each keeps pure.
  • Say what equal temperament costs, and how a tuner sets it.

Full course

  • Compute any note of a tuning in cents and in hertz, and the beat rate of an interval.
  • Follow a comma pump in exact fractions and predict its drift.
  • Use the continued fraction of log2(3/2) to explain 12, 41 and 53.

Research

  • Describe adaptive tuning and the trade it makes between purity and stability.
  • Weigh the evidence for and against a proposed historical temperament.

Practice

  • Choose a temperament for a repertoire, and retune an instrument or a synthesizer to it.
  • Place frets, or check a guitar's intonation, from the twelfth root of two.
  • Tune held chords in an ensemble: thirds low, and the pitch anchored.

Contents

Each chapter has a home level. Choose a track to see what to read and watch: Foundations 31 min · Full course 43 min · Research 46 min · Practice 43 min.

  1. 0In tune, and sinkingFoundations3 min
  2. 1The circle that will not closeFoundations4 min
  3. 2The other commaFoundations4 min
  4. 3The comma pumpFoundations3 min
  5. 4Pure thirds, and a wolfFoundations4 min
  6. 5Well temperedFoundations3 min
  7. 6EqualFoundations6 min
  8. 7Why twelve?Practice5 min
  9. 8The piano's stretched octavesPractice3 min
  10. 9What players doPractice4 min
  11. 10Frontier: tuning that movesResearch3 min
  12. Variation 6, recap and problemsAll tracks4 min

Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.

Lecture

The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film. A dashed box stands for a number the film computes when it is rendered (hover over it to see what is computed); the README's figures for each chapter, where it lists them, follow the chapter's text.

In tune, and sinkingFoundations3 min

Four chords, played four times round, and every chord in it was perfectly in tune: pure thirds, pure fifths, with matching partials aligned. Any note that two neighbouring chords had in common was held at exactly the same pitch from one to the next. This is an idealized rule, not a rule that all good singers follow. And the music sank. Each time round, the home chord came back about a fifth of a semitone lower. After four rounds it is cents flat: most of a semitone. Listen to the first chord, and then the last.

Nobody sang a wrong note. The arithmetic of pure intervals does not add up, and this part is about what musicians have done about that for two and a half thousand years.

In 1584 Zhu Zaiyu, a prince of the Ming dynasty who had given up his title for the study of music and the calendar, sat down with an abacus of eighty-one rods and computed a single number to twenty-four decimal places. The twelfth root of two. Multiply a string's frequency by it twelve times over, and the frequency has exactly doubled. It is one answer to the problem you have just heard: twelve equal steps to the octave, in which every interval but the octave is slightly wrong and none of them is bad. Today it is the standard basis for many keyboards and fretted instruments, though pianos stretch their octaves and instruments can use other tunings. But it took three centuries to win, and it was not the first answer. Which tuning sounds best depends on the music and listener.

Part 5 found that the smoothest intervals are the ones where partials line up: two to one, three to two, five to four. This part asks whether you can have them all at once. We will find that twelve pure fifths miss seven octaves, and that four pure fifths miss a pure third: two small gaps, called commas, which between them drive the whole subject. Then three ways of hiding them. Meantone, which keeps the thirds pure in eight keys and pays for it with a wolf in the others. The well temperaments, in which every key is usable and no two sound alike. And equal temperament: what it costs, how a tuner sets it by counting beats, and why the number is twelve. Last, what pianos, singers and string players really do, which is none of the above. Each tuning in this part is computed by Monochord, using exact fractions where possible and numerical roots for temperaments, and checked against published tables.

1The circle that will not closeFoundations4 min

Do twelve fifths make seven octaves?

Start with the purest interval after the octave: the fifth, three to two. Tune a note a pure fifth above C, and you have G. A pure fifth above that, D. Keep going, and whenever a note lands outside the octave, halve its frequency to bring it back. A fifth is seven of the twelve steps on a keyboard, so after twelve fifths you have been round every one of the twelve notes, and you should be back on C. Listen to the twelve notes, and then to the thirteenth.

The thirteenth note is not C. It is a little higher. Twelve fifths multiply the frequency by a hundred and twenty-nine point seven. Seven octaves multiply it by a hundred and twenty-eight. The difference is cents, almost a quarter of a semitone, and it has had a name for two thousand years: the Pythagorean comma. In cents the sum is easier still. A pure fifth is seven hundred and two cents. Twelve of them make eight thousand four hundred and twenty-four, and seven octaves are eight thousand four hundred. Two cents too many in each fifth, twelve times over. Here is the true C and the overshot one, together.

Perhaps twelve is just the wrong number. Could some other number of fifths come out exactly on an octave? Pause, and decide. It takes one line.

For m fifths to equal n octaves, three halves to the power m must equal two to the power n. Multiply out the halves, and that says a power of three equals a power of two. But every power of three is odd, and every positive power of two is even. It can never happen. Not with twelve fifths, not with fifty-three, not with a million. So the trouble is not in our instruments or our ears. It is in the integers. No stack of pure fifths ever returns to its starting note, and the same goes for pure thirds, which need a five. Every tuning system ever devised is a decision about where to put an error that cannot be removed.

The oldest answer is the bluntest. Tune eleven fifths pure, in a chain from E flat up to G sharp, and let the twelfth be whatever is left. That is Pythagorean tuning, a tuning principle used in medieval Europe and of classical China. Eleven of its fifths are perfect. The twelfth, from G sharp to E flat, has to absorb the whole comma. It is cents instead of seven hundred and two, and it howls. Musicians called it the wolf. Here is a pure fifth, and then the wolf.

As long as music stayed away from that one fifth, the wolf did no harm. But Pythagorean tuning has a second cost, and it is in every key. Eight of its major thirds are made of four pure fifths; four crossing the wolf differ. That is the restless third of eighty-one to sixty-four that we met in Part 5, and it helped motivate alternatives to this tuning.

2The other commaFoundations4 min

Can the fifths and the thirds both be pure?

There is a second gap, and for the history of music it mattered more. Go up four pure fifths from C: G, D, A, E. That E is eighty-one sixteenths of C, or, two octaves lower, eighty-one to sixty-four. But the smooth major third, the one that sits in a valley of Part 5's curve, is five to four, which is eighty to sixty-four. The E reached by fifths is too high, by the ratio eighty-one to eighty: cents. This is the syntonic comma. It is nearly the same size as the Pythagorean comma, and it has a different definition: this one is the disagreement between the number three and the number five. Here are the two thirds, in an order I will not tell you. Which is which?

A was the third made of fifths. It beats, times a second on these notes. B is still. So here is the dilemma in one sentence: pure fifths give bad thirds. And by about 1500, composers wanted thirds in every chord.

And there is a third gap, which the thirds make all by themselves. Go up three pure major thirds from C: to E, to G sharp, and to B sharp, which on a keyboard is the same key as C. Five quarters, three times over, is a hundred and twenty-five sixty-fourths. An octave is a hundred and twenty-eight sixty-fourths. Three pure thirds fall short of the octave by cents, nearly a quarter-tone. Here is a true octave, and then C against that B sharp.

So a keyboard with pure thirds cannot use one key for G sharp and for A flat, or for B sharp and for C. They are different notes. Remember this gap. It is about to turn into a wolf.

The obvious cure is to use both. Lay the notes out on a grid. One step to the right is a pure fifth. One step up is a pure third. Every note is then a ratio of small powers of two, three and five. This is just intonation, and the seven notes of the C major scale sit in it as a compact patch. Any three notes at the corners of one of these triangles form a chord that is pure in every interval, with matching partials aligned. The major scale contains three of them, on C, on F and on G. Renaissance theorists thought they had found the true scale of nature.

They had not, and you can see why on the grid. D is two steps to the right of C. A is one step to the left and one up. They are not neighbours. The fifth from D up to A, which many pieces in C major use, comes out as to : a whole comma short of a pure fifth. It is just intonation's own wolf, and it is in the middle of the scale. Here is the fifth from C to G, and then the fifth from D to A.

A singer could fix that by singing a slightly different D when it has to go with A. But then there are two Ds, a comma apart, and a keyboard has only one key for each. Worse is to come. Even with voices, which can sing any pitch they like, pure chords lead somewhere unexpected.

3The comma pumpFoundations3 min

Why did the music sink?

Go round the progression once, slowly, in pure chords, keeping one rule: a note that two neighbouring chords share keeps its pitch. C major: C, E and G, at one, five quarters and three halves. A minor keeps the C and the E, and adds an A a pure fourth above the E: five thirds. D minor keeps that A, and needs a D a pure fifth below it. That is ten ninths. Not nine eighths, the D of the scale: ten ninths, a comma lower, because this D has to be in tune with A. G major keeps the D, so its G is a pure fourth above ten ninths: forty twenty-sevenths. And the last chord, C major, is built on that G. So what is its C, compared with the C we began on? Pause and work it out.

A pure fifth below forty twenty-sevenths is eighty over eighty-one. The C has come back one syntonic comma flat: cents. Every step was a pure interval. The comma was hiding in the D. Going from C up a sixth, down a fifth, up a fourth and down a fifth is the same as going up one third and down four fifths, and we already know those do not cancel.

That is what you heard at the start of this part. Each time round, another comma. After four rounds, cents. A fifth time round, and the choir is more than a semitone flat, singing in a different key from the one it began in, and every chord on the way was flawless. The effect was worked out in the sixteenth century by the mathematician Giovanni Battista Benedetti, who sent it as a puzzle to the composer Cipriano de Rore. Musicians now call a progression like this a comma pump.

So here is where we stand. Keep eleven fifths pure on a twelve-note keyboard, and you get a wolf, and thirds that will not sit still. Keep the fifths and the thirds both pure, and you need two versions of some notes, and the pitch will not stay put. For voices and violins, which can bend, that is a nuisance. For anything with fixed notes, an organ, a harpsichord, a fretted lute, it is fatal. A fixed instrument has to make some intervals deliberately impure, so that the comma discrepancy is distributed rather than concentrated in one interval. That is called tempering, and the only questions are which intervals to spoil, and by how much. History gave three answers.

4Pure thirds, and a wolfFoundations4 min

What if the thirds come first?

The first answer starts from what Renaissance musicians cared about most: the third. In 1523 Pietro Aron, in Venice, described how to tune a keyboard so that its major thirds are pure. The idea is one line of arithmetic. Four pure fifths overshoot a pure third by a comma. So make the fifths smaller. If all four share the correction equally, how much narrower must each fifth be? Pause and work it out.

A quarter of twenty-one and a half cents: five point four cents each. So each fifth becomes cents instead of seven hundred and two. In exact terms, four of these fifths must multiply to five, so the fifth is the fourth root of five. Because every fifth gives up a quarter of the comma, this is called quarter-comma meantone. The name meantone comes from its whole tone, which is exactly half of the pure third. A fifth this narrow beats about times a second on middle C. It is a slow waver, and listeners accepted it gladly, because in return eight major thirds were pure.

This is what they were buying. The chord of C major, three times: in Pythagorean tuning, in the equal temperament of a modern piano, and in meantone.

The first is bright and restless. The second, the one you know, shimmers. The third stands still. To ears that had grown up with Pythagorean thirds, a meantone chord was a revelation, and the music of the next two centuries, full of slow, glowing triads, was written for it.

Now carry it round the circle. Eleven fifths, each five cents narrow. But narrowing eleven fifths has taken away far more than the Pythagorean comma, so the twelfth fifth comes out much too wide: by cents. This wolf is worse than the Pythagorean one. And look at the thirds. Eight of them are pure: the ones on C, G, D, A, E, and on F, B flat and E flat. The other four, the ones that have to cross the wolf, are cents too wide. They are far from pure major thirds and can sound very rough. A player cannot freely substitute them for the good thirds.

Hear what that means for a player. The same chord shape, a major triad, in two keys of a meantone keyboard. First on C. Then on A flat, which on this keyboard is the key called G sharp.

The first has a pure major third and a slightly narrowed fifth. The second is unusable. Its third is forty-one cents wide and its fifth is the wolf. The trouble is that a meantone keyboard has a G sharp but no A flat: the two are different notes, forty-one cents apart, and there is only one key for both. For some two hundred years this was a widely used family of keyboard tunings in Europe. Composers simply stayed in the good keys, which is one reason so much early music is written with few sharps or flats. Some organ builders went further, and split the black keys in two: the front half for G sharp, the back half for A flat.

5Well temperedFoundations3 min

Can every key be usable?

By the late seventeenth century composers wanted to go everywhere: to modulate through remote keys and come back. Meantone would not let them. In 1691 the organist Andreas Werckmeister published a set of tunings designed for exactly that. His third is the most famous, and it goes back to the Pythagorean comma. Take the circle of twelve pure fifths, which overshoots by one comma, and remove the comma in four equal pieces: from the fifths on C, on G, on D, and on B. The other eight fifths stay pure. The circle now closes exactly. There is no wolf anywhere.

What did it cost? Here is one picture for all four tunings so far: the major third in each of the twelve keys, as signed cents above or below pure. Pythagorean: eight thirds a comma wide, and four that happen to be nearly pure, by accident, in the keys nobody used. Meantone: eight pure thirds, and four impossible ones. Werckmeister: no third is pure, and no third is impossible. The thirds are best around C, four cents wide, and get steadily wider as you move round the circle, up to a full comma in the remote keys. And for comparison, equal temperament, which we come to next: every third the same, fourteen cents wide. Werckmeister did not remove the error. He graded it.

And that grading can be heard. Here is the major chord on C, then on E, then on F sharp, in Werckmeister's tuning. In ideal equal temperament these have the same frequency ratios at three heights, though timbre and register still differ. Are they here? Which is the calmest?

The chord on C is calm. The one on E is brighter and more restless. The one on F sharp is tense. In a tuning like this every key has its own colour, and composers knew it: they chose a key for its character as well as for its range. Writers of the time drew up lists. For Christian Schubart, in the 1780s, C major was innocent and simple, D major was the key of triumph, and F minor the key of deep gloom. Some of that is habit and association. But some of it was in the tuning: the keys really did differ. There was a practical attraction too. Eight of Werckmeister's fifths are pure, and a pure fifth is the easiest thing in the world to tune: you simply make the beats stop. Tunings of this family are called well temperaments, and they are what the title of Bach's Well-Tempered Clavier refers to, in 1722: a prelude and a fugue in each of the twenty-four keys, to show that on a well-tempered keyboard all of them can be played. Well tempered does not mean equally tempered. In an unequal well temperament, C major and F sharp major have different interval structures. Bach's exact preferred temperament remains debated.

6EqualFoundations6 min

What if every key is treated the same?

The third answer is the simplest of all, and the most radical. Stop choosing. Take the Pythagorean comma and share it equally among all twelve fifths: two cents from each. Then every fifth is the same, every key is the same, and the twelve notes divide the octave into twelve identical steps. Each step multiplies the frequency by the same number, and twelve steps must make exactly two. So that number is the twelfth root of two. This is what Zhu Zaiyu computed in 1584, by taking square roots and cube roots on his abacus. In Europe the Flemish engineer Simon Stevin worked out the same scheme within a few years, less accurately, and never published it. Note what kind of number this is. The Pythagorean and just tunings we examined were built from ratios of whole numbers. This one has no whole-number ratios in it at all, except the octave.

How do you take a twelfth root with an abacus? Twelve is two times two times three. So take the square root of two, which is one point four one four. Take the square root of that: one point one eight nine. Then take the cube root of that, and you have it: one point nought five nine five. Zhu did each step by hand, digit by digit, to twenty-five figures. And here is where that number is used every day. A guitar's frets cross all six strings, so each fret must raise every string by the same interval: one equal semitone. On a string millimetres long, how far from the nut does the first fret go? Pause and work it out.

A string sounds a semitone higher when it is shorter by the twelfth root of two. So the sounding length becomes the full length divided by one point nought five nine five, and the fret sits millimetres from the nut. The second fret takes the same fraction of what is left, and so on, each fret a little closer than the last, until the twelfth lands exactly on the middle of the string. Instrument makers call it the rule of eighteen, because each fret takes off about one part in . An ideal straight-fret, equal-tempered guitar is a ruler marked in twelfth roots of two, before practical compensation.

What does it cost? Two cents on every fifth is almost nothing: a beat every second or so. The cost is in the thirds. Here are two major thirds on middle C. One is pure. The other is an ideal equal-tempered third, rather than the exact tuning of every real piano. Which is which?

A was pure. B is equal-tempered, and it shimmers: its partials beat about ten times a second. Every major third in equal temperament is cents wide, two thirds of a comma, in every key. If you have never noticed, it is because you have never often heard approximations to this interval from keyboards. It is a real loss, and many musicians of the eighteenth century refused to accept it. What you buy with it is complete freedom. Any piece can be played in any key, and keeps its frequency ratios in all of them. Register and instrumental timbre can still change its sound.

A worked example, because it answers an obvious question. Nobody can hear a twelfth root of two. So how is a piano tuned to it? By the beats of Part 5. Take the A below middle C, two hundred and twenty hertz, and the E above it, which should be . If the fifth were pure, the second partial of the E would sit exactly on the third partial of the A. How fast does the tempered fifth beat? Pause and work it out.

Three times two hundred and twenty is six hundred and sixty. Twice the E is . They differ by hertz: three beats in four seconds. A tuner sets the E so that the fifth beats at just that rate, slightly narrow. And so on through the middle octave: each fifth a little narrow, each fourth a little wide, with the major thirds as a check, beating seven, eight, ten times a second as they climb. A piano tuner carries this table in the head, and counts. The twelfth root of two is tuned with a watch.

It took three centuries to win. The arithmetic was known by the 1580s. By 1636 Marin Mersenne had printed the string lengths, and fretted instruments were already close to it for a practical reason: a fret crosses all the strings, so every string must use the same steps. But keyboards went on being tuned in meantone and then in well temperaments through the eighteenth century. Equal temperament was known, and widely disliked for its thirds. It won in the nineteenth century, when music began to modulate without limit and pianos began to be made in factories. By the end of that century it was the standard, and it has stayed so. It is not the tuning in which most of the classical repertoire was conceived. It is the one in which all of it can be played.

7Why twelve?Practice5 min

Is there something special about twelve notes to the octave?

Why twelve? If the octave is going to be cut into equal steps, it could be cut into any number. So try them all. For each number of steps from four to sixty, the blue line is how far its best fifth is from pure. Most are hopeless. But a few numbers stand out, each with a better fifth than any smaller number: five, seven, twelve, twenty-nine, forty-one and fifty-three. Twelve has a fifth only two cents out, and nothing does better until twenty-nine. Now the thirds, in green. Twelve is mediocre: fourteen cents. Nineteen is better. Thirty-one has a third less than a cent from pure. And fifty-three has both its fifth and its third nearly perfect.

Those numbers are not luck, and they can be found without trying every case. A fifth is a fixed fraction of an octave, when both are measured as logarithms: nought point five eight five. With n equal steps to the octave, the fifth has to be a whole number of steps. So we need a fraction with a small denominator that comes close to that number. Try a few. Which of these is closest?

A half is nought point five. Three fifths is point six. Four sevenths is point five seven one. Seven twelfths is point five eight three three, and that is the winner by a long way: seven steps out of twelve. There is a machine for producing these, called a continued fraction: write the number as one over one plus one over something, and repeat. Cut the expression off after each term, and you get, in order, the best possible fraction for its size. A half. Three fifths. Seven twelfths. Twenty-four forty-firsts. Thirty-one fifty-thirds. The denominators are the scales: five notes, twelve notes, forty-one, fifty-three. Twelve is the first division of the octave with a good fifth that a hand can still play. And look at the two before it. Five and seven. A keyboard has seven white keys and five black ones in every octave. These familiar seven-note and five-note collections are not seven- and five-step equal temperaments. Many melodies use unequal steps derived from chains of fifths. The twelve-note keyboard contains approximations to both collections.

And the others are not just arithmetic. People have built them. Here is the major chord on C in twelve, nineteen, thirty-one and fifty-three equal steps, and then pure.

Twelve shimmers. Nineteen is calmer, with a rather flat fifth. Thirty-one is close to still, and fifty-three can hardly be told from the pure chord. Fifty-three was reached by the Chinese theorist Jing Fang in the first century BC, who followed the fifths round until they almost closed. Thirty-one was worked out by Christiaan Huygens, who saw that it is quarter-comma meantone with the wolf removed; an organ with thirty-one notes to the octave was built in the Netherlands in 1950. Nineteen was tried by experimenters in the sixteenth century. Each improves some important intervals over twelve, while changing others. Each also needs an unfamiliar keyboard or playing method that some musicians have chosen to learn. Twelve is not the best division of the octave. It is a compact compromise that became widely established.

And some musicians left equal steps altogether. In 1949 the American composer Harry Partch published Genesis of a Music: forty-three unequal steps to the octave, every one a ratio of whole numbers up to eleven, and then he built the instruments to play them, from an adapted reed organ to marimbas and kitharas. Here are his steps against the twelve. They crowd together where the pure intervals are, around the fourth and the fifth and the thirds, and they include the seventh and eleventh partials that twelve cannot reach at all. Every tuning in this part keeps some ratios and gives up others. Partch kept them, and paid for it with an orchestra he had to build himself.

8The piano's stretched octavesPractice3 min

Is even the octave safe?

Through all of this, one interval has been safe: the octave, two to one, pure in every system. On a piano, even that fails, and Part 5 has already told us why. A piano string is thick steel under great tension, and in Part 1 we found that a stiff string's partials are not whole multiples of its fundamental. They run sharp, more and more the higher they go. So the second partial of a piano note is a little above twice its frequency. And we know that an octave is smooth when the upper note lands on the lower note's second partial, wherever that happens to be. Listen: an octave on two very stiff strings, first tuned exactly two to one, and then stretched.

The exact octave beats, about times a second on these exaggerated strings. The stretched one aligns that selected partial pair; other pairs can still beat. On an instrument whose partials are stretched, a useful octave match can require a stretched octave. It is the lesson of the bent timbre, in an instrument found in every concert hall.

Do that across a whole keyboard and you get a curve. A tuner sets the middle of the keyboard to equal temperament, and then tunes outward, balancing beats between several partial pairs and intervals. In this model, matching selected octave partials makes octaves wider than two to one, and the widening adds up. This is Monochord's model, with strings of typical stiffness. By the top of the keyboard the notes are about cents sharp of where equal temperament puts them, and at the bottom about cents flat. In 1938 O. L. Railsback measured real pianos, tuned by good tuners, and found this shape. So the instrument that stands for equal temperament is not in equal temperament. No formula on paper says how a piano should be tuned. Its own strings do. And every piano is different. A short string has to be thicker for its pitch, so it is stiffer, and its partials are further out of line. That is one reason smaller pianos can differ from concert grands, even when well tuned: its octaves have to be stretched more, and its bass notes hardly agree with themselves.

9What players doPractice4 min

What about instruments that can play any pitch?

Everything so far has been about instruments with fixed notes. Many instruments can also vary their pitches continuously. A voice, a violin, a trombone can vary pitch continuously within its range, and wind players adjust pitch with breath, embouchure and fingering. For them tuning is not a table. It is a decision made afresh on every note. And good players make different decisions in different places. On a held major chord, they often draw the major third down towards pure, because a beating third in a slow chord sounds sour. In a melody, they often do the opposite, and push a leading note up towards the note it is heading for: higher even than the piano's, close to the Pythagorean version. A barbershop quartet tunes its sevenths to seven to four, the harmonic-seventh valley of Part 5, nearly a third of a semitone below the piano's seventh, and prizes the ring it makes. And when there is a piano in the room, everybody follows the piano.

The commas reach even the instruments that seem free of them. A string quartet tunes its open strings by listening to fifths. The cello's strings are C, G, D and A, and the violin carries the chain one fifth further, to E. Tune all of those fifths pure, as string players are taught to, and you have walked four fifths from the cello's C to the violin's E. We know what that gives: the wide third of eighty-one to sixty-four. So when the quartet plays a chord of C major, the violin's open E string is a comma too high for the cello's open C. Players deal with it by fingering the note instead, or by tuning their fifths a shade narrow in the first place. That is a temperament, small and unwritten, set by ear before every concert.

So do choirs really sink, as the comma pump says they must? The prediction is exact: a comma for every time round. When vocal quartets were recorded singing pieces written to pump the comma, they did drift, as the arithmetic predicts, though not by the full amount. But when an ensemble was followed through months of rehearsal, each singer's notes turned out to lie closer to equal temperament than to just intonation, with the major thirds leaning a little towards pure. Singers are not pure-interval machines. They tune the chords they are holding, and at the same time they remember where the key is, and those two aims pull against each other all the time. Real intonation is a moving compromise, and it is one of the things that makes a fine ensemble sound alive.

There is one more decision, and it is separate from all the others: where the whole system sits. A tuning fixes the ratios between notes. It does not say how many hertz any of them is. For most of history that was a local matter. An organ in one town could be a semitone away from an organ in the next. In the eighteenth century pitch standards varied widely. A modern historical-performance convention uses A near four hundred and fifteen hertz for much Baroque repertoire. In some places pitch rose as orchestras looked for a more brilliant sound. France fixed it by law at four hundred and thirty-five in 1859. And in 1939 an international conference in London settled on four hundred and forty, which is what your tuner app assumes. It is a convention, not a fact of nature, and players of early music still tune to the old pitches.

10Frontier: tuning that movesResearch3 min

Must an instrument have one tuning?

Every system in this part froze a keyboard into one compromise. An electronic instrument has no need to. It can retune any note, by any amount, while the note is sounding. So it can do what a good choir does: hear which chord is being played, make that chord as pure as it can, and spread the leftover comma where it will be noticed least. On our progression, pure chords drift, and a fixed temperament stays put but beats. An adaptive tuning can stay close to pure in every chord and still come home. Schemes of this kind are built into some electronic organs, software instruments and notation programs today. They raise a new question, which nobody has settled: when a chord's notes glide a few cents to meet each other, do listeners hear better tuning, or a wobble?

The second open question is three hundred years old. We know Bach's keyboard was well tempered. We do not know how. He left no table. At the top of the title page of the Well-Tempered Clavier, in his own hand, is a row of eleven loops, of three different kinds. For two and a half centuries it was taken for decoration. In 2005 the harpsichordist Bradley Lehman proposed that it is a tuning diagram: eleven loops for eleven fifths, and the three kinds of loop for three amounts of tempering. Read his way, it gives a specific temperament, and recordings have been made in it. The replies came at once. Which way up should the drawing be read? Which loop is which fifth? Other scholars derived different temperaments from the same loops, and some maintain that it is simply a flourish. There is no agreement. The best-known title in keyboard music names a tuning that may be lost.

Three things, then, that are not known. How pure can an adaptive tuning make its chords before the retuning itself becomes audible, and what do listeners actually prefer? What did Bach, or Mozart, or Chopin hear? Written tuning instructions from their time are rare and vague, and a few surviving organ pipes are some of the only hard evidence we have. And the mathematics. Every temperament is a choice of which commas to make disappear: the Pythagorean, the syntonic, or others we have not met. The space of all such choices has a geometry, and mapping it is a small, active corner of mathematics and music theory that we will visit in Part 33.

Variation 6, recap and problemsAll tracks4 min

Every part ends by doing something to the Tune with what it has built. This part built tunings, so here is the Tune with simple chords under it, eight times over, a phrase at a time. Pythagorean. Meantone in C, and then in the key that crosses the wolf. Werckmeister. Then twelve, nineteen, thirty-one and fifty-three equal steps. The notes on the page never change. Listen to the chords.

Row six of the ledger. seconds. The chords of the fifty-three-step version are within cent of pure. Those of the wolf key are cents out. Twelve equal steps, the tuning you have heard all your life, sits in the middle, at about ten.

What did we find? Twelve pure fifths overshoot seven octaves, and no stack of fifths can ever close, because no power of three is a power of two. Four pure fifths overshoot a pure third, and so our pure-chord progression with held notes drifts. Meantone makes the thirds pure for eight keys, and pays with a wolf. The well temperaments grade the error round the circle, so that every key can be used and each has a character. Equal temperament makes every key the same, at the price of thirds fourteen cents wide, and is tuned by counting beats. The number twelve comes from the best small fraction for a fifth. And in practice pianos stretch their octaves, and voices and strings adjust every note as they go.

Five problems. One to compute, one to prove, one for your ears, one to build, and a research problem, marked with a star. Solutions are in this part's notes. Pause here.

Where does this come back? The stretched octave returns in Part 7, when we build the piano's string. The twelve notes that this part has justified become scales and keys. The grid of fifths and thirds returns as a map of chords. Commas and continued fractions return when we treat scales as mathematics. Other tuning traditions are central to Indian, Arabic and Indonesian music. And every synthesizer carries a tuning table.

And in practice. A piano technician sets one octave by beat rates and stretches the rest to suit the strings. A harpsichordist chooses a temperament to match the music: meantone for 1600, a well temperament for Bach. A choir director may lower held major thirds towards pure, and rehearses the bars where the pitch is known to sag. And a producer detunes two oscillators by a few cents, on purpose, because slow beats are warm.

The books and papers this part follows. The full list, with notes, is in the README.

One last sound, and it is where the series began: Part 1's string, plucked.

For six parts that has been our only instrument. We know its partials, how the ear sorts them, why they make some intervals smooth, and how to tune twelve of them. But a string can be set going in three ways. It can be plucked, like this one. It can be struck by a hammer, and then it is a piano. Or it can be bowed, and then it never dies away. Same string, three instruments, and from here on we build them. That is Part 7: Strings, Hammers and Bows.

Where it goes next. The stretched octave returns with the piano's string (Part 7). The twelve notes become scales and keys (Parts 12 and 15); the lattice of fifths and thirds returns as a map of chords (Parts 13, 31 and 32). Commas and continued fractions return when scales are treated as mathematics (Part 33). Other divisions of the octave belong to raga, maqam and gamelan (Parts 34 to 36), and tuning tables to synthesizers and MIDI (Parts 50 and 53).

Key results

The part's results in one place, for revision.

The Pythagorean comma\(\displaystyle \frac{(3/2)^{12}}{2^{7}} = \frac{531441}{524288}\quad\allowbreak (23.46\ \text{cents})\)
The syntonic comma\(\displaystyle \frac{(3/2)^{4}}{4}\Big/\frac54 = \frac{81}{80}\quad\allowbreak (21.51\ \text{cents})\)
Quarter-comma meantone\(\displaystyle \text{fifth} = \sqrt[4]{5} = 696.6\ \text{cents};\quad\allowbreak \text{wolf} = 737.6\)
Equal temperament\(\displaystyle f_k = f_0\,2^{k/12},\qquad\allowbreak 2^{1/12} = 1.0594630943\ldots\)
Beats of a tempered interval\(\displaystyle \text{beats} = \lvert\, q f_\text{high} - p f_\text{low} \rvert \quad\allowbreak (\text{nearly } p{:}q)\)
Why twelve\(\displaystyle \log_2\tfrac32 = [0;1,1,2,2,3,\ldots]:\ \tfrac12,\ \tfrac35,\ \tfrac7{12},\ \tfrac{24}{41},\ \tfrac{31}{53}\)

Try it

Lab 6 · Tuning, computed: where each system hides the comma

Check the commas in exact arithmetic, temper a chain of fifths by any fraction of the comma and see what it does to the thirds and to the wolf, count the beats of an equal-tempered third, and pump a comma.

Figure produced by Lab 6: Tuning, computed: where each system hides the comma
Produced by the lab below, seed 0, in 0.2 s.
python -m videos.music.labs 6 needs numpy, scipy, matplotlib · download lab06.py · source on GitHub
Pythagorean comma                         531441/524288 = 23.46 cents
syntonic comma                            81/80 = 21.51 cents
diesis (octave less three pure thirds)    128/125 = 41.06 cents
fifths narrowed by 1/4 comma              696.6 cents each; the twelfth is +35.7 cents from pure
major third on C                          +0.0 cents from pure
worst major third                         +41.1 cents from pure
equal temperament: F3 and A3              174.61 and 220.00 Hz
their major third beats                   6.93 times a second; an octave higher, 13.86
4 times round I-vi-ii-V-I in pure chords  the tonic is -86.0 cents from where it began
ear problem, the order (listen first)     twelve equal steps; pure (just intonation); quarter-comma meantone; Pythagorean
  from stillest to busiest                pure (just intonation) (0.0); quarter-comma meantone (3.8); twelve equal steps (9.8); Pythagorean (15.2)

Temper the fifths and the comma does not go away: it moves. A quarter of a comma from each fifth makes eight thirds pure and leaves a wolf; an eleventh of a comma from each is, very nearly, twelve equal steps.
The code (94 lines; it asserts its own result)
"""Lab 6: the commas in exact fractions, a temperament of your own, the beats a tuner counts, and a chord to rank by ear."""

import math
from fractions import Fraction

import numpy as np

from videos.coursekit import labs
from explainer.music.monochord import Clip, concat
from explainer.music.monochord import tuning as T
from explainer.music.monochord.partkit import organ_chord

TITLE = "Tuning, computed: where each system hides the comma"
GOAL = ("Check the commas in exact arithmetic, temper a chain of fifths by any fraction of the comma and see what it does "
        "to the thirds and to the wolf, count the beats of an equal-tempered third, and pump a comma.")
TASKS = [
    "Set FRACTION to Fraction(0), Fraction(1, 6) and Fraction(1, 3). Which keeps the fifths best? Which makes the minor thirds pure?",
    "Set FRACTION to Fraction(1, 11). Compare the result with twelve equal steps. How wide is the 'wolf' now?",
    "Set ROUNDS to 5. How far has the tonic of the pump fallen, and what note is it nearest to?",
]
FRACTION = Fraction(1, 4)     # how much of the syntonic comma each fifth gives up
ROUNDS = 4                    # times round I-vi-ii-V-I in pure chords
C4 = 261.6255653005986


def run(seed=0):
    rng = np.random.default_rng(seed)
    lab = labs.Lab()

    # 1. the commas, exactly
    assert Fraction(3, 2) ** 12 / 2 ** 7 == T.PYTHAGOREAN_COMMA and Fraction(3, 2) ** 4 / 4 / Fraction(5, 4) == T.SYNTONIC_COMMA
    lab.row("Pythagorean comma", f"{T.PYTHAGOREAN_COMMA} = {T.cents(T.PYTHAGOREAN_COMMA):.2f} cents")
    lab.row("syntonic comma", f"{T.SYNTONIC_COMMA} = {T.cents(T.SYNTONIC_COMMA):.2f} cents")
    lab.row("diesis (octave less three pure thirds)", f"{T.DIESIS} = {T.cents(T.DIESIS):.2f} cents")

    # 2. a temperament of your own
    t = T.meantone(FRACTION)
    fifths, thirds = dict(t.fifths()), dict(t.thirds())
    wolf = fifths["G#"] - T.cents(T.PURE_FIFTH)
    lab.row(f"fifths narrowed by {FRACTION} comma", f"{fifths['C']:.1f} cents each; the twelfth is {wolf:+.1f} cents from pure")
    lab.row("major third on C", f"{thirds['C'] - T.cents(T.PURE_THIRD):+.1f} cents from pure")
    lab.row("worst major third", f"{max(thirds.values()) - T.cents(T.PURE_THIRD):+.1f} cents from pure")
    assert abs(math.fsum(fifths.values()) - 8400.0) < 1e-6          # the twelve fifths always add up to seven octaves
    if FRACTION == Fraction(1, 4):
        assert abs(thirds["C"] - T.cents(T.PURE_THIRD)) < 1e-9 and abs(wolf - 35.68) < 0.01

    # 3. the beats a tuner counts (Problem 1)
    e = T.equal(12)
    f3, a3 = e.hz("F", 3), e.hz("A", 3)
    beat = T.beat_rate(f3, a3, 5, 4)
    lab.row("equal temperament: F3 and A3", f"{f3:.2f} and {a3:.2f} Hz")
    lab.row("their major third beats", f"{beat:.2f} times a second; an octave higher, {2 * beat:.2f}")
    assert abs(beat - 6.93) < 0.01

    # 4. the pump
    drift = T.pump_drift(ROUNDS)
    lab.row(f"{ROUNDS} times round I-vi-ii-V-I in pure chords", f"the tonic is {drift:.1f} cents from where it began")
    assert abs(drift + ROUNDS * T.cents(T.SYNTONIC_COMMA)) < 1e-9

    # 5. the ear problem (Problem 3): the chord of C major in four tunings
    systems = [("pure (just intonation)", T.just()), ("quarter-comma meantone", T.meantone()), ("twelve equal steps", T.equal(12)), ("Pythagorean", T.pythagorean())]
    order = rng.permutation(4)

    def chord(tn):
        return organ_chord([C4 * 2 ** (tn.pc(n) / 1200.0) for n in ("C", "E", "G")], 2.0).at_level(-18.0)

    lab.audio = concat([chord(systems[j][1]) for j in order], gap=0.4)
    lab.row("ear problem, the order (listen first)", "; ".join(systems[j][0] for j in order))
    lab.row("  from stillest to busiest", "; ".join(f"{n} ({tn.triad_error('C'):.1f})" for n, tn in sorted(systems, key=lambda s: s[1].triad_error("C"))))

    fig, (a, b) = labs.figure(2)
    names = [n for n, _ in t.thirds()]
    a.bar(range(12), [thirds[n] - T.cents(T.PURE_THIRD) for n in names], color=labs.RED, label="major third")
    a.bar(range(12), [fifths[n] - T.cents(T.PURE_FIFTH) for n in names], color=labs.BLUE, width=0.4, label="fifth")
    a.set_xticks(range(12))
    a.set_xticklabels(names, fontsize=7)
    a.axhline(0, color="#888", lw=0.6)
    a.set_title(f"Fifths narrowed by {FRACTION} of a comma")
    a.set_ylabel("cents from pure")
    a.legend()
    ns = np.arange(5, 61)
    b.plot(ns, [abs(T.edo_errors(int(n))["fifth_error"]) for n in ns], color=labs.BLUE, lw=1.2, label="best fifth")
    b.plot(ns, [abs(T.edo_errors(int(n))["third_error"]) for n in ns], color=labs.GOLD, lw=1.2, label="best major third")
    for n in (12, 19, 31, 53):
        b.axvline(n, color="#888", lw=0.5, ls=":")
    b.set_title("Equal divisions of the octave")
    b.set_xlabel("steps to the octave")
    b.set_ylabel("cents from pure")
    b.set_ylim(0, 30)
    b.legend()
    lab.fig = fig
    lab.note = ("Temper the fifths and the comma does not go away: it moves. A quarter of a comma from each fifth makes eight thirds "
                "pure and leaves a wolf; an eleventh of a comma from each is, very nearly, twelve equal steps.")
    return lab

Now change it

  1. Set FRACTION to Fraction(0), Fraction(1, 6) and Fraction(1, 3). Which keeps the fifths best? Which makes the minor thirds pure?
  2. Set FRACTION to Fraction(1, 11). Compare the result with twelve equal steps. How wide is the 'wolf' now?
  3. Set ROUNDS to 5. How far has the tonic of the pump fallen, and what note is it nearest to?

Problems, with solutions

Try each problem before opening its solution.

  1. A tuner's third. In equal temperament with A4 = 440 Hz, find the frequencies of F3 and A3 and the beat rate of the major third between them. How fast does the same third beat an octave higher?

    Solution

    A3 = 220 Hz. F3 is four semitones below it: 220 / 2^(4/12) = 174.61 Hz. A pure third would put the fourth partial of A3 on the fifth partial of F3: 4 × 220 = 880 against 5 × 174.61 = 873.07. They differ by 6.93 Hz, so the third beats about seven times a second, wide. An octave higher both frequencies double and so does the difference: 13.86. Tuners use this: thirds beat faster, steadily, as they climb the keyboard. (The lab computes both.)

  2. The wolf, and the diesis. Show that in quarter-comma meantone the diminished sixth G♯–E♭ exceeds a pure fifth by 35.7 cents, and that three pure major thirds fall short of an octave by 128/125.

    Solution

    Twelve fifths must total seven octaves, 8400 cents. Eleven of them are 696.58 cents (a pure fifth, 701.96, less a quarter of the syntonic comma, 5.38): 7662.36 in all. The twelfth is 8400 − 7662.36 = 737.64 cents, which is 35.68 above pure. Equivalently: it is wide by eleven quarter-commas less the Pythagorean comma, 11 × 5.377 − 23.460 = 35.68. For the thirds: (5/4)³ = 125/64, and 2 ÷ 125/64 = 128/125, or 41.06 cents. In meantone, where the thirds C–E and E–G♯ are pure, the "third" G♯–C is what is left of the octave: a pure third plus the diesis, 427 cents.

  3. Ear. The lab (python -m videos.music.labs 6) plays the major chord on C in four tunings, in a random order. Rank them from stillest to busiest, and name the equal-tempered one.

    Solution

    The four are just intonation (matching partials coincide), quarter-comma meantone (a pure third, and a fifth 5.4 cents narrow that wavers about 2.4 times a second), twelve equal steps (a third 13.7 cents wide, beating about ten times a second) and Pythagorean (a third 21.5 cents wide, beating about sixteen times a second). The lab prints the order it played, and each chord's root-mean-square error in cents: 0.0, 3.8, 9.8 and 15.2.

  4. Build. Add sixth-comma meantone and Vallotti's temperament to tuning.py, and draw their thirds round the circle. Which keys does each favour?

    Solution

    Solution sketch. meantone(Fraction(1, 6)) already gives the first: fifths 698.4 cents, thirds 7 cents wide in the eight good keys, and a much milder wolf (a fifth 16 cents wide). Vallotti's (c. 1750) is a well temperament: from_fifths("Vallotti", {n: narrow for n in ("F", "C", "G", "D", "A", "E")}) with narrow a pure fifth less a sixth of the Pythagorean comma, the other six pure. Its thirds run from 6 cents wide on F, C and G to 22 cents on B, F♯ and C♯ and back: like Werckmeister III, but more evenly graded and centred on the same plain keys.

  5. ★ Research. Write an adaptive tuner: given the notes sounding, choose the pitches that minimise Part 5's roughness, with a penalty for moving a held note. Run it on the comma pump. How small can the penalty be before the pitch drifts?

    Pointers. This is the problem of Sethares's adaptive tuning (1994) and of commercial schemes such as Hermode tuning; see also Stange, Wick and Hinrichsen, "Playing music in just intonation: a dynamically adaptive tuning scheme" (Computer Music Journal, 2018), who model the notes as joined by springs. Roughness alone does not fix absolute pitch: transposing the whole chord can leave the objective unchanged. Reproducing the pump additionally requires a rule for preserving common tones. A large motion penalty preserves held pitches, but does not by itself impose equal temperament or anchor the tonic. Add an explicit pitch reference and specify how new notes enter. The optimization must then distribute the comma, and the open questions are perceptual: how fast may a held note glide before the glide is heard, and do listeners prefer the result?

Notes and sources

Sources

Books: J. M. Barbour, Tuning and Temperament: A Historical Survey (1951), for the tables of meantone and Werckmeister III; R. W. Duffin, How Equal Temperament Ruined Harmony (and Why You Should Care) (2007); W. A. Sethares, Tuning, Timbre, Spectrum, Scale (2nd ed., 2005); G. J. Cho, The Discovery of Musical Equal Temperament in China and Europe in the Sixteenth Century (2003); M. Lindley, Lutes, Viols and Temperaments (1984); N. H. Fletcher and T. D. Rossing, The Physics of Musical Instruments (2nd ed., 1998), ch. 12, for the inharmonicity of piano strings; R. Steblin, A History of Key Characteristics in the Eighteenth and Early Nineteenth Centuries (2nd ed., 2002), for Schubart.

Sources and papers: P. Aron, Toscanello in musica (1523); G. B. Benedetti, Diversarum speculationum mathematicarum et physicarum liber (1585), for the letters to Cipriano de Rore; Zhu Zaiyu, Lülü jingyi (1584–96); S. Stevin, Vande spiegheling der singconst (c. 1605; published 1884); M. Mersenne, Harmonie universelle (1636); A. Werckmeister, Musicalische Temperatur (1691); C. Huygens, "Lettre touchant le cycle harmonique" (1691); J. S. Bach, Das wohltemperirte Clavier (1722); C. F. D. Schubart, Ideen zu einer Ästhetik der Tonkunst (written 1784–85, published 1806); O. L. Railsback, "Scale temperament as applied to piano tuning", JASA 9 (1938); B. Lehman, "Bach's extraordinary temperament: our Rosetta Stone", Early Music 33 (2005), and the replies by M. Lindley and I. Ortgies and by J. O'Donnell, Early Music 34 (2006); D. M. Howard, "Intonation drift in a capella soprano, alto, tenor, bass quartet singing with key modulation", Journal of Voice 21 (2007); S. D'Amario, D. M. Howard, H. Daffern and N. Pennill, "A longitudinal study of intonation in an a cappella singing quintet", Journal of Voice 34 (2020); W. A. Sethares, "Adaptive tunings for musical scales", JASA 96 (1994).

  • H. Partch, Genesis of a Music (1949; 2nd ed., 1974): the 43-tone just scale of chapter 7's last beat, listed ratio by ratio in the scene; G. Loy, Musimathics, vol. 1 (2006), for the arithmetic of temperaments.
About this partfrom its README

Part 6 of a sixty-eight-part course in music (see the series plan and the syllabus). Part 5 modeled low roughness for harmonic tones where strong partials line up: 2:1, 3:2, 5:4. This part asks whether an instrument can have them all at once. It cannot, for a reason that lies in the integers, and every tuning system is a decision about where to put the error. The systems are Monochord's (explainer/music/monochord/tuning.py), exact where they can be and checked against Barbour's tables; every sound is computed in compute.py. Dates and attributions are the published ones, listed under Sources.

  • In tune, and sinking. One progression of four chords, sung four times in perfectly pure chords, ends 86 cents flat; the first chord and the last; Zhu Zaiyu's twelfth root of two (1584), to twenty-four decimal places; the plan.
  • 1. The circle that will not close. Twelve pure fifths, folded into one octave, and the thirteenth note: the Pythagorean comma, 531441/524288 = 23.46 cents; a worked example (can any number of fifths equal a number of octaves? never: odd against even); Pythagorean tuning, eleven pure fifths and a wolf of 678.5 cents; its thirds.
  • 2. The other comma. Four pure fifths against a pure third: the syntonic comma, 81/80 = 21.5 cents (an ear question); three pure thirds against an octave: the diesis, 128/125 = 41 cents; just intonation as a lattice of fifths and thirds; its own wolf, the fifth D to A at 40:27.
  • 3. The comma pump. A worked example: once round I–vi–ii–V–I in exact fractions (the D that goes with A is 10/9, not 9/8), and the tonic returns at 80/81; four rounds; Benedetti's letters; the question every keyboard has to answer.
  • 4. Pure thirds, and a wolf. Aron's meantone (1523); a worked example (each fifth gives up a quarter of the comma: 696.6 cents, the fourth root of five); the chord of C major in Pythagorean tuning, equal temperament and meantone; round the circle: a wolf fifth 36 cents wide and four thirds 41 cents wide; an ear question (the chord on C and on A flat); two centuries of use, and split keys.
  • 5. Well tempered. Werckmeister III (1691): the Pythagorean comma taken from four fifths; the major third in every key for four tunings; an ear question (the chords on C, E and F sharp: 4, 16 and 22 cents wide); key character; Bach's title (1722).
  • 6. Equal. Two cents from every fifth; the twelfth root of two; a worked example (a square root, a square root and a cube root; the first fret of a 650 mm guitar string is 36.5 mm from the nut); an ear question (a pure third and the piano's, 13.7 cents wide, beating ten times a second); a worked example (the fifth A3–E4 beats 0.74 times a second) and the tuner's table; three centuries to win.
  • 7. Why twelve? The best fifth and the best third of every equal division from 4 to 60; a worked example (the continued fraction of log₂(3/2): 1/2, 3/5, 7/12, 24/41, 31/53); five and seven as the black and the white keys; the major chord in 12, 19, 31 and 53 steps; Jing Fang, Huygens, and an organ with 31 notes to the octave.
  • 8. The piano's stretched octaves. Stiff strings have sharp partials (Part 1), so the smooth octave is a wide one (Part 5); an exact and a stretched octave on very stiff strings; a model with the shape of Railsback's curve (1938), from 20 cents flat at the bottom to 26 sharp at the top.
  • 9. What players do. Fixed and free instruments; four habits of good intonation; the open strings of a quartet, and the comma between the cello's C and the violin's E; do choirs drift? (Howard, 2007; D'Amario and colleagues, 2020); selected pitch references, distinguishing the modern A=415 Baroque convention from varied historical pitches.
  • 10. Frontier: tuning that moves. Adaptive tuning; Lehman's reading of the loops on Bach's title page (2005) and the replies; what is not known. ★ research problem.
  • Variation 6, recap and problems. The Tune with chords, a phrase at a time, in Pythagorean tuning, meantone in C, meantone in the wolf key, Werckmeister III, and 12, 19, 31 and 53 equal steps; the ledger; what we found; five problems; where it comes back; in practice; references; a plucked string, and Part 7.
What is computed and built

python -m videos.music.music6.compute (a few seconds) fills .cache/music6/.

Item What it computes Checked against
pump I–vi–ii–V–I four times in pure triads with common tones held; the tonic after each round every chord 4:5:6 or 10:12:15; 80/81 a round, exactly
circle twelve pure fifths folded into the octave; Pythagorean tuning's fifths and thirds 3¹²/2¹⁹; the wolf at 678.5 cents
syntonic (3/2)⁴ against 5/4; (5/4)³ against 2; the lattice of just intonation; the fifth D–A 81/80, 128/125, 40/27
meantone quarter-comma meantone: every fifth, third and the wolf; three tunings of C major Barbour's table (to 0.05 cent)
well the thirds and fifths of four tunings in every key; Werckmeister III Barbour's table
equal the twelfth root of two by integer arithmetic; errors; the tuner's beat rates; fret positions 24 decimals; F3–A3 at 6.93 beats a second
why12 the continued fraction of log₂(3/2); fifth and third errors of every division from 2 to 60 convergents 7/12, 24/41, 31/53
piano beatless octaves on strings with a model inharmonicity, summed across the keyboard the shape and size of Railsback's curve
tune Variation 6 in eight tunings; the error of each version's chords 1 cent (53 equal) to 31 cents (the wolf key)

Monochord's tuning layer is held against Barbour's tables and exact arithmetic in tests/music/test_tuning.py; this part's claims and clips in tests/music/test_music6.py.

Sounds. Fourteen clips, labelled on screen. synthesized: tones of seven partials in the proportions 1, 0.88, 0.88² … (the same tone as Part 5), sustained so that beats can be heard; for the piano's octave the partials are those of a stiff string. physical model: Part 1's plucked string, at the end. There are no recordings.

What the models are, and are not. The tunings are exact. The piano curve is a model: every octave beatless (judged by the 6:3 partials in the bass, 4:2 in the middle and 2:1 in the treble), on strings whose inharmonicity rises from 0.0001 in the tenor to 0.016 at the top, values of the size reported for grand pianos (Fletcher and Rossing, ch. 12); real tuners also weigh other intervals, and real curves are bumpier. The row of loops in chapter 10 is a sketch of the pattern on Bach's title page (three kinds of loop, eleven in all), not a facsimile. The history of pitch in chapter 9 shows typical values; pitch varied widely from place to place. The "adaptive" curve in chapter 10 is a sketch, and says so.

Companion material in this repository

The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
  1. Hook: one progression four times in pure chords, sinking 86 cents; Zhu Zaiyu; the plan.
  2. The circle that will not close: twelve fifths and the Pythagorean comma; a worked example (no power of three is a power of two); Pythagorean tuning and its wolf.
  3. The other comma: four fifths against a pure third (an ear question); three thirds against an octave; just intonation as a lattice; its wolf.
  4. The comma pump: a worked example in exact fractions; four rounds; Benedetti.
  5. Pure thirds, and a wolf: quarter-comma meantone (a worked example); three tunings of one chord; the wolf (an ear question); split keys.
  6. Well tempered: Werckmeister III; the thirds of four tunings in every key; key character (an ear question); Bach.
  7. Equal: the twelfth root of two; an abacus and a guitar (a worked example); what it costs (an ear question); the beats a tuner counts (a worked example); three centuries to win.
  8. Why twelve: every equal division from 4 to 60; the continued fraction of log₂(3/2) (a worked example); five and seven; 19, 31 and 53.
  9. The piano's stretched octaves: stiff strings; a model of Railsback's curve.
  10. What players do: free instruments; a quartet's open strings; do choirs drift; the pitch of A.
  11. Frontier: adaptive tuning; Bach's title page; what is not known.
  12. Variation 6: the Tune in eight tunings. Outro: problems, payoffs, and a plucked string.

Covers: the Pythagorean and syntonic commas and the diesis; just intonation as a lattice; meantone and its wolf; the well temperaments and key character; equal temperament (Zhu, Stevin), fret placement and tuning by beats; continued fractions of log₂(3/2) and why 12, 41 and 53; 19 and 31 for thirds; the comma pump; the piano's stretched octaves; how choirs and quartets adjust; concert pitch. Built and computed: tuning.py in exact rationals, checked against Barbour's tables; beat rates a tuner counts; the drift of a comma pump; a model of Railsback's curve. Variation 6: the Tune in Pythagorean, quarter-comma meantone (a good key and the wolf key), Werckmeister III, 12, 19, 31 and 53 equal divisions. Frontier: adaptive tuning; what tuning Bach meant (the 2005 hypothesis and its critics); temperaments as lattices (Part 33). Reading: Barbour; Duffin, How Equal Temperament Ruined Harmony; Sethares; Cho, The Discovery of Musical Equal Temperament in China and Europe.

Build the film

python -m videos.music.music6.compute        # the part's numbers, into .cache/music6
python tools/build.py music6                  # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py music6 Hook   # one chapter, silent, with a contact sheet

Scenes: videos/music/music6. Setup: see the course page. Source of these notes: the README and the scenes' narration.

Build it
python -m videos.music.music6.compute                          # numbers and sounds (a few seconds)
EXPLAINER_TTS=silent python tools/build.py music6 -q l --fps 15   # a silent-narration preview, with the sounds
python tools/qa_sound.py music6 --sync                         # the sound gates
python tools/dead_air.py renders/music6_480p.mp4 --sound music6   # no empty screen; no sound over a still one
python tools/lecture_length.py music6                          # 30 to 60 minutes, listening included
python tools/build.py music6                                   # 1080p30, narrated
python -m pytest -q tests/music                                # Monochord against its references; this part's claims and clips
python -m videos.music.labs 6                                  # the lab (writes a figure and a short WAV)