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)

In equal temperament, the tritone is exactly halfway up the octave: 6 notes up. Since going up an octave doubles the frequency, going up a tritone multiplies the frequency by √2. It's no coincidence that this is the irrational number that got Hippasus in trouble.

In Pythagorean tuning, going 6 steps up the scale doesn't match jumping up an octave and then going 6 steps down. We call one of them ♭5 and the other ♯4. They're both decent approximations to √2, built from powers of 2 and 3.

Their frequency ratio is the Pythagorean comma!

(17/n)

The tritone is sometimes called 'diabolus in musica' - the devil in music. Some say this interval was actually *banned* by the Catholic church! But that's another myth.

It could have gotten its name because it sounds so dissonant - but mathematically, the 'devil' here is that the square root of 2 is irrational. If we're trying to use only numbers built from powers of 2 and 3, we have to arbitrarily choose one to approximate √2.

In Pythagorean tuning we can choose either

1024/729 ≈ 1.4047

called the sharped fourth, ♯4, or

729/512 ≈ 1.4238

called the flatted fifth, ♭5, to be our tritone. In this chart I've chosen the ♭5.

No matter which you choose, one of the fifths in the circle of fifths will be noticeably smaller than the rest. It's called the 'wolf fifth' because it howls like a wolf.

You can hear a wolf fifth here:

https://www.youtube.com/watch?v=7lWINJ9Dxxg

🐺

(18/n)

If you're playing medieval music, you can easily avoid the wolf fifth: just don't play one of the two fifths that contains the tritone!

A more practical problem concerns the 'third' - the third note in the scale. Ideally this vibrates 5/4 as fast as the first. But in Pythagorean tuning it vibrates 81/64 times as fast. That's annoyingly high!

Sure, 81/64 is a rational number. But it's not the really *simple* rational number our ears are hoping for when we hear a third.

Indeed, Pythagorean tuning punishes the ear with some very complicated fractions. The first, fourth, fifth and octave are great. But the rest of the notes are not. There's no way that 243/128 sounds better than an irrational number!

In the 1300s, when thirds were becoming more important in music, theorists embraced a beautiful solution to this problem, called 'just intonation'.

I'll explain this in some later installments. Maybe tomorrow. The British call it 'Boxing Day', because after Christmas with your relatives you sometimes feel like punching someone. But since I'm having a quiet day with Lisa, tomorrow I'll probably just explain just intonation.

(19/n)

It's an amazing fact that in western composed music, harmony became important only around 1200 AD, when Perotin expanded the brand new use of two-part harmony to four-part harmony.

This put pressure on musicians to use a new tuning system - or rather, to revive an old tuning system. It's often called 'just intonation' (though experts will find that vague). We can get using a cool trick, though I doubt this is how it was originally discovered.

First, draw a hexagonal grid of notes. Put a note with frequency 1 in the middle. Label the other notes by saying that moving one step to the right multiplies the frequency of your note by 3/2, while going up and to the right multiplies it by 5/4.

(20/n)

Next, cut out a portion of the grid to use for our scale. We use this particular parallelogram - you'll soon see what's so great about it.

(21/n)

Now, multiply each number in our parallelogram by whatever power of 2 it takes to get a number between 1 and 2.

We do this because we want frequencies that lie within an octave, to be notes in a scale. Remember: if 1 is the note we started with, 2 is the note an octave up.

(22/n)

Now we want to curl up our parallelogram to get a torus. If we do this, gluing together opposite edges, there will be exactly 12 numbers on our torus - just right for a scale!

There's a problem: the numbers at the corners are not all equal. But they're pretty close! And they're close to √2 - the frequency of the tritone, the 'devil in music'.

25/18 = 1.3888....
45/32 = 1.40625
64/45 = 1.4222....
36/25 = 1.44

So we'll just pick one.

(23/n)

When we curl up our parallelogram to get a torus, there's also another problem. The numbers along the left edge aren't equal to the corresponding numbers at the right edge. But they're close! Each number at right is 81/80 times the corresponding number at left. I've drawn red lines connecting them.

So, we just one from each of these 4 pairs. We've already picked one number for all the corners, so we just need to do this for the remaining 2 pairs.

(24/n)

So, here are the various choices for notes in our scale!

For the tritone we have 4 choices. That's okay because this note sucks anyway. That is: in Western music from the 1300s, it was considered very dissonant. So there's no obviously best choice of how it should sound.

For the 2 we have two choices, and for the ♭7 we also have 2 choices. So there's a total of 16 possible scales here.

Regardless of how we make our choices, we'll get really nice simple fractions for the 1, ♭3, 3, 4, 5 ,♭6, 6, and 8. And that makes this approach, called 'just intonation', really great!

(If you like math: notice the 'up-down symmetry' in this whole setup. For example the minor second is 16/15, but the reciprocal of that is 15/16, which is the seventh... at least after we double it to get a number between 1 and 2, getting 15/8.)

(25/n)

Here's a chart of all possible just intonation scales: start at the top and take any route you want to the bottom. There are 16 possible routes.

A single step between notes in a 12-tone scale is called a 'semitone', since most white notes are two steps apart. In just intonation the semitones come in 4 different sizes, which is kind of annoying.

Notice that if we choose our route cleverly, we can completely avoid the large diatonic semitone. Or, we can avoid the greater chromatic semitone. But we can't avoid both. So, we can get a scale with just 3 sizes of semitone, but not fewer.

How should we choose???

(26/n)

This is the most commonly used form of just intonation, I think. It has a couple of nice features:

1) It has up-down symmetry except right next to the tritone in the middle, where this symmetry is impossible.

2) It uses 9/8 for the second rather than 10/9, which is a bit nicer: a simpler fraction.

3) It completely avoids the large diatonic semitone, which is the largest possible semitone.

These don’t single out this one scale. I’d like to find some nice features that only this one of the 16 possibilities has.

But let’s see what this scale looks like on the keyboard!

(27/n)

Here's the most common scale in just intonation!

The white notes are perhaps the most important here, since those give the 'major scale'. The fractions there are beautifully simple.

Well, the second (9/8) and seventh (15/8) are not so simple. But that's to be expected, since these notes are the most dissonant! Of these, the seventh was more important in the music of the 1300s, and even today. It's called the 'leading-tone', because we often play it right near the end of a piece of music, or a passage within a piece of music, and its dissonance leads us up to the octave, with a tremendous sense of relief.

(28/n)

Here's the really great thing about the white notes in just intonation. They form three groups, each with frequencies in the ratios

1 : 5/4 : 3/2

This pattern is called a 'major triad' and it's absolutely fundamental to music - perhaps not so much in the 1300s, but certainly as music unfolded later. Major triads became the bread and butter of music, and still are.

The fact that every white note - every note in the 7-note 'major scale' - lies in a mathematically perfect major triad is a GIGANTIC feature in favor of just intonation.

(29/n)

But let's take a final peek at the dark underbelly of just intonation: the tritone. As I mentioned, there are four choices of tritone. You can divide them into two pairs that are separated by a ratio of 81/80, or two pairs separated by a ratio of 128/125.

These numbers are fundamental glitches in the fabric of music. They have names! People have been thinking about them at least since Boethius around 500 AD, but probably earlier.

• The 'syntonic comma', 81/80, is all about trying to approximate a power of 3 by products of 2's and 5's.

• The 'lesser diesis', 128/125, is all about trying to approximate powers of 2 by powers of 5.

If these numbers were 1, music would be beautiful in a very simple way. But reality cannot be wished away.

And as we'll see, these numbers are lurking in the spacing between notes in just intonation - not just near the tritone, but everywhere!

(30/n)

Look! The four kinds of semitone in just intonation are related by the lesser diesis and syntonic comma!

In this chart, adding vectors corresponds to multiplying numbers. For example, the green arrow followed by the red one gives the dark blue one, so

25/24 × 81/80 = 135/138

Or in music terminology: the lesser chromatic semitone times the syntonic comma is the greater chromatic semitone.

And so on.

The parallelogram here is secretly related to the parallelogram we curled up to get the just intonation scale. Think about it! Music holds many mysteries.

(31/n)

Just intonation is great if you're playing in just one "key", always ending each passage with the note I've been calling 1. But when people started trying to "change keys", musicians were pressed into other tuning systems.

This is a long story, which I don't have time to tell right now. If you're curious, read my blog articles about it:

For more on Pythagorean tuning, read this:

https://johncarlosbaez.wordpress.com/2023/10/07/pythagorean-tuning/

For more on just intonation, read this series:

https://johncarlosbaez.wordpress.com/2023/10/30/just-intonation-part-1/

For more on quarter-comma meantone tuning, read this series:

https://johncarlosbaez.wordpress.com/2023/12/13/quarter-comma-meantone-part-1/

For more on well-tempered scales, read this series:

https://johncarlosbaez.wordpress.com/2024/01/11/well-temperaments-part-1/

And for more on equal temperament, read this series:

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

It's sad in a way that this historical development winds up with equal temperament: the most *boring* of all the systems, which is equally good, and thus equally bad, in every key. But the history of music is not done, and computers make it vastly easier than ever before to explore tuning systems.

What will come next? It's up to us. I hope next year you explore more of the wonders of music.

(32/n, n = 32)

@johncarlosbaez Do you know if anyone has ever done much with, er, *not* rolling the parallelogram up into a torus? Instead continuing the sequences of exact 3/2 and 5/4 steps indefinitely, and accepting that you will never get back exactly to an octave? Exact 1:2 ratios could still be used for harmonies within chords.
@johncarlosbaez This is definitely true for keyboard instruments and most ensembles, but most non-keyboard instruments have a "natural" key (eg. G for violin, which causes the lowest string to resonate on the fundamental and the next string to resonant on the 5th), and I reckon some very pedantic people playing solo instrumental music must tune a few cents off the standard tuning to match that
@johncarlosbaez Thank you for this! Unpacks music for me a little more... Can I ask if you can back up the truck a little, and explain WHY we have to use a power term to approximate the harmonic fraction we are aiming for for each of the notes? Is it because it's a series, and we have to continue it on?

@johncarlosbaez I wonder if (and to what degree) the math has influenced musical preferences in "the West".

Elsewhere, there are musical scales in which some notes don't fit into any nice mathematical scheme. E.g. the mode "rast" in Arabic music has two "off" notes (sometimes called e-half-flat and h-half-flat but they aren't really halves). I have been told by music historians that similar scales were used in Europe in the past, but given up in the move to polyphony. Did math play a role?

@johncarlosbaez What an _incredible_ thread ... very apropos of today's explores, as I just finished a blissful deep dive into group theory, generators (quartal/quintal stacks), non-generators and their connection to Messiaen modes, the incredible mathematical properties unique to 12-TET vs other TETs ... so many mysteries since childhood resolved with absolutely beautifully simple maths. Just stunned.
@johncarlosbaez
I always felt that the gap between a "kilobyte" of data in memory (actually a kibibyte = 1024 bytes) and a true kilobyte (1000 bytes) of data going over a network is like a comma in music. But I was only aware of the Pythagorean comma. Now I learned that the ratio 1024/1000 = 128/125 also has a name: "lesser diesis" (and according to Wikipedia also "enharmonic comma" or "augmented comma").

@hcschuetz - wow, that's really cool. So it's something people have been running into for millennia when seeking nontrivial solutions of

2ⁿ5ᵐ = 1

(namely 2⁷5⁻³ comes close).

@johncarlosbaez The I, IV, and V triads, aka tonic, subdominant, and dominant. This explains, to me, why those chords dominated (ahem) harmony at the end of the just intonation era. Thanks!
@johncarlosbaez doesn't step 7 and 8 have the same kind of semitone next to each other?

@semnosao - If you mean the steps 7-8 and 8-1, yes you're right! The second one takes us above the scale I was considering. So yeah. I wasn't thinking about going past the 8. I was just looking at the picture here.

I don't really think this business of never having two notes of the same size next to each other is musically important. I was just trying to find some properties that pick out the most popular of the 16 just intonation scales. Maybe there's a better way to do it.

@johncarlosbaez and b5-5 -> 5-b6 are both diatonic semitone

@semnosao - okay, so my idea was just crap! 😆

So, we'd need some other theory to justify this particular scale.

@johncarlosbaez typo? 65/45 -> 64/45 😬
@andrewg - definitely a typo, the number 65 has no place in this game! I'll fix it! Thanks. This will spare me some embarassment at my talk.
@johncarlosbaez A discrete manifold equipped with an approximate scalar field? That sounds like it could be useful for some other stuff too
@johncarlosbaez looking forward to the just intonation desserts
@johncarlosbaez looking forward to more on this.
My partner restored the Ellis Harmonical from Bate collection in Oxford. Intended to be an instrument to demonstrate Just Intonation.
@johncarlosbaez @johncarlosbaez but how did the practice of actually tuning instruments work? with just intonation, it's obvious: you can hear simple fractions, and hear the beat frequencies to eliminate to bring two notes into tune. this doesn't work with complicated fractions because you're basically aiming for a particular beat frequency and noisy harmonics. how could musicians 800 years ago accurately punish the ear with pythagorean tuning? I could imagine using external references, like tuning forks, but how could you calibrate these references to begin with?

@johncarlosbaez The Fisk-Nanney organ at Stanford Memorial Chapel is an interesting instrument, with both fifth-comma and well-tempered tunings (in a pipe organ!). The “Brustpositive and the Brustpedalia are fixed in meantone and offer two sub-semitones, or split sharps, per octave, D sharp/E flat and G sharp/A flat”

https://cbfisk.com/opus/opus-85/

https://orsl.stanford.edu/memorial-church-organs

(My Mom, a student of Herb Nanney, loved playing this organ.)

Opus 85 – CB Fisk

@dan131riley - Wow! That sounds really interesting to play. So there were separate rows of keys for the two tuning systems?

Fifth-comma meantone is new to me: I've spent a lot of time studying quarter-comma, and I've see third-comma and sixth-comma. But I now see someone has blogged positively about fifth-comma:

https://www.concertina.net/forums/index.php?%2Ftopic%2F21123-my-experience-with-15-comma-mean-tone-tuning%2F

"Well-tempered" raises the question: which of the many well-tempered systems?

My experience with 1/5 comma mean tone tuning

It's about a year since I asked for others' experience with using fifth comma mean tone tuning in another thread. The answers I received were sufficiently encouraging for me to take the plunge and have my 48 key Crabb Crane duet tuned to this temperament. I haven't regretted it for a moment. A br...

Concertina.net Discussion Forums
Tritone paradox - Wikipedia

@TonyVladusich Nice! Another example of the multistability of audio. Similar to Sine Wave Speech! And Thermal Grill illusion.

@troy_s @TonyVladusich - no, I hadn't heard of the tritone paradox. Thanks! I wonder what kind of person I am. Is there a YouTube video or website that will play the Shephard tone, so I can find out?

Nor have I heard of sine wave speech, nor the thermal grill illusion.

I'm still trying to wrap my head around tritone substitution.

https://johncarlosbaez.wordpress.com/2024/07/27/tritone-substitutions/

@johncarlosbaez "lump in the carpet" is a great analogy
@johncarlosbaez
Maybe you should stay pure,
but only go two fifth up and two fifths down, i.e.,
{♭7, 4, 1, 5, 2}
Kind of weird pentagram, that.
@christophmaier - I'll get into Pythagorean tuning next time, where they keep going up and down fifths until they hit trouble.

@johncarlosbaez Early tunings (up to 1600±) were based on the concept of pure intervals; perfect 5ths, to start with. The documented history comes from European church music; early folk music may have been different, but there is no way of knowing. But when keyboard instruments became usable, around 1500, tuning became a problem. Working through a circle of perfect 5ths to tune an early harpsichord or organ produced the Pythagorean comma: Starting on middle C and tuning 7 perfect 5ths, the ending C is not a perfect octave. If you use a system of perfect 3rds, then you wind up dealing with the syntonic comma.

So various tempered systems developed to work around the comma. <insert ½ semester on early keyboard tunings> I have tuned instruments in meantone and Werkmeister III systems. The idea of everything except octaves being "not pure" was a compromise to allow music to be played in any key.

The piano mechanism we know was developed by Erard in 1821, and improved through the early 19th century. In the 1840s, builders added a heavy iron frame to support high tension strings. <insert ¼ semester section on the history of keyboard construction>

The final decision to use A440 as a standard was only settled upon in 1939. Early music performers sometimes use A415 or A435.

(/music historian, organist, instrument builder)

@c_merriweather - My talk will get bogged down in the delightful intricacies of just intonation - I'm giving a talk in the math department and I think they'll like that - so it'll never reach quarter-comma meantone or well temperaments. But I had a lot of fun studying those, and should probably return to the latter.

I learned a lot from the website of the harpsichord maker Carey Beebe - maybe you know him:

https://www.hpschd.nu/index.html?nav/nav-4.html&t/welcome.html&https://www.hpschd.nu/tech/tmp/kirnberger.html

He offers distilled descriptions of different tuning systems in a way that a mathematician like myself can quickly absorb.

@johncarlosbaez All the math comes later, the people at the time tuned instruments by ear, as have I. I even built a monochord to illustrate the fractions involved in the overtone series.

The perfect intervals were in many ways easier to tune. And if in the proper key, the keyboards were able to match the singers, who were, and are, not limited by fixed tuning. To hear medieval and Renaissance music performed with historical tunings is amazing in its clarity.

I studied early and Renaissance music and early organ technique, so I got the full lecture.

@johncarlosbaez

One of the things that was hardest for me to get my head wrapped around was that we perceive log frequency. Hence the octave is a doubling of frequency, and everything else, where people talk about "adding a semi-tone" is actually *multiplying* by something. (In modern scales, multiplying by a power of 2^(1/12).)

Music theorists are not a mathematical tribe, and for many years I just *could* *not* understand the word salad they wrote about this!

But then some book or other whose title involved "music" and "physicists" explained it all with just a couple equations.

@weekend_editor - I hope that my talk will make sense to mathematicians. When I actually give it, I'll probably find that some things that seem obvious to me aren't obvious to others.

I had a lot of trouble explaining to my sister the concepts of "note" and "key". They sound obvious until you try to explain them - both those words mean at least two things.

@johncarlosbaez I don't know much about music but I am guessing these issues arise because we need to divide octaves into individual frequencies on the basis that this is necessary to create, for example, "keys" on instruments like pianos. You can't have an infinite number of keys in an octave on a piano.

But what about producing music through a computer? How the notation for such a thing would work, I have no clue but in theory I imagine every "chord" could be perfect?

@rozeboosje @johncarlosbaez

A lot of computer music doesn't exactly have notation. Instead it has a user interface.

Let's say you have a computer and want to make a very simple chord over A. You can go look for the frequency of the 5th note in the scale or you could just multiply 440 by 3/2. This direct use of fractions is called "just intonation".

The problem with doing this is that the third note in the scale in 12tet is way off from the ideal just intoned fraction. So if you have a perfectly in tune chord on C and then your melody goes to E, that E is going to sound really wrong.

So you could also just make all the notes in the scale just intoned, but if your music goes onto a key change, it can also sound off, unless you retune all your notes to be the just notes relative to the new key. All your As are now a new frequency. This can sound great, but its fiddly.

Changing all the notes in every chord relative to the bottom note in the chord also often sounds wrong and kind of unmoored. Its often better to stick with the scale that belongs to your key because the notes are more stable and you can more easily tell when you're getting to an important note.

There are many composers who write this way but its extra work so most people stick with 12tet.

@celesteh - do you know anyone who has written about the problems you just mentioned, and their solutions, e.g. how changing all the notes in every chord relative to the bottom note sounds unmoored, etc? I think these are really interesting problems for 21st-century music.

@johncarlosbaez

I need to look through my notes and can't today and theres a risk I may forget in the chaos I expect later today. I'll make a note, bit if you want to remind me that would be great.

I ran into these problems with my own experimentation and then talked about it with Ellen Fullman who told me about the unmoored thing and somewhere I do know where she learned this.

There's also keyboard tuning software from the late 80s and early 90s in MAX that had an octave of the keyboard set aside to tune the key, but this is another thing I need to search to find.

@johncarlosbaez

I think this also impacts organ tuning…

@johncarlosbaez

Kyle Gann hints at the rootedness of just tunings here: https://www.kylegann.com/tuning.html

"On a piano in just intonation, moving from one tonic to another changes the whole interval makeup of the key, and you get a really specific, visceral feel for where you are on the pitch map. That feeling disappears in bland, all-keys-the-same equal temperament."

Just Intonation Explained

@celesteh - Merry Christmas! I'll try to remember to remind you at a better time.

@johncarlosbaez
Once you have settled on 12, there is a much more mathematical way to look at scales and modes.
Just count the number of half steps, then consider where they land.
The minimum number of half-steps is 2. There are 3 distinct ways we can put 2 half-steps in the scale: (1 is a half step, 2 is a whole)
1122222 (call this A)
1212222 (B)
1221222 (C)

You can also pick your starting note. So in this notation, regular major (Ionian) is C1, starting with the first (zero-based) interval.
Locrian is C0,
Dorian C2,
Phrygian C3,
Lydian C4,
Mixolydian C5,
Aeolian C6.

It seems like A and B are much rarer. Neopolitan Major is A1, Lydia Minor is A4, Locrian Major is A5, Super Locrian is B0.

And the Melodic Minor is B when ascending, C when descending.

Then, of course, you can add more half steps.
The Blues scale is 12212112. And trivially the chromatic scale is 111111111111.

Anyway that's how I would have defined everything if I had gotten to decide. 😂