# Pythagorean Tuning

#### What sounds good to us?

Have you ever considered why some sounds are pleasing and others grating? Or why some chords sound sad while others sound happy? On the one hand, it might seems like these perceptions are matters of cultural inheritance. We associate minor keys with sad lyrics or emotionally heavy scenes in movies and shows, while we associate major keys with more joyful lyrics and scenes. But it’s worth asking whether these associations are entirely cultural in nature. Are there any universal musical experiences? If so, how might we use mathematics to explain that experience?

While cultural conditioning certainly plays a profound role in how we experience music, a mathematical investigation of music might also provide some insight into why we hear things the way we do. The Western (European) musical tradition is, for the most part, centered around the idea of the major scale - a set of seven notes. Most of the popular music we’ve ever heard is made of up just seven notes. The roots of this special set of notes can be traced back to Pythagorus.

Of course with all of these types historical narratives, it’s introduction to note that Pythagorus likely wasn’t the first to actually do this. Even the famous Pythagorean Theorem ($$a^2 + b^2 = c^2$$) has been discovered in Babylonian and Chinese texts that predate Pythagorus by centuries or more.

# 2 The Pythagorean Scale

In the sixth century BCE, Pythagorus discovered a remarkably simple way to generate pleasing sounds: First, take two strings of equal thickness and place them under equal tension. If the ratio of the lengths of the two strings can be expressed with small integer values, the sound that results when the two are played together will be pleasing to the ear. For example, if the strings are of lengths 40 cm and 20 cm, the ratio is $$2:1$$. If the strings are of lengths 30 cm and 20 cm, the ratio is $$3:2$$. In both cases, we’ll get a very pleasing sound if we play the strings simultaneously. These two ratios form the basis for the Pythagorean scale - $$2:1$$ and $$3:2$$.

• An octave will refer to a ratio of 2:1.

• A perfect fifth will refer to a ratio of 3:2.

• A scale is a collection of notes, usually ordered by frequency or pitch.

## 2.1 Octaves

When two frequencies are an octave apart, we say that they are the same note. So, anytime we double or halve a frequency, we call it the same note. For example, the frequencies of 220Hz, 440Hz, 880Hz all correspond to the note we call $$A$$ (we’ll discuss modern note-naming soon).

### 2.1.1 Example

Start with a frequency of $$f = 125$$ Hz.

• To go up one octave, we multiply $$f$$ by $$2$$: $$2(125) = 250$$ Hz.

• To go down one octave, we multiply $$f$$ by $$\frac12$$ (or divide by $$2$$): $$\frac12 (125) = 62.5$$ Hz.

• To go up by six octaves, we multiply by $$2$$ six times, or we can just multiply by $$2^6$$: $$2^6 f = 64 (125) = 8000$$ Hz.

### 2.1.2 Exercise

Start with frequency $$f = 300$$ Hz.

Compute the frequency one octave up from $$f$$ and the frequency one octave down from $$f$$.

One octave up: $$2f = 600$$ Hz.

One octave down: $$\frac12 f = 15o$$ Hz.

### 2.1.3 Exercise

Start with frequency $$f = 50$$ Hz. Compute the frequency four octaves up from $$f$$.

To go four octaves up, we have to double the frequency four times:

$2\cdot2\cdot2\cdot2\cdot f = 16 f = 800 \text{ Hz}.$

### 2.1.4 Exercise

Start with a frequency of $$f = 2000$$ Hz. Compute the frequency five octaves below $$f$$.

To go five octaves down, we have to halve the frequency five times:

$\frac12 \cdot \frac12 \cdot \frac12 \cdot \frac12 \cdot \frac12 \cdot f = \left(\frac12\right)^5 f = 62.5 \text{ Hz.}$

We can generalize the work we did in these exercises as follows:

To go up by $$n$$ octaves, we multiply a given frequency by $$2^n$$.

To go down by $$n$$ octaves, we multiply a given frequency by $${\left(\frac12\right)}^n$$ or divide by $$2^n$$.

## 2.2 Perfect Fifths

The second ratio that Pythagorus identified as yielding pleasing sounds is $$3:2$$, which we now call a perfect fifth.

### 2.2.1 Example

Let’s start with a frequency of $$f = 220$$ Hz.

• To go up a perfect fifth, we multiply $$f$$ by $$\frac32$$: $$\frac32(220) = 330$$ Hz.

• To go down a perfect fifth, we divide $$f$$ by $$\frac32$$, which is the same as multiplying by $$\frac23$$: $$\frac23(220) = 146.67$$ Hz.

### 2.2.2 Exercise

Start with $$f = 300$$ Hz. Compute the frequency one perfect fifth above $$f$$.

$\frac32 f = \frac32 (300) = 450 \text{ Hz}$

### 2.2.3 Exercise

Start with $$f = 150$$ Hz. Compute the frequency one perfect fifth below $$f$$.

$\frac23 f = \frac23 (150) = 100 \text{ Hz}$

### 2.2.4 Exercise

Start with $$f = 110$$ Hz. Compute the frequency three perfect fifths above $$f$$.

$\left( \frac{3}{2} \right)^3 f = \frac{27}{8} (110) = 371.25 \text{ Hz}$

We can generalize the work we did in these exercises as follows:

To go up by $$n$$ perfect fifths, we multiply a given frequency by $$\left(\frac32\right)^n$$.

To go down by $$n$$ octaves, we multiply a given frequency by $$\left(\frac23\right)^n$$..

## 2.3 Recreating the Pythagorean Scale

This activity is going to have two parts: First, we’ll come up with a set of fractions that we can use to create a scale using the Pythagorean approach. Then, we’ll choose a root frequency and multiply it by our fractions to get a set of frequencies.

### 2.3.1 Pythagorean Ratios

Remember that a ratio of $$2:1$$ is an octave and that if two frequencies are an octave apart we consider them to be the same note. So, we’ll begin by finding fractions between $$1$$ and $$2$$ that we can form using only $$2, \frac12, \frac32, \text{ and } \frac23$$. In other words, there are two rules:

1. We multiply by $$\frac32$$ or $$\frac23$$ to get a new note.
2. If we get a number less than $$1$$ or greater than $$2$$, we multiply by $$2$$ or $$\frac12$$ to get a fraction between $$1$$ and $$2$$.
• To make it easier to visualize, we’ll put everything on a number line extending from $$0$$ to $$1$$ with $$\frac32$$ in the middle.
• Now, let’s multiply $$3/2$$ by itself:

$\frac32\cdot\frac32 = \frac94$

Since $$9/4$$ is greater than $$2$$, we need to bring it down by one octave - that is, we need to multiply by $$1/2$$:

$\frac94\cdot\frac12 = \frac98$

• Let’s repeat that. Multiply by $$3/2$$ again: $\frac98\cdot\frac32 = \frac{27}{16} < 2$
• And again: $$\frac{27}{16}\cdot\frac32 = \frac{81}{32}$$ This is greater than $$2$$, so we drop it by an octave: $\frac{81}{32}\cdot\frac12 = \frac{81}{64}$

### 2.3.2 Coding the Pythagorean Scale

Now that we have a set of fractions to work with, we’ll use the coding platform, Sonic Pi, to apply these fractions to audible frequencies. Sonic Pi is available for both Windows and OS X. Once you’ve downloaded it, you can go through the first few modules in the tutorial to familiarize yourself with the interface and some of the basic commands.

For this first activity, we’ll be using two simple commands: play and sleep. The play command will play a single tone. Test it out by entering the following in a blank code editor window and then hitting Run:

play hz\_to\_midi(200)

This command will generate a tone of 200 Hz.

Let’s take 200 Hz to be our starting note, or root. We can multiply each of the fractions on our number line by 200 to get a set of frequencies. For example:

• $$200\cdot\frac32 = 300$$

• $$200\cdot\frac98 = 225$$

Repeating this for all of the fractions we came up with above, we get the following: 200 Hz, 225 Hz, 253.125 Hz, 300 Hz, 337.5 Hz

## 2.4 Pythagorean Diatonic Scale

A scale is a collection of notes ordered by frequency (lowest to highest). The Pythagorean Diatonic Scale follows the Pythagorean construction you experimented with above to create a scale with 7 distinct notes in an octave. We consider the octave to be the same note as the root (our starting frequency).

Root 2 3 4 5 6 7 Octave
1 9/8 81/64 4/3 3/2 27/16 243/128 2

Notice that the fourth note has a ratio of $$4:3$$. Rather than using $$3/2$$, we flip it around to $$2/3$$ and then, because it’s less than 1, we multiply by 2 to get a fraction between 1 and 2.

$\frac23\cdot\frac21 = \frac43$

All of the other ratios follow the exact construction you experimented with above - i.e., they are all powers of $$3/2$$ times powers of $$1/2$$:

$\left(\frac32\right)^m\left(\frac12\right)^n$

For instance,

$\frac98 = \left(\frac32\right)^2\left(\frac12\right)$ $\frac{81}{64} = \left(\frac32\right)^4\left(\frac12\right)^2$

We could also go backwards by using negative integer exponents. E.g.,

$\left(\frac32\right)^{-2}\left(\frac12\right)^{-2} = \frac{16}{9}$

$\left(\frac32\right)^{-3}\left(\frac12\right)^{-3} = \frac{32}{27}$

This kind of construction could be carried on indefinitely. In line with modern Western musical convention, we’ll stop at twelve ratios constructed this way:

Root 2 3 4 5 6 7 8 9 10 11 12 Octave
$$1$$ $$\frac{256}{243}$$ $$\frac{9}{8}$$ $$\frac{32}{27}$$ $$\frac{81}{64}$$ $$\frac{4}{3}$$ $$\frac{729}{512}$$ $$\frac32$$ $$\frac{128}{81}$$ $$\frac{27}{16}$$ $$\frac{16}{9}$$ $$\frac{243}{128}$$ $$2$$

# 3 Just intonation: revising the Pythagorean Scale

While the Pythagorean approach of using only the very pleasing ratios of $$2:1$$ and $$3:2$$ to construct a scale seems sensible, we might notice that some of the ratios we end up with in this $$12$$-note system have fairly large numerators and denominators: look at the second, fifth, seventh, and twelfth notes, for example.

Pythagorus was right that small ratios produce pleasing sounds. The reason has to do with the overtone series we discussed in the previous chapter.

## 3.1 Overtones and Intervals

Consider a violin string vibrating at $$f = 220$$ Hz. The pitch we hear corresponds to $$220$$ Hz, but this is only one of many vibrations coming from the violin. Recall that the violin’s timbre corresponds to the many overtones it generates. These overtones, as we saw, are all whole-number multiples of $$220$$ Hz. Let’s list the first several overtones:

$$f$$ $$2f$$ $$3f$$ $$4f$$ $$5f$$ $$6f$$
$$220$$ $$440$$ $$660$$ $$880$$ $$1100$$ $$1320$$

Let’s look at the ratios between these overtones:

• Notice that the first overtone is one octave higher than $$f$$.

• The second overtone, $$3f$$, is a perfect fifth above the octave, $$2f$$.

### 3.1.1 Exercise

There are many more octaves and perfect fifths embedded in the overtone series. List two more octave pairs and two more perfect fifth pairs. You may have to write out more of the overtone series to do so.

You should state which overtones make a pair, and what the frequencies are.

E.g.,

• $$f$$ and $$2f$$ are an octave apart because $$2f$$ is $$2 \cdot f$$ (of course). The frequencies are $$220$$ Hz and $$440$$ Hz.

• $$2f$$ and $$3f$$ are a perfect fifth apart because $$3f = \frac32 \cdot 2f$$. The frequencies are $$440$$ Hz and $$660$$ Hz.

Octave pairs:

• $$2f$$ Hz and $$4f$$ are an octave pair.

• $$3f$$ and $$6f$$ are an octave pair.

• $$4f$$ and $$8f$$ are an octave pair.

Perfect fifth pairs:

• $$4f$$ and $$6f$$

• $$6f$$ and $$9f$$

Isn’t this incredible? Within a single note played by a violin or sung by a human, there are octaves and perfect fifths. So, is this why these intervals sound pleasing to us? Because they are inherent in all naturally occurring pitched sounds? Think on it.

## 3.2 Just Intonation

What about the large-number ratios in the Pythagorean scale? To find a ratio of $$81 : 64$$, we would have to go out $$80$$ overtones! For a frequency of $$220$$ Hz, which isn’t all that high, the $$80^{\text{th}}$$ overtone would have a frequency of $$17,820$$ Hz. This is on the very edge of the range of human hearing and is unbelievably high-pitched.

So, this suggests that, even though the Pythagorean method uses small-number ratios as building blocks, some of the resulting ratios are really “out of tune” with respect to naturally occurring overtones. Another mathematician and music theorist from the ancient world, proposed an alternative to the Pythagorean scale. Ptolemy, who was born around 100 AD, came up with a scale we now refer to as the justly tuned major scale - also called the just major scale.

Rather than use the perfect fifth to construct all of the notes within the octave, the justly tuned major scale prioritizes small number ratios. These ratios aren’t too far off from the one’s in the Pythagorean major scale, but, by using much small numbers, we get a scale that is more in tune with the overtone series. For example, rather than multiplying or root note by $$\frac{81}{64}$$ to get our fifth note, we use $$\frac{5}{4}$$ instead. In comparing these, we find that $$\frac{81}{64} = 1.265625$$, whereas $$\frac54 = 1.25$$. These are quite close, but the ratio of $$5:4$$ can be found within the first four overtones.

Here’s the full justly tuned major scale:

Root 2 3 4 5 6 7 Octave
1 9/8 5/4 4/3 3/2 5/3 15/8 2

### 3.2.1 Exercise

Start with a root frequency of $$f = 220$$ Hz.

Write out the frequencies for each note in the Pythagorean scale and the just major scale. Put these in a table.

### 3.2.2 Exercise

The root, third note, and fifth note, form what we call a major triad - we’ll learn more about this in the next chapter. Go to frequency generator applet (at the bottom of the page) to hear a major chord in each of three tuning systems (well temperament is the same as just intonation).

Compute the ratio between the third and fifth in each tuning system.