Tuning and Ratio
Why is the modern piano tuned using an equal tempered scale and
what has this got to do with logarithms?
Problem
You don't have to know any music theory to do this question as all you need to know is explained here. You only need to know about logarithms. The actual problems to solve are given in bold italic text.
Diagram showing part of a piano keyboard.
Image
Wherever you are on the keyboard, the interval between one note and the next with the same letter name is always an octave. In the same way, the interval between C and the G above it, or D and the A above it, or anything similar (seven steps on the keyboard, including both black and white notes), is always a fifth. Each of these intervals, the octave, the fifth, and
others, corresponds to a particular ratio of string lengths which produce the notes. The octave corresponds to 2/1, halving the length of the string. The fifth corresponds to 3/2, taking two thirds of the length of the string. The interval from C to F, called a fourth, has the ratio 4/3.'Fourth' and 'fifth' etc. are musical terms and do not refer to the fractions 1/4 and 1/5.
The interval from F to G, between the fourth and the fifth, has the ratio ${3/2 \over 4/3} = 9/8$. This interval is called a tone and it is also the the interval from C to D. Notes tuned in these ratios produce pleasant harmonies but compromises have to be made in tuning the other notes because the ratios do not relate to each other exactly. This problem is about
discovering what the compromises might be. The table below shows some musical intervals and the corresponding ratios of the notes with respect to the note C.
C | D | E | F | G | A | B | C |
1/1
unison
|
9/8
tone
|
81/64 |
4/3
fourth
|
3/2
fifth
|
27/16 | 243/128 |
2/1
octave
|
You might expect there to be three tones in the interval from C to F, changing the ratio by 9/8 then 9/8 again and then 9/8 a third time, that is ${(9/8)}^3$. How does this compare with the ratio 4/3?
Pythagorean tuning kept the ideal ratios for the octaves, fifths and fourths and tuned the note E with a ratio ${(9/8)}^2$ and the notes A and B with the ratios $(3/2)\times (9/8)$ and $(3/2)\times {(9/8)}^2$. This system preserves the ratios of the fourth and fifth but produces a major third, from C to E and a major sixth, from C to A, which sound unpleasant. The Greeks were not interested in these intervals, but when composers in the middle ages and Renaissance wanted to use them, a new system of tuning was needed.
Just intonation (shown in the table below) has much better major thirds and major sixths, of 5/4 and 5/3. It tunes the B so that the interval from E to B is a perfect fifth and the interval from G to B is a perfect third. But it does this by having two different sizes of tone: the intervals C-D and D-E are different here, but they were the same in the Pythagorean scale. Find the ratio corresponding to B. Also compare the D-A ratio with the ideal fifth (3/2).
C | D | E | F | G | A | B | C |
1/1
unison
|
9/8
tone
|
5/4
third
|
4/3
fourth
|
3/2
fifth
|
5/3
sixth
|
? |
2/1
octave
|
Just Intonation
You might expect there to be six tones and twelve semitones in an octave (because there are 12 notes) but again that is not exactly so. Find exactly how many tones there are in an octave by finding what power of $9\over 8$ gives 2. Find also exactly how many major thirds there are in an octave.
In the equal tempered scale, the standard tuning nowadays, these mismatches between different ratios are removed by defining the intervals differently. The tone is made a little smaller, so that there are exactly six of them in an octave. The semitone (half a tone) is a twelfth of an octave: so its ratio is ${(2)}^{1/12}$. If, for example, the note C is tuned with a string length of 32 units then the C# is tuned with a string of length ${32\over {(2)}^{1/12}}=30.2$ (to 3 significant figures). This applet by Benjamin Wardhaugh demonstrates the relationship between the string lengths and the notes. The ratio ${(2)}^{1/12}$ is used to build up the other intervals, so that each interval is a whole number of semitones, and the ratio between its frequency and the frequency of the lowest note in the scale is given by a power of ${(2)}^{1/12}$. For example the fifth is ${(2)}^{7/12}$.
Instrument tuners customarily use a logarithmic unit of measure, the cent, where 1200 cents are equal to one octave, a frequency ratio of 2/1, so that a cent is a 1200th root of 2. The table below shows the Equal tempered, Pythagorean and Just systems of tuning given in cents showing how many cents the note lies above the starting C. Fill in the table.
C | D | E | F | G | A | B | C | |
Equal tempered scale | 0 | 200 | 400 | 500 | 700 | 900 | 1100 | 1200 |
Pythagorean scale | 0 | 702 | 1200 | |||||
Just intonation | 0 | 386 |
702
|
1200 |
[See also the article Euclid's Algorithm and Music]
Getting Started
You don't need ANY knowledge of music to solve this problem. All the maths you need to know and understand is the definition of logarithms.
Don't be put off by the fact that there is a lot to read and don't be put off if you have not enjoyed music theory in the past. Read the problem and you'll find it tells you all you need to know about music to solve it.
To find how many tones there are in an octave, trial and error is perfectly adequate, but you can also get an exact answer using logarithms.
Similarly to find the number of thirds in an octave you can get an exact answer using logarithms.
To relate the different scales to the linear equal tempered scale in cents you need to calculate the power of ${(2)}^{1/12}$ corresponding to the ratio for each note and then multiply by 100 to convert the measure to cents.
For example, to find the measures in cents corresponding to the note A, the calculations are, for the just intonation: $$1200\times {\log (5/3)\over \log 2}$$ and for the Pythagorean scale: $$1200\times {\log(27/16)\over \log 2}.$$
Student Solutions
Robert managed to solve this toughnut:
Find the ratio corresponding to B. Also compare the D-A ratio with the ideal fifth (3/2):
"B's ratio is calculating by use of the fact that the interval from E to B is a perfect fifth, and a perfect fifth's ratio is 3/2. Also E's ratio is 5/4. Therefore B = 15/8, and:
$\frac{A}{D}=\frac{5/3}{9/8}=\frac{40}{27}=80/54$The ideal fifth ratio=81/54.Therefore if we were to tune two adjacent keys to two different A's, the first being in the ratio A/D, and the second a perfect fifth above D (in the ratio 3/2). The second A would be higher than the first by a ratio of 81/80."
Find also exactly how many
major tones/thirds there are in an octave.
To do this for the tonesRobert took logs of
the equation.
We are trying to find $x$ such that $\left({9\over 8}\right)^x
= 2$ then $$x \log{9\over 8} = \log 2,\ x= {\log 2\over \log 9/8} =
5.8849492$$ to 8 significant figures.
Similarly for thirds:
To find the number of thirds in an octave we are looking for
the value of $y$ such that $\left({5\over 4}\right)^y = 2$. Observe
that: $$\left({5\over 4}\right)^2 = 1.5625,\ \left({5\over
4}\right)^3 = 1.953125,\ \left({5\over 4}\right)^4 = 2.4414063$$
and hence $3< y< 4$ and $y\approx 3.1$. Using logs
$$y\log{5\over 4} = \log 2,\ y= {\log 2\over \log 5/4} =
3.1062837$$ to 8 significant figures.
In order to convert the Pythagorean & Just Intonation
ratios for intervals, into the standard units of tuning ie cents,
One must solve the following equation and then multiply the
solution by 100 to end up with cents:
$(2^{1/12})^n$=R, where R = The Pythagorean or Just Intonation
ratio for an interval.
Doing this, Robert obtained the
solution:
C | D | E | F | G | A | B | C | |
Equal tempered scale | 0 | 200 | 400 | 500 | 700 | 900 | 1100 | 1200 |
Pythagorean scale | 0 | 204 | 408 | 498 | 702 | 906 | 1110 | 1200 |
Just intonation | 0 | 204 | 386 | 498 | 702 | 884 | 1088 | 1200 |
Well Done!
Teachers' Resources
To understand how the notes are tuned in modern pianos, and why this system of tuning has been adopted, you need to understand the relationship of the intervals between the notes to the mathematical concept of logarithms.
One of the things you are asked to do in this problem is to find how many thirds there are in an octave using logarithms. Going back in history, musicians would have used other methods to calculate how many thirds in an octave because they did not know about logarithms. The problem Euclid's Algorithm and Musical Intervals is about a method they used.
There are many musical scales but in this problem we only consider the 12 note piano scale.
An octave is the interval from any note to the next occurrence of that note up or down the keyboard. There are 12 notes in an octave. The black notes on the piano keyboard are sharps or flats, for example the note between C and D is called C sharp or D flat.
The musical intervals correspond to the ratios of the lengths of the strings which vibrate to produce the notes, for example the octave is given by doubling (or halving) the length of the string. If you halve the length of a string the pitch rises an octave, that is from one C to the next C above it, or from one A to the next A above it, and so on, so the associated ratio for this musical interval is 2.
Similarly by taking 2/3 of the length of the string the pitch rises by what musicians call a fifth, that is from C to G and taking 3/4 the length the pitch goes up by a fourth, from C to F say. Pleasant harmonies arise from notes whose frequencies are related by simple ratios.
Taking eight-ninths of the original string gives the interval called the tone (C to D above it or anything similar).
If the interval between two notes is a ratio of small integers the notes sound good together. The pure intervals smaller than or equal to an octave are: 2/1 - the octave; 3/2 - the perfect fifth; 4/3 - the perfect fourth; 5/4 - the major third; 6/5 - the minor third; 5/3 - the major sixth and 8/5 - the minor sixth.
Although some of the intervals in the just intonation system are perfect, other combinations of notes sound very bad. With equal temperament, the intervals are never exact (except the octave), but they are very close - always within about one percent or better. The twelve-tone equal-tempered scale is the smallest equal-tempered scale that contains all six of the pure intervals 3/2, 4/3, 5/4, 6/5, 5/3, 8/5 to a good approximation - within one percent.