Try   HackMD

The Pythagorean Means: a very short intro to Just Intonation

~ euwbah Jan 8 2024


Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

The Pythagorean means are three types of "averages" that served as cornerstones of the classical Greek concept of musical intonation (and geometry). It's super helpful to build an intuition for these before diving into Archytas, Ptolemy, etc and really useful for just intonation in general.

0. Clearing misconceptions

We perceive musical intervals as the ratios between frequencies, not the difference between frequencies.

The interval between 100 Hz and 200 Hz is an octave (2:1 frequency ratio), but that of between 200 Hz and 300 Hz, although again separated by 100 hz, is not an octave, but a perfect fifth, because the ratio is 3:2.

The modern measure of cents and semitones are based on the logarithmic scale (log base 2, where 2 represents the octave as a unit interval because of octave equivalence), to match our perception of hearing the 'size' of intervals as the ratio between frequencies, not the 'difference' between frequencies.

Interval=aHzbHzOctave=21=200Hz100Hz=400Hz200Hz=Fifth=32=300Hz200Hz=600Hz400Hz=Perceived Octaves=log2(ab)Semitones=12log2(ab)Cents=1200log2(ab)

1. The Monochord (lit: one string)

For examples' sake, consider the Monochord below with a 100 cm long string that sounds at 100 Hz when plucked (numbers were made nicer to make examples easier to follow).

This was both a musical and scientific instrument, and supposedly one the first ever recorded experiments that concerned the scientific method & math applied to music.

Let's say we have a 100cm long string that sounds a 100 Hz when plucked. By halving the length of this string to 50 cm, we get the note one octave above, 200 Hz (e.g. pressing down on the 12th fret on a guitar). Doubling the frequency of a sound gives the simplest possible musical interval (octave) where the frequency of two notes are in a

2:1 relationship.

If we were to write the start of each waveform period as a note, the sheet music would look something like this, sped up to 100 beats per second:

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

This interval relationship is so simple that these two notes will have been given the same nominal name, distinguished only by octave number (e.g. A3 (220 Hz) vs A4 (440 Hz) is in the

2:1 ratio).

2. The Harmonic Mean

The next 3 sections that introduce the 3 classical means are attempts at this simple question: What if we want to find the note that is 'exactly' in the middle of an octave?

What does in the 'exact middle' even mean? In modern music theory, the tritone divides the octave perfectly into half, which allows us to perform tritone substitution and rationalize the musical function of augmented 6th chords (italian, french, german, neapolitan). How do we achieve the tritone in terms of changing the lenghth of our string?

Intuitively, we may first try to 'average' out the two lengths of string:

12(100cm+50cm)=75cm

If a 100 cm string resounds at 100 Hz, then a 75 cm string, will give an inversely proportional frequency of:

100Hz100cm75cm=13313Hz

The relationship between 100 Hz and 133.33 Hz is

4:3, the perfect fourth.

But, this interval, by current music theory standards, falls short of what it means to be 'in the middle' of an octave!

By taking the conventionally "average" string length, what we have obtained is known as the Harmonic Mean of the frequencies:

HM(aHz,bHz)=21a+1bHM(x1,x2,,xn)=n1x1+1x2++1xn

It may not be explicitly clear how the harmonic mean appears in the above example, so here's the working in full:

fopen string freq=100Hzlopen string length=100cmaHz=freq. of open string=fopenbHz=freq. of half length string=fopenlhalf str. len./lopen=fopen50cm/100cm=fopen1/2=2fopenlopenfopenlhalf=b(1)1b=lhalflopenfopen

lavg. length of open and half strings=lopen+lhalf2=1+22ffreq of avg. string=fopenlavg./lopen=fopenlopenlopen+lhalf2=2fopenlopenlopen+lhalf=2lopenlopenfopen+lhalflopenfopen=21a+1b (by (1))

3.1 Other applications of the harmonic mean

The harmonic mean is applied whenever we are considering the average of rates, ratios, or proportions. A classic application outside of music would be the problem of the average speed of a journey where exactly half the distance (not time!) was covered at 100 km/h and the other half at 50 km/h:

Avg speed for journey=21100km/h+150km/h=66.67km/h

In the musical context, the harmonic mean would mean the average of string lengths, which is inversely proportional to the frequency.

3. The Arithmetic Mean

Since, taking the conventional "average" of the string lengths didn't work to give us a note that we perceive to be exactly in the middle of an octave, let's try taking the conventional "average" of frequencies themselves.

This "conventional average" is known as the Arithmetic Mean, the one that we are most familiar with, and usually refer to when we are talking about means and averages:

AM(aHz,bHz)=a+b2AM(x1,x2,,xn)=x1+x2++xnn

Taking the arithmetic mean of the two frequencies 100 Hz and 200 Hz:

AM(100Hz,200Hz)=100Hz+200Hz2=150Hz

The ratio of frequencies between 100 Hz and 150 Hz is

3:2

This is a perfect fifth! Again, by conventional modern music theory standards, we don't consider the P5 interval to be "exactly in the middle" of an octave.

Present day musicians are currently use the 12 equal semitones of modern tuning as the 'benchmark' of being 'in tune', and most have the view that whatever 'microtonal' notes and intervals are to be considered with respect to the preset 12 semitones. Rather, it is important to remember that 11 out of the 12 semitone intervals within an octave are approximations of the "original" tunings of these notes, which are based on

a/b ratios between frequencies. Much of recent academic music theory literature (PLR/Neo-Riemannian, Duality, Serialism, chord-scale theory, etc) relies on the very specific approximations of these original tunings induced by the 12-tone system, and the reasons for why such approximations allows for these models of functional harmony can be explained by Regular Temperament Theory, which is wayyy out of scope for now.

Regardless, while the Harmonic and Arithmetic Means are not looking useful for modern musicians in the 12-equal tuning system of today, these two means were, at least to the Pythagoreans, the building blocks for all musical intervals, which later influenced modern tuning!

4. The Geometric Mean

Seeing that both the "obvious" attempts at trying to find the tritone has failed, let's try one last attempt.

Since musical intervals are perceived as ratios (logarithmic perception), we know that in order to add two intervals together, we don't simply add the ratios, but multiply them:

P. Fifth (3:2)+P. Fourth (4:3)=32×43=21=Octave (2:1)

Notice if we added

3/2+4/3 instead, we would have gotten
17/6
, which clearly is not the frequency ratio for an octave.

Now, let's try to stack perfect fifths:

P. Fifth=322×P. Fifths=32×32=(32)23×P. Fifths=32×32×32=(32)3n×P. Fifths=(32)n

We see that it is the exponentiation of a ratio that allows us to add repeated intervals on top of each other.

Now, what if we want half a fifth? Is such a thing even possible? Since

n-fifths is defined as
(32)n
, then, nothing stops us from setting
n=1/2
to get:

Exactly half a P. Fifth=(32)12=32=1.2247...

You may know the note that splits the fifth into two equal parts as the neutral third, which is "between" the major and minor third. (Although this is not a precise definition as there are many possible major and minor thirds)

Now going back to our original problem, how do we get a note that is exactly in the middle of an octave?

We can think of the octave as a line that spans from the unison interval

1/1 to the octave
2/1
. We can now use the exponentiation concept, and apply it to how we normally take "conventional averages" (Arithmetic Means) like so:

  1. The "conventional average" of two values is obtained by adding the two values up then dividing by two.
  2. We know that "adding" an interval is done using multiplication, so we use
    1/1×2/1=2/1
    to get the 'sum of the two values'.
  3. To take the average of the two values, we use the
    n=1/2
    exponent to get exactly half of the interval, because "multiplying" an intreval is done using exponentiation:

Exactly half an octave=(Unison (1:1)×Octave (2:1))12=2=1.4142...

Alt text

Converting frequency ratios back to string length, we get:

100cm100Hz1002Hz=70.710cm

That is, if we have a guitar with a 100 cm long neck, then its 12th fret would be at 50 cm, and its 6th fret (tritone) will be at 70.71 cm.

And we have finally arrived at the solution to the problem of finding the note that is exactly in the middle of an octave!

The method we have used can be generalized as the Geometric Mean of frequencies:

GM(aHz,bHz)=abGM(x1,x2,,xn)=(x1x2xn)1/n

4.1 Other applications of the geometric mean

The geometric mean is used to model the 'average' of exponential growth, where 'addition' of objects is multiplication, and 'multiplication' is exponentiation.

For example, suppose some account has a balance of $100. In the next 3 years, the account grows by 10%, 20%, and 30% respectively, relative to its value of the previous year. What is the average growth rate of the account?

First, let's work out the balance of the account after each year:

b0=100b1=1001.1=110b2=1101.2=132b3=1321.3=171.6

If we naively use the arithmetic mean of growth rates, we get

(10%+20%+30%)/3=20% as our "average growth rate". However, notice that if we compound 20% growth each year:

b0=100b1=1001.2=120b2=1201.2=144b3=1441.2=172.8171.6

that is not correct.

Instead, because growth is 'added' by the act of multiplication, we instead have to use the geometric mean:

GM(1.1,1.2,1.3)=(1.11.21.3)1/3=1.1972b0=100b1=1001.1972=119.72b2=119.721.1972=143.33b3=143.061.1972=171.6

which now gives us the correct balance after 3 years.

4.2 Geometric mean in modern music intonation

Since the basic model of pitch perception is in log2-space (i.e. counting number of cents, semitones, octaves, etc), making frequency exponential in nature, to 'average' of a bunch of frequencies is more naturally perceived as the geometric mean over the arithmetic mean.

However, this doesn't mean that the other two means have no purpose

5. Ptolemy's pyramid - construction of pitches using the Classical Means







hierarchy



2/1

2/1



3/2

3/2



2/1->3/2


AM



4/3

4/3



2/1->4/3


HM



5/4

5/4



3/2->5/4





6/5

6/5



3/2->6/5





7/6

7/6



4/3->7/6





8/7

8/7



4/3->8/7





9/8

9/8



5/4->9/8





10/9

10/9



5/4->10/9





11/10

11/10



6/5->11/10





12/11

12/11



6/5->12/11





13/12

13/12



7/6->13/12





14/13

14/13



7/6->14/13





15/14

15/14



8/7->15/14





16/15

16/15



8/7->16/15





In the above diagram, we start with the octave

2:1 at the top. As we did with the Arithmetic mean (AM) and Harmonic mean (HM), we take the AM and HM of
2:1
and the unison
1:1
to get
3:2
and
4:3
respectively.

The AMs are denoted with red arrows, and the HMs are denoted with green arrows.

We continue taking AMs and HMs of those new intervals we obtained and the unison

1:1 to form a binary tree of intervals.

Doing so, we can construct an infinite pyramid of intervals where each layer of intervals is smaller than the one above it, and we can construct any possible interval we want by "adding" intervals (multiplying ratios) in different layers.

Notice that if we 'add' (multiply) the intervals from two child nodes (the direct AM and HM of any single interval and the unison), we get the parent node itself.

E.g.:

  • 2/1=3/2×4/3
  • 3/2=5/4×6/5
  • 4/3=7/6×8/7
  • 5/4=9/8×10/9
  • etc

This fact also demonstrates a rather famous identity and inequality between the three classical means, useful for solving stuff in number theory or geometry problems:

AM(a,b)×HM(a,b)=GM(a,b)2

AMGMHM

Here's a really nice video that explains this construction with examples:

6. Relation of the Arithmetic and Harmonic mean with the fractional mediant

The mediant of two fractions

a/b and
c/d
is given by:

a+cb+d

(This is like the fraction version of the Freshman's dream)

The mediant has a nice property: we are guaranteed that the mediant of two fractions is always between the two fractions. Assuming

a/b<c/d, then:

ab<a+cb+d<cd

Let an interval ratio

a/b are in its most reduced form. We can actually use the mediant to find both the AM and HM of any interval ratio and the unison
1/1
:

Start with the interval

2/1, which is the interval between the unison
1/1
and the octave
2/1
.

The mediant of

1/1 and
2/1
is guaranteed to be between the two fractions, and it is:
med(1/1, 2/1)=1+21+1=32=AM(1/1,2/1)

However,

2/2 is also a unison. When we take the mediant of
2/2
and
2/1
, we still get an interval guaranteed to be between them both, but now we have:

med(2/2, 2/1)=2+22+1=43=HM(1/1,2/1)

🟡 The idea of different ways to represent the same interval lies the latent idea of algebraic torsion, which is something that music intonation and temperament theory has to deal with. Without going too deep into the math for now, think of torsion as the ability for the same interval to have many representations, with varying degrees of 'reduced'-ness.

You can read the musical view of torsion on the Xen Wiki: Saturation, torsion, and contorsion

Now let's try the same for the interval

3/2, because the denominator of
3/2
is 2, we use
2/2
for the 'unison' to get the AM:

med(2/2, 3/2)=2+32+2=54=AM(1/1,3/2)

and we use

3/3 for the 'unison' to get the HM:

med(3/3, 3/2)=3+33+2=65=HM(1/1,3/2)

Last 2 examples: Let's try it for

4/3. Since the denominator is 3, we use
3/3
for the 'unison' to get the AM:

med(3/3, 4/3)=3+43+3=76=AM(1/1,4/3)

and we use

4/4 for the 'unison' to get the HM:

med(4/4, 4/3)=4+44+3=87=HM(1/1,4/3)

It's nice that we have many easy ways of finding JI interval ratios that are 'in between' two other intervals. The mediant is the most general method, and we can also see Arithmetic Mean and Harmonic Mean as special cases of the mediant.

The mediant is applied in a Stern-Brocot tree, of which its left half contains the Farey sequence, these things may be useful for just intonation as it concerns the ordering and generation of just intonation intervals. Just intonation pieces/intervals are given by some

n-limit, where
n
is the highest prime factor allowed in the decompositions of the interval ratios. Sometimes you want a way to find close approximations of intervals that are above the limit, while still keeping within the n-limit, and the Stern-Brocot tree is one way to do that, because it helps with finding smooth numbers.

Further reading/watching

For more about the Classical Means in music, in greater detail:

For the application of the geometric mean in modern musical tuning, and how 12-tone system is an approximation: