Arithmetic and Music

Taking a break from all this physics, I thought I’d talk a little about music and some related mathematical coincidences. One of the fundamental concepts of music is that of consonance and dissonance. Consonant things sound nice when played together and dissonant things do not. For example, if you play two Cs together on a piano (or your instrument of choice), it’s a pleasing sound, but playing a C and an F# together sound unpleasant.

It could have been the case that what we find pleasing and displeasing on this simple level could be purely random, but our tastes align with a very elementary mathematical fact. Ratios of frequencies that involve small numbers in the denominator sound good. Take a 2:1 ratio, for example. That is an octave. The A above middle C on a piano is usually tuned to around 440 Hz. An octave above that is 880 Hz, and an octave below that is 220 Hz.

Sticking with ones in the denominator, we next have a 3:1 ratio. This would be somewhere between one octave and two octaves. To keep things in the same octave, we can go down an octave from 3:1 and examine the ratio of 3:2. From the A on the piano, that is a frequency of 660 Hz. This interval is called a perfect fifth. When a singer sings a fifth, for example, they will usually sing a perfect fifth. I think that violinists and other fretless instruments also play perfect fifths, too, but I don’t remember. You will not find any key on a modern piano with the frequency of 660 Hz, however.

If we keep sticking to ratios between 1:1 and 2:1, the next smallest denominator is 4:3. This is a perfect fourth. If you pick a note and go a perfect fourth above it and follow that with a perfect fifth, you find that you are at a ratio of 3:2 * 4:3 = 2:1, an octave. Intervals which obey this relation are called complementary intervals. The octave, the perfect fourth and the perfect fifth are generally the most pleasent sounding intervals. Beyond this, there are ratios such as 5:3, a major sixth, 5:4, a major third, filling out much of the usual musical scale. Such a scale is called just intonation.

But where does the scale come from? Why stop at some particular point? Since the fourth and the fifth are complementary, we can pick one and focus on the fifth. What happens if we keep going up by fifths? We get a sequence of ratios that look like 3^n : 2^n. A funny thing happens when n=12. We can compute

(3/2)^12 = 129.75

This is remarkably close to 2^7. If we go up twelve fifths, we almost end up at seven octaves. Two fifths, for example, gives a ratio of 9:4. Going down and octave from there gives us 9:8 which is a major second. Going up again gives us 27:16 which has a pretty big denominator. However, 27/16 = 1.69 which is pretty close to 5/3=1.67 or a major sixth. Up a fifth and down an octave from there is 81/64 = 1.27 which isn’t all that close to the major third, but up a fifth from 5:3 (as opposed to 27:16) hits it on the nose.

This coincidence, that 129.75 is almost 128 tells us that we should think about a 12 note scale. We pick a note, called the tonic, on which to start the scale. If we choose C and go up and down by fifths, we get

Gb – Db – Ab – Eb – Bb – F – C – G – D – A – E – B – F#

The notes Gb and F# are declared to be the same even though they differ by the factor of 3^12/2^19 = 1.014. This is called Pythagorean tuning, and the above sequence of notes (with the ends connected) is called the circle of fifths. Be construction, we get our fifths and fourths perfect. The major second and minor seventh are also hit on the nose. Others, like the major third (a pretty important interval) aren’t so great.

You can start fudging to get closer to just intonation. Just put the notes you want back to their nice ratios. But there’s no reason to only look at intervals starting at the tonic. As you fudge, the other fifths won’t sound so good anymore. The particularly bad intervals in various tunings are called “wolves”. If you change keys, you hit these intervals a lot. Back when, music in different keys actually sounded different.

There’s a conservation of trouble here. That 129.75 will always show up somewhere. The modern perspective is to put it everywhere. There are twelve notes in the scale, and we want the octave to be 2:1. Thus, we make each half-step (twelve half-steps form an octave) have a ratio of 2^(1/12):1. This is called equitempered tuning. The octave is still there, but all the other intervals have been fudged. For example, a fifth is now a ratio of 1.498:1 as opposed to 1.5:1. A fourth is 1.335:1 as opposed to 4:3. And all the fifths and fourths are equally close to the perfect interval. How about the major third that the Pythagorean tuning had trouble with? 1.26:1 as opposed to 1.25:1. Major sixth? 1:68:1 as opposed to 1.67:1. Not so bad, all things considered.

Intervals are cool and all that, but music is a lot more than that. At this point, we’ve made ourselves a chromatic scale:

C – C# – D – D# – E – F – F# – G – G# – A – A# – B – C

but almost no music is played in this scale. Instead, some subset of notes is chosen. The major diatonic scale starting on C, for example, is

C – D – E – F – G – A – B – C

and the natural minor scale is

C – D – Eb – F – G – Ab – Bb – C

There are other scales, too, but let’s stick with these. One explanation for them is that this sequence of notes appears in the circle of fifths. Starting at F, for example, one finds the major scale and starting at Eb gives the minor scale. I don’t find this particularly satisfying, so I’m going to talk about another “explanation” which I found on the internet (I forget the page, unfortunately).

Before getting to that, we need to talk about chords. We like small denominators, and the smallest denominator one can have is one. Thus, it helps to look at the sequence of ratios:

2:1 3:1 4:1 5:1 …

The first is the octave. The rest I will transpose to be less than one octave. The second becomes 3:2 which is the fifth. The third is another octave, and the fourth is 5:4, or the major third. These three notes form the major triad. We can keep going. 6:1 is the fifth again. 7:1 goes to 7/4 = 1.75. This is somewhere between a minor and major seventh. Depending on this choice, we get a dominant seventh chord or a major seventh chord. After this the chords get pretty busy, but the next new note is 9/8, the major second. This is a 9-chord. 11/8=1.375 is reasonably close to the perfect fourth, 4/3, which would make an 11-chord, but at this point we’re pretty dissonant.

The three most important notes in a scale are the tonic, the perfect fourth and the perfect fifth. If we add in the major triads on these notes, we get exactly the major scale. This is secretly the circle of fifths in disguise, really, but I think it makes the role of the tonic much more clear.

What about the minor triad, then, where the major third is replaced by a minor third? I don’t know if there’s a pat answer for that one. But, if you wanted to introduce some more dissonance in the major triad, the third would be the place to do it. If you take the minor triads on the tonic, fourth and fifth, you get the natural minor scale. The other minor scales are modifications that get you that nice major seventh note to lead into the tonic.

One last scale worth mentioning is the pentatonic scale. If you take five consecutive notes in the circle of fifths, you get the major pentatonic. It consists of the tonic, major second, major third, perfect fifth and major sixth. In C, that is

C – D – E – G – A – C

We can make a minor pentatonic by analogy to the major and minor diatonic scales. The natural minor in A has the same notes as the major scale in C. In general, the minor scale with the same notes as a given major scale (starting a minor third below the tonic of the major scale) is called the relative minor. So, we can define the minor pentatonic scale in C to be the same as the major pentatonic scale in Eb. Thus, we have

C – Eb – F – G – Bb – C

The pentatonic scale is great because you can play almost anything in it, and it won’t sound so bad. Much of pop music improvisation is done in this scale, in fact. It’s also the case that the black notes on a piano exactly form a pentatonic scale. This actually isn’t a coincidence given the discussion of the circle of fifths. There are twelve notes in the circle of fifths, forming the chromatic scale. If we take seven consecutive ones, we get the major diatonic scale which, in C, is the white notes on the piano. We have five notes left over, then, the black notes forming a nice pentatonic scale. So go nuts on the black notes.