Merry Xmas Eve!

I'm not Christian, I'm Mathematician, but I love Xmas, Ymas and Zmas. I'm giving a talk on the math of tuning systems and I thought I'd share it here as a kind of present to y'all.

I'll start with the basics today and do the more advanced part tomorrow. But I hope even the basics contain a few twists that not everyone knows.

You can read my slides here:

http://math.ucr.edu/home/baez/tuning_talk/tuning_talk.pdf

but they don't contain all the stuff I'm saying here... the stuff I'll say out loud in my talk.

(1/n)

If you look at a piano keyboard you'll see groups of 2 black notes alternating with groups of 3. So the pattern repeats after 5 black notes, but if you count you'll see there are also 7 white notes in this repetitive pattern. So: the pattern repeats each 12 notes.

Some people who never play the piano claim it would be easier if had all white keys, or simply white alternating with black. But in fact the pattern makes it easier to keep track of where you are - and it's not arbitrary, it's musically significant.

(2/n)

Starting at any note and going up 12 notes, we reach a note whose frequency is almost exactly double the one we started with. Other spacings correspond to other frequency ratios.

I don't want to overwhelm you with numbers. So I'm only showing you a few of the simplest and most important ratios. These are really worth remembering.

(3/ n)

We give the notes letter names. This goes back at least to Boethius, the guy famous for writing The Consolations of Philosophy before he was tortured and killed at the order of Theodoric the Great. (Yeah, "Great".) Boethius was a counselor to Theodoric, but he really would have done better to stay out of politics - he was quite good at math and music theory.

Boethius may be the reason the lowest note on the piano is called A. We now repeat the names of the white notes as shown in the picture: seven white notes A,B,C,D,E,F,G and then it repeats.

[Whoop, Lisa is making me get up, make breakfast and go to the gym. I'll continue this later.]

(4/n)

So the scale used to start at A, using only white notes. But due to the irregular spacing of white notes, a scale of all white notes sounds different depending on where you start. Starting at A gives you the "minor scale" or "Aeolian mode", which sounds kinda sad. Now we often start at C, since that gives us the scale most people like best: the "major" scale.

(Good musicians start wherever they want, and get different sounds that way. But "C major" is like the vanilla ice cream of scales - now. It wasn't always this way.)

(5/n)

From the late 1100s to about 1600 people called describe pitches that lie outside 7-tone system "musica ficta" ("false" or "fictitious") notes. But gradually these notes - the black keys on the piano if you're playing in C major - became more accepted.

To keep things simple for mathematicians, I'll usually denote these with the "flat" symbol, ♭. For example, G♭ is the black note one down from the white note G.

(Musicians really need both flats and sharps, and they'd also call G♭ something else: F♯. I'll actually need both G♭ and F♯ at some points in this talk!)

(6/n)

Since starting the scale with the letter C takes a little practice, I'll do it a different way that mathematicians may like better. I'll start with 1 and count up. Musicians put little hats on these numbers, and I'll do that.

For example, we'll call the fifth white note up the scale the "fifth" and write it as a 5 with a little hat.

(7/n)

Now for the math of tuning systems!

The big question is: how do we choose the frequency of each note? This is literally how many times per second the air vibrates, when we play that note.

Since 1850, by far the most common method for tuning keyboards has been "12-tone equal temperament". Here we divide each octave into 12 equal parts.

What do I mean by this, exactly? I mean that each note on the piano produces a sound that vibrates faster than the note directly below it by a factor of the 12th root of 2.

But we can contemplate "N-tone equal temperament" for N = 1, 2, 3, .... - and some people do use these other tuning systems!

(8/n)

Here's a picture of the most popular modern tuning system: 12-tone equal temperament. As we march around clockwise, each note has a frequency of 2^{1/12} times the note directly before it.

When we go all the way around the circle, we've gone up an octave. That is, we've reached a frequency that's TWICE the one we started with.

But a note that's an octave higher sounds "the same, only higher". So in a funny way we're back where we started.

(9/n)

But now for a big question: why do we use a scale with 12 notes?

To start answering, notice that we actually use three scales: one with 5 notes (the black keys), one with 7 (the white keys) and one with 12 (all the keys).

As mathematicians we can notice a pattern here.

(10/n)

What's so good about scales with 5, 7 or 12 notes?

A crucial clue seems to be the "fifth". If you go up to the fifth white note here, its frequency is about 3/2 times the first. This is one of the simplest fractions, and it sounds incredibly simple and pure. So it's important. It's a dominant force in western music.

(11/n)

We can make a chart to see how close an approximation to the fraction 3/2 we get in a scale with N equally spaced notes.

N = 5 does better than any scale with fewer notes!

N = 7 does better than any scale with fewer notes!

N = 12 does better than any scale with fewer notes! And it does *way* better. To beat it, we have to go all the way up to N = 29 - and even that is only slightly better.

(12/n)

Here's a chart of how close we can get to a frequency ratio of 3/2 using N-tone equal temperament.

See how great 12-tone equal temperament is?

There are also some neat patterns. See the stripes of even numbers and stripes of odd numbers? That's not a coincidence. For more charts like this, and much more cool stuff along these lines, go here:

https://johncarlosbaez.wordpress.com/2023/10/19/perfect-fifths-in-equal-tempered-scales-part-2/

(13/n)

Here's the "star of fifths" in 12-tone equal temperament!

I'll quit here for now, and continue on Xmas.

(14/n)

Merry Xmas! My dream of the internet includes a lot of people giving each other gifts. Mastodon comes close to that. I'd like to thank everyone on Mastodon for all the you've gifts you've given each other over the year. Here are some presents in return....

Yesterday I talked about 12-tone equal temperament: the tuning system where we chop the octave into 12 equal parts.

This has been the most popular tuning system since maybe 1810, or definitely by 1850. But it's mathematically the most boring of the tuning systems that have dominated Western music since the Middle Ages. Now let's go back much earlier, to Pythagorean tuning.

When you chop the octave into 12 equal parts, the frequency ratios of all your notes are irrational numbers... *except* when you go up or down some number of octaves.

The Pythagoreans disliked irrational numbers. People even say they drowned Hippasus at sea after he proved that the square root of 2 is irrational! That's just a myth, but it illustrates how people connected Pythagoras to a love of rational numbers. In Pythagorean tuning, people wanted a lot of frequency ratios of 3/2.

In equal temperament, where we chop the octave into 12 equal parts, when we start at any note and go up 7 of these parts (a so-called "fifth"), we reach a note that vibrates about 1.4981 times as fast. That's close enough to 3/2 for most ears. But it's not the Pythagorean ideal!

As we'll see, seeking the Pythagorean ideal causes trouble. It will unleash the devil in music.

(15/n)

Start at some note and keep multiplying the frequency by 3/2, like a good Pythagorean. After doing this 12 times, you reach a note that's close to 7 octaves higher. But not exactly, since the 12th power of 3/2 is

129.746338

which is a bit more than

2⁷ = 128

The ratio of these two is called the 'Pythagorean comma':

p = (3/2)^12 / 2⁷ = 3¹² / 2¹⁹ ≈ 1.0136

This is like an unavoidable lump in the carpet when you use Pythagorean tuning.

It's good to stick the lump in your carpet under your couch. And it's good to stick the Pythagorean comma near the so-called 'tritone' - a very dissonant note that you'd tend to avoid in medieval music. This note is halfway around the circle of fifths.

In Pythagorean tuning, going 6 steps clockwise around the circle of fifths doesn't give you the same note as going 6 steps counterclockwise! We call one of them ♭5 and the other ♯4.

Their frequency ratio is the Pythagorean comma!

(16/n)

@johncarlosbaez "lump in the carpet" is a great analogy