Mathematics of Piano Tuning

Eric Bynum

Initializations

Off[General::spell];

Introduction

Experimentation on combinations of tones began long ago when music advanced from singular melodic lines to multiple notes played simultaneously -- harmony, by today's definition. Pythagoras was the first to discover the relationships between various two note mixtures that are pleasing to the ear. Before discussing Pythagoras's discoveries, we should take time to examine how basic sounds and notes are made. An object such as an air molecule, a speaker cone, engine piston, or a string under tension is said to vibrate if it moves a small distance and then changes direction and returns to its original location repeatedly in a short amount of time. Sounds result from vibrations of objects that set the neighboring air molecules into similar motion. This motion is transferred to other air molecules further and further outside of the original vibrating object. When the air in our ears is set into motion, it bumps into the eardrums and sets these highly sensitive membranes into the same motion. From this point, the nerves carry signals to the brain for processing into what we understand as sound. The term frequency describes the speed at which objects vibrate. For instance, to say a speaker cone is vibrating at a frequency of 20 Hz is equivalent to saying a speaker cone is displacing slightly and then returning to its original position twenty times per second.

If you have ever played around on a piano, you have probably noticed that a series of eight white keys, beginning on a particular key, produce a pleasing sequence of tones.  If you begin on the right key (C), you can play a major diatonic scale (diatonic refers to a  scale consisting of eight tones). The illustration in Figure 1 is the series called the C major scale. One definition in music theory that must be given is that of a musical interval. An interval refers to the number of tones (including the beginning and ending notes) in a diatonic scale between two notes. For example, the inteveral between C and G is a fifth interval since the tones (C, D, E, F, G) number five. For simplicity, let us use this imaginary scale as a reference for the rest of this discussion. The key of C can help visualize the four scale tuning constructions outlined below. Tuning every instrument to C is not a general requirement; any of the twelve key scales can be used. The key of C is the easiest to illustrate the following scale constructs.

\(fig1\  = \ 
      Show[
	{{
            Graphics[

              			{Line[{{0, \ 28}, \ {40, \ 28}}], 
				
                Line[{{0, \ 0}, \ {40, \ 0}}], 
				
                Line[{{0, \ 0}, \ {0, \ 28}}], 
				
                Line[{{40, \ 0}, \ {40, \ 28}}], 
				
                Line[{{5, \ 0}, \ {5, \ 6}}], 
				
                Line[{{10, \ 0}, \ {10, \ 6}}], 
				
                Line[{{15, \ 0}, \ {15, \ 28}}], 
				
                Line[{{20, \ 0}, \ {20, \ 6}}], 
				
                Line[{{25, \ 0}, \ {25, \ 6}}], 
				
                Line[{{30, \ 0}, \ {30, \ 6}}], 
				
                Line[{{35, \ 0}, \ {35, \ 28}}]
			}]}, 

          		{Graphics[

              				{GrayLevel[0], 
					
                Rectangle[{3, \ 6}, \ {7, \ 28}], 
					
                Rectangle[{8, \ 6}, \ {12, \ 28}], 
					
                Rectangle[{18, \ 6}, \ {22, \ 28}], 
					
                Rectangle[{23, \ 6}, \ {27, \ 28}], 
					
                Rectangle[{28, \ 6}, \ {32, \ 28}]}]}, 

          		{Graphics[

              				{
                Text[StyleForm["C", \ FontSize\  -> \ 18, \ 
                    FontSlant\  -> \ Italic], \ {2.5, \ 2}], 
					
                Text[StyleForm["D", \ FontSize\  -> \ 18, \ 
                    FontSlant\  -> \ Italic], \ {7.5, \ 2}], 
					
                Text[StyleForm["E", \ FontSize\  -> \ 18, \ 
                    FontSlant\  -> \ Italic], \ {12.5, \ 2}], 
					
                Text[StyleForm["F", \ FontSize\  -> \ 18, \ 
                    FontSlant\  -> \ Italic], \ {17.5, \ 2}], 
					
                Text[StyleForm["G", \ FontSize\  -> \ 18, \ 
                    FontSlant\  -> \ Italic], \ {22.5, \ 2}], 
					
                Text[StyleForm["A", \ FontSize\  -> \ 18, \ 
                    FontSlant\  -> \ Italic], \ {27.5, \ 2}], 
					
                Text[StyleForm["B", \ FontSize\  -> \ 18, \ 
                    FontSlant\  -> \ Italic], \ {32.5, \ 2}], 
					
                Text[StyleForm["C", \ FontSize\  -> \ 18, \ 
                    FontSlant\  -> \ Italic], \ {37.5, \ 2}]
				}]}

          	}, \ AspectRatio\  -> \ Automatic, \ 
        DisplayFunction\  -> \ Identity]; 


    Show[Graphics[

        		{Rectangle[{0, \ 5}, \ {40, \ 33}, \ fig1], 
		
          Text[StyleForm["Figure 1", \ FontFamily\  -> \ Times, \ 
              FontSize\  -> \ 22, \ FontSlant\  -> \ Italic], \ {20, \ 1}]}], 
      \ DisplayFunction\  -> \ $DisplayFunction, \ 
      AspectRatio\  -> \ Automatic, \ PlotRange -> \ All, \ 
      ImageSize\  -> \ 4\ 72]; \)

Pythagorean scale

Basic Discussion

Pythagoras experimentally determined that the following combinations of frequencies resulted in pleasing musical intervals. The unison interval is found by playing two equal frequencies. (At this time, let us fix this imaginary frequency as a base reference tone.) The octave interval frequency is two times the reference tone or fixed frequency, the fifth interval frequency is three halves ((3/2)) times the reference, and the fourth interval frequency is four thirds ((4/3)) times the reference. The Pythagorean diatonic scale was developed from the above relationships by establishing a fixed frequency and using the multipliers as a guide for the remaining notes of the scale. The multipliers for this scale in Pythagorean tuning are illustrated in Figure 2.

\(fig2\  = \ 
      Show[
	{{
            Graphics[

              			{Line[{{0, \ 28}, \ {40, \ 28}}], 
				
                Line[{{0, \ 0}, \ {40, \ 0}}], 
				
                Line[{{0, \ 0}, \ {0, \ 28}}], 
				
                Line[{{40, \ 0}, \ {40, \ 28}}], 
				
                Line[{{5, \ 0}, \ {5, \ 6}}], 
				
                Line[{{10, \ 0}, \ {10, \ 6}}], 
				
                Line[{{15, \ 0}, \ {15, \ 28}}], 
				
                Line[{{20, \ 0}, \ {20, \ 6}}], 
				
                Line[{{25, \ 0}, \ {25, \ 6}}], 
				
                Line[{{30, \ 0}, \ {30, \ 6}}], 
				
                Line[{{35, \ 0}, \ {35, \ 28}}]
			}]}, 

          		{Graphics[

              				{GrayLevel[0], 
					
                Rectangle[{3, \ 6}, \ {7, \ 28}], 
					
                Rectangle[{8, \ 6}, \ {12, \ 28}], 
					
                Rectangle[{18, \ 6}, \ {22, \ 28}], 
					
                Rectangle[{23, \ 6}, \ {27, \ 28}], 
					
                Rectangle[{28, \ 6}, \ {32, \ 28}]}]}, 

          		{Graphics[

              				{
                Text[StyleForm["1", \ FontSize\  -> \ 14, \ 
                    FontSlant\  -> \ Italic], \ {2.5, \ 3}], 
					
                Text[StyleForm[\*""\!\(9\/8\)"", \ FontSize\  -> \ 14, 
                    \ FontSlant\  -> \ Italic], \ {7.5, \ 3}], 
					
                Text[StyleForm[\*""\!\(81\/64\)"", \ 
                    FontSize\  -> \ 14, \ FontSlant\  -> \ Italic], 
                  \ {12.5, \ 3}], 
					
                Text[StyleForm[\*""\!\(4\/3\)"", \ FontSize\  -> \ 14, 
                    \ FontSlant\  -> \ Italic], \ {17.5, \ 3}], 
					
                Text[StyleForm[\*""\!\(3\/2\)"", \ FontSize\  -> \ 14, 
                    \ FontSlant\  -> \ Italic], \ {22.5, \ 3}], 
					
                Text[StyleForm[\*""\!\(27\/16\)"", \ 
                    FontSize\  -> \ 14, \ FontSlant\  -> \ Italic], 
                  \ {27.5, \ 3}], 
					
                Text[StyleForm[\*""\!\(243\/128\)"", \ 
                    FontSize\  -> \ 14, \ FontSlant\  -> \ Italic], 
                  \ {32.5, \ 3}], 
					
                Text[StyleForm["2", \ FontSize\  -> \ 14, \ 
                    FontSlant\  -> \ Italic], \ {37.5, \ 3}]
				}]}

          	}, \ AspectRatio\  -> \ Automatic, \ 
        DisplayFunction\  -> \ Identity]; 


    Show[Graphics[

        		{Rectangle[{0, \ 5}, \ {40, \ 33}, \ fig2], 

          fig1\  = \ 
            Show[
	{{
                  Graphics[

                    			{Line[{{0, \ 28}, \ {40, \ 28}}], 
				
                      Line[{{0, \ 0}, \ {40, \ 0}}], 
				
                      Line[{{0, \ 0}, \ {0, \ 28}}], 
				
                      Line[{{40, \ 0}, \ {40, \ 28}}], 
				
                      Line[{{5, \ 0}, \ {5, \ 6}}], 
				
                      Line[{{10, \ 0}, \ {10, \ 6}}], 
				
                      Line[{{15, \ 0}, \ {15, \ 28}}], 
				
                      Line[{{20, \ 0}, \ {20, \ 6}}], 
				
                      Line[{{25, \ 0}, \ {25, \ 6}}], 
				
                      Line[{{30, \ 0}, \ {30, \ 6}}], 
				
                      Line[{{35, \ 0}, \ {35, \ 28}}]
			}]}, 

                		{Graphics[

                    				{GrayLevel[0], 
					
                      Rectangle[{3, \ 6}, \ {7, \ 28}], 
					
                      Rectangle[{8, \ 6}, \ {12, \ 28}], 
					
                      Rectangle[{18, \ 6}, \ {22, \ 28}], 
					
                      Rectangle[{23, \ 6}, \ {27, \ 28}], 
					
                      Rectangle[{28, \ 6}, \ {32, \ 28}]}]}, 

                		{Graphics[

                    				{
                      Text[StyleForm["C", \ FontSize\  -> \ 18, \ 
                          FontSlant\  -> \ Italic], \ {2.5, \ 2}], 

                      					
                      Text[StyleForm["D", \ FontSize\  -> \ 18, \ 
                          FontSlant\  -> \ Italic], \ {7.5, \ 2}], 

                      					
                      Text[StyleForm["E", \ FontSize\  -> \ 18, \ 
                          FontSlant\  -> \ Italic], \ {12.5, \ 2}], 

                      					
                      Text[StyleForm["F", \ FontSize\  -> \ 18, \ 
                          FontSlant\  -> \ Italic], \ {17.5, \ 2}], 

                      					
                      Text[StyleForm["G", \ FontSize\  -> \ 18, \ 
                          FontSlant\  -> \ Italic], \ {22.5, \ 2}], 

                      					
                      Text[StyleForm["A", \ FontSize\  -> \ 18, \ 
                          FontSlant\  -> \ Italic], \ {27.5, \ 2}], 

                      					
                      Text[StyleForm["B", \ FontSize\  -> \ 18, \ 
                          FontSlant\  -> \ Italic], \ {32.5, \ 2}], 

                      					
                      Text[StyleForm["C", \ FontSize\  -> \ 18, \ 
                          FontSlant\  -> \ Italic], \ {37.5, \ 2}]

                      				}]}
	}, \ AspectRatio\  -> \ Automatic, \ 
              DisplayFunction\  -> \ Identity]; 


          Show[Graphics[

              		{Rectangle[{0, \ 5}, \ {40, \ 33}, \ fig1], 
		
                Text[StyleForm["Figure 1", \ FontFamily\  -> \ Times, \ 
                    FontSize\  -> \ 22, \ FontSlant\  -> \ Italic], 
                  \ {20, \ 1}]}], \ DisplayFunction\  -> \ $DisplayFunction, 
            \ AspectRatio\  -> \ Automatic, \ PlotRange -> \ All, \ 
            ImageSize\  -> \ 4\ 72]; 
		
          Text[StyleForm["Figure 2", \ FontFamily\  -> \ Times, \ 
              FontSize\  -> \ 22, \ FontSlant\  -> \ Italic], \ {20, \ 1}]}], 
      DisplayFunction\  -> \ $DisplayFunction, AspectRatio\  -> \ Automatic, 
      \ PlotRange -> \ All, \ ImageSize\  -> \ 4\ 72]; \)

Advantages and Drawbacks of Pythagorean Tuning

As long as the only pieces of music that we want to hear are made up of fourth and fifth intervals and harmonies, then Pythagorean scale tuning will give you the most consonant sound. However, if we want to include more evolved intervals and harmonies, we quickly find that this system has problems. Take, for instance, tuning the chromatic scale, which includes all twelve half step intervals in the octave rather than just the eight tones of the diatonic scale. The method of tuning the chromatic scale is done by "tuning up the circle of fifths". This method relies solely on tuning fifth intervals and octave intervals to find all the notes of the octave. For instance, the frequency of A above a given reference note, C, is found by multiplying C by (3/2) a total  of three times. Let us look at the mathematics involved for this example - C to G, G to D, D to A

\(TextForm
    \`frequency\ of\ C\ ×\ 3\/2\ ×\ 3\/2\ ×\ 3\/2\  = \ 
      frequency\ of\ C\ ×\ 27\/8\)

This is not quite what we want, however, because we have jumped outside the octave we are tuning to the next higher octave ((27/8) ≻ 2). We must now multiply that result by (1/2) to return to the octave in which we began.

\(\(	frequency\ of\ C\ ×\ 27\/8\ ×\ 1\/2\  = \ 
      frequency\ of\ C\ ×\ 27\/16\)\)

These multiplications give us (27/16) times the reference (In the interest of keeping this paper to the point I will not go into more detail on this method. The reader may wish to refer to a text on music theory for more in-depth information.) The completion of the pattern of tuning the various notes brings us back to the reference tone from which we began, implying the name "circle" of fifths. When we complete the circle and come back to the beginning, we would expect that the mathematics returns the original reference tone frequency. In other words, all multiplications of the necessary interval relationships that take us full circle should result in a multiplier of 1 times the reference since the resulting frequency should equal the reference. Unfortunately this is not the case. The end of the circle will leave us sharp of the beginning by a multiplier of (531441/524288) times the reference. This ratio is known as the Pythagorean comma. To leave Pythagorean tuning to music dependent on only the tuned diatonic octave is acceptable, but music that requires any of the chromatic notes that are not in the diatonic scale would suffer tones for which the mathematics does not give pleasing results. The intervals called the just major third ((5/4)× the reference) and the just minor third ((6/5)× the reference) also present difficulties to Pythagorean tuning. These intervals are not satisfied by the mathematics of equivalent Pythagorean intervals. The Pythagorean major third is sharper than the just major third ((81/64) ≻ (5/4)) and the Pythagorean minor third is flatter than the just minor third ((32/27) ≺ (6/5)). The semitones or halfsteps also present a problem in Pythagorean tuning. The semitones are divided into two categories : 1) diatonic semitones, and 2) chromatic semitones. Diatonic semitones are structured by the natural occurance of semitones in the diatonic major scale. Chromatic semitones are the semitones between the whole steps in the diatonic major scale. The difference between these two semitones also turns out to be the Pythagorean comma. These reasons alone make universal tuning by the Pythagorean system impractical.

Sound Examples

Diatonic Semitone versus Chromatic Semitone

In Pythagorean tuning mathematics, the diatonic semitone (a halfstep that appears naturally in a major scale) differs from the chromatic semitone (a step in the 12 tone chromatic scale). The function, DiatonicSemitone, plays an example of the Pythagorean diatonic semitone. this semitone appears in the natural prograsssion of a major scale. This example plays A4 (440 Hz) followed by A♯4.

\(DiatonicSemitone[t_]\  := \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.4, \ 
        Sin[2\ π\ \((440)\)\ t], 
		t\  >= \ 0.4\  && \ t\  < \ 0.8, \ 
        Sin[2\ π\ \((256\/243)\)\ \((440)\)\ t]
	]; 

    Play[DiatonicSemitone[t], \ {t, \ 0, \ 0.8}]\)

The function, ChromaticSemitone, plays an example of the Pythagorean chromatic semitone. This semitone is a halfstep that does not appear in the natural major scale progression. This example again plays A4 (440 Hz) followed by A♯4.

\(ChromaticSemitone[t_]\  := \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.4, \ 
        Sin[2\ π\ \((440)\)\ t], 
		t\  >= \ 0.4\  && \ t\  < \ 0.8, \ 
        Sin[2\ π\ \((2187\/2048)\)\ \((440)\)\ t]
	]; 

    Play[ChromaticSemitone[t], \ {t, \ 0, \ 0.8}]\)

The function, PythagoreanComma, plays an example of the Pythagorean comma based on the difference between the two semitones. This example plays diatonic semitone A♯4 followed by chromatic semitone A♯4. Both of these tones are based on A4 (440 Hz). Can you hear the difference?

\(PythagoreanComma[t_]\  := \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.4, \ 
        Sin[2\ π\ \((256\/243)\)\ \((440)\)\ t], 
		
        t\  >= \ 0.4\  && \ t\  < \ 0.8, \ 
        Sin[2\ π\ \((2187\/2048)\)\ \((440)\)\ t]
	]; 

    Play[PythagoreanComma[t], \ {t, \ 0, \ 0.8}]\)

The division of the multipliers of these two notes returns the ratio that is known as the Pythagorean comma, (531441/524288).

(2187/2048)/(256/243)

Tuning by the "Circle of Fifths"

Tuning by the Circle of Fifths in Pythagorean Tuning can be done with a recursive muliplier generation function. This recursive function is defined below as GeneratePythagoreanMultiplier. For "odd numbered" tones, ((3/2)) is multiplied by the previous tone. For "even numbered" tones, the previous tone is multiplied by ((3/2))((1/2)). Note generation of the C scale is done below for psnoteC through psnoteC2, with the output suppressed to save space. Removing the semicolon from the end will display the mathematical output of each note.

\(GeneratePythagoreanMultiplier[1]\  = \ \((3\/2)\); 

    GeneratePythagoreanMultiplier[tone_?EvenQ]\  := \ 
      \(GeneratePythagoreanMultiplier[tone]\  = \ 
        GeneratePythagoreanMultiplier[tone - 1]\ \((3\/2)\) \((1\/2)\)\); 

    GeneratePythagoreanMultiplier[tone_?OddQ]\  := \ 
      \(GeneratePythagoreanMultiplier[tone]\  = \ 
        \((3\/2)\) GeneratePythagoreanMultiplier[tone - 1]\); \)

\(psnoteC\  = \ 260; 

    psnoteG\  = \ GeneratePythagoreanMultiplier[1]\ psnoteC; 

    psnoteD\  = \ GeneratePythagoreanMultiplier[2]\ psnoteC; 

    psnoteA\  = \ GeneratePythagoreanMultiplier[3]\ psnoteC; 

    psnoteE\  = \ GeneratePythagoreanMultiplier[4]\ psnoteC; 

    psnoteB\  = \ GeneratePythagoreanMultiplier[5]\ psnoteC; 

    psnoteF♯\  = \ GeneratePythagoreanMultiplier[6]\ psnoteC; 

    psnoteC♯\  = \ GeneratePythagoreanMultiplier[7]\ psnoteC; 

    psnoteG♯\  = \ GeneratePythagoreanMultiplier[8]\ psnoteC; 

    psnoteD♯\  = \ GeneratePythagoreanMultiplier[9]\ psnoteC; 

    psnoteA♯\  = \ GeneratePythagoreanMultiplier[10]\ psnoteC; 

    psnoteF\  = \ GeneratePythagoreanMultiplier[11]\ psnoteC; 

    psnoteC2\  = \ GeneratePythagoreanMultiplier[12]\ psnoteC; \)

The function, CircleOfFifths, builds and plays the tuning structure from the above note generation and plays.

\(\(CircleOfFifths[t_]\  := \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.3, \ Sin[2\ π\ psnoteC\ t], 
        
		t\  >= \ 0.3\  && \ t\  < \ 0.6, \ Sin[2\ π\ psnoteG\ t], 

        		t\  >= \ 0.6\  && \ t\  < \ 0.9, \ Sin[2\ π\ psnoteD\ t], 

        		t\  >= \ 0.9\  && \ t\  < \ 1.2, \ Sin[2\ π\ psnoteA\ t], 

        		t\  >= \ 1.2\  && \ t\  < \ 1.5, \ Sin[2\ π\ psnoteE\ t], 

        		t\  >= \ 1.5\  && \ t\  < \ 1.8, \ Sin[2\ π\ psnoteB\ t], 

        		t\  >= \ 1.8\  && \ t\  < \ 2.1, \ 
        Sin[2\ π\ psnoteF♯\ t], 
		
        t\  >= \ 2.1\  && \ t\  < \ 2.4, \ Sin[2\ π\ psnoteC♯\ t], 
        
		t\  >= \ 2.4\  && \ t\  < \ 2.7, \ 
        Sin[2\ π\ psnoteG♯\ t], 
		
        t\  >= \ 2.7\  && \ t\  < \ 3.0, \ Sin[2\ π\ psnoteD♯\ t], 
        
		t\  >= \ 3.0\  && \ t\  < \ 3.3, \ 
        Sin[2\ π\ psnoteA♯\ t], 
		
        t\  >= \ 3.3\  && \ t\  < \ 3.6, \ Sin[2\ π\ psnoteF\ t], 
		
        t\  >= \ 3.6\  && \ t\  < \ 3.9, \ Sin[2\ π\ psnoteC2\ t]
	]; 
    \)\)

Play[CircleOfFifths[t],  {t,  0,  3.9}]

We can hear the difference in the octave tones, C and C2, if C2 is halved and played against C. Multiplying C2 by (1/2) will put C2 in the same range as C which makes the sound comparison much easier. The function, UnEnharmonic, plays these two notes, whose difference also works out to be a Pythagorean comma. Can you hear the difference? (The progression of A♯ to F and nomnclature of C2 in this example is incorrect according to the rules of music theory. To keep this discussion to the point with as little confusion as possible, we will maintain this nomenclature.)

\(UnEnharmonicC[t_]\  := \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.4, \ Sin[2\ π\ psnoteC\ t], 
        
		t\  >= \ 0.4\  && \ t\  < \ 0.8, \ 
        Sin[2\ π\ psnoteC2\/2\ t]
	]; 

    Play[UnEnharmonicC[t], \ {t, \ 0, \ 0.8}]\)

The division of the two C notes returns the Pythagorean comma, (531441/524288).

((psnoteC2/2)/psnoteC)

Meantone scale

Basic Discussion

So how can the problems that Pythagoras left behind be mended? One method of compensating for the inadequacies of the Pythagorean scale is by meantone tuning which minutely flattens the fifth interval. This flattening is based on tuning the major third interval to a more consonant ((5/4)) interval. When tuning by the circle of fifths, the flattening factor will accomodate a perfectly tuned just major third interval. The Pythagorean major third is an interval of (81/80) sharp to the just major third. This sharpness is called the Pythagorean syntonic comma. Let's look at how the syntonic comma is used in tuning the meantone fifth interval. We must first start with the Pythagorean fifth interval and then multiply it by the inverse of the syntonic comma

(3/2) (80/81)

But this isn't quite finished. Tuning the major third interval by the circle of fifths requires four multiplications of the fifth interval. If we keep the above construction, we'll be flat by three syntonic comma's. So we'll have to again adjust the fifth interval multiplier to take the circle of fifths into account.

((3/2) (((80/81))^(1/4)))

This is expected since multiplying (5^(1/4))by itself four times will give 5. According to the circle of fifths, however, this is two octaves outside of the range we want. So we multiply 5 by (1/2) two times to return. This gives (5/4), the just major third. We can define a recursive formula to construct the multipliers for meantone tuning.

\(GenerateMeantoneMultiplier[1]\  = \ \((\(3\/2\) \@\(80\/81\)\%4)\); 

    GenerateMeantoneMultiplier[tone_?EvenQ]\  := \ 
      \(GenerateMeantoneMultiplier[tone]\  = \ 
        GenerateMeantoneMultiplier[tone - 1]\ \((\(3\/2\) \@\(80\/81\)\%4)\)\ 
          \((1\/2)\)\); 

    GenerateMeantoneMultiplier[tone_?OddQ]\  := \ 
      \(GenerateMeantoneMultiplier[tone]\  = \ 
        \((\(3\/2\) \@\(80\/81\)\%4)\) 
          GenerateMeantoneMultiplier[tone - 1]\); \)

Now we evaluate the fourth multiplier to make sure we're getting the correct value.

GenerateMeantoneMultiplier[4]

Advantages and Drawbacks of Meantone Tuning

In tuning the entire twelve tones of the octave, all of the notes can be thought of as Pythagorean plus or minus different quarter fractions of the syntonic comma (Figure 3). All intervals that form a major third are now just. Once again, if a musical piece is not overly complex and remains constant in the tuned key signature, meantone tuning works quite well. In fact, meantone math was used rather widely in tuning organ pipes until the nineteenth century. However, it also has problems. For instance, the interval between G♯ and E♭ (in the octave above) corresponds to a fifth. When played in meantone tuning, this interval is nearly a semitone sharp! This interval, which came to be known as the "wolf fifth", was avoided whenever possible in music of the period. Another problem that develops from this system comes from tuning the enharmonic tones. Enharmonic tones have different names yet share a common tone frequency such as D♯ to E♭, A♭ to G♯, E♯ to F and so on. Several enharmonic tones are separated by half a semitone interval when the octave is tuned completely. This problem is referred to as diesis. Many pipe organs were constructed with split enharmonic keys contolling separate pipes tuned according to the diesis difference. A keyboard of this sort, however, would require an incredible level expertise and finesse. Given this unique keyboard format requirement, meantone is also an impractical tuning standard.

fig3 = Show[
	{\({Graphics[

                    			{Line[{{0, \ 28}, \ {40, \ 28}}], 
				
                      Line[{{0, \ 0}, \ {40, \ 0}}], 
				
                      Line[{{0, \ 0}, \ {0, \ 28}}], 
				
                      Line[{{40, \ 0}, \ {40, \ 28}}], 
				
                      Line[{{5, \ 0}, \ {5, \ 6}}], 
				
                      Line[{{10, \ 0}, \ {10, \ 6}}], 
				
                      Line[{{15, \ 0}, \ {15, \ 28}}], 
				
                      Line[{{20, \ 0}, \ {20, \ 6}}], 
				
                      Line[{{25, \ 0}, \ {25, \ 6}}], 
				
                      Line[{{30, \ 0}, \ {30, \ 6}}], 
				
                      Line[{{35, \ 0}, \ {35, \ 28}}]
			}]}\),
		\({Graphics[

                    				{GrayLevel[0], 
					
                      Rectangle[{3, \ 6}, \ {7, \ 28}], 
					
                      Rectangle[{8, \ 6}, \ {12, \ 28}], 
					
                      Rectangle[{18, \ 6}, \ {22, \ 28}], 
					
                      Rectangle[{23, \ 6}, \ {27, \ 28}], 
					
                      Rectangle[{28, \ 6}, \ {32, \ 28}]}]}\),
		{Graphics[
				{Text[StyleForm["0",  FontSize  ->  14,  
                            FontSlant  ->  Italic,  
                            FontFamily  ->  Times],  {2.5,  3}],
					Text[StyleForm["\!\(\*
StyleBox[\(-\),
FontSize->12]\)(1/2)", FontSize  ->  14, FontSlant  ->  Italic, FontFamily  ->  Times], {7.5,  3}],
					Text[
                          StyleForm["-1",  FontSize  ->  14,  
                            FontSlant  ->  Italic,  
                            FontFamily  ->  Times],  {12.5,  3}],
					\(Text[
                          StyleForm[\*""\!\(1\/4\)"", \ 
                            FontSize\  -> \ 14, \ FontSlant\  -> \ Italic, \ 
                            FontFamily\  -> \ Times], \ {17.5, \ 3}]\),
					Text[StyleForm["\!\(\*
StyleBox[\(-\),
FontSize->12]\)(1/4)", FontSize  ->  14, FontSlant  ->  Italic, FontFamily  ->  Times], {22.5,  3}],
					Text[StyleForm["\!\(\*
StyleBox[\(-\),
FontSize->12]\)(3/4)", FontSize  ->  14, FontSlant  ->  Italic, FontFamily  ->  Times], {27.5,  3}],
					Text[StyleForm["\!\(\*
StyleBox[\(-\),
FontSize->12]\)(5/4)", FontSize  ->  14, FontSlant  ->  Italic, FontFamily  ->  Times], {32.5,  3}],
					Text[
                          StyleForm["0",  FontSize  ->  14,  
                            FontSlant  ->  Italic,  
                            FontFamily  ->  Times],  {37.5,  3}]
				}]},
			\({Graphics[

                    				{
                      Text[StyleForm["C", \ FontSize\  -> \ 18, \ 
                          FontSlant\  -> \ Italic], \ {2.5, \ \(-2\)}], 

                      					
                      Text[StyleForm["D", \ FontSize\  -> \ 18, \ 
                          FontSlant\  -> \ Italic], \ {7.5, \ \(-2\)}], 

                      					
                      Text[StyleForm["E", \ FontSize\  -> \ 18, \ 
                          FontSlant\  -> \ Italic], \ {12.5, \ \(-2\)}], 

                      					
                      Text[StyleForm["F", \ FontSize\  -> \ 18, \ 
                          FontSlant\  -> \ Italic], \ {17.5, \ \(-2\)}], 

                      					
                      Text[StyleForm["G", \ FontSize\  -> \ 18, \ 
                          FontSlant\  -> \ Italic], \ {22.5, \ \(-2\)}], 

                      					
                      Text[StyleForm["A", \ FontSize\  -> \ 18, \ 
                          FontSlant\  -> \ Italic], \ {27.5, \ \(-2\)}], 

                      					
                      Text[StyleForm["B", \ FontSize\  -> \ 18, \ 
                          FontSlant\  -> \ Italic], \ {32.5, \ \(-2\)}], 

                      					
                      Text[StyleForm["C", \ FontSize\  -> \ 18, \ 
                          FontSlant\  -> \ Italic], \ {37.5, \ \(-2\)}]

                      					}]}\)
		}, AspectRatio  ->  Automatic, DisplayFunction  ->  Identity];

\(Show[Graphics[

          		{Rectangle[{0, \ 5}, \ {40, \ 35}, \ fig3], 
		
            Text[StyleForm["Figure 3", \ FontFamily\  -> \ Times, \ 
                FontSize\  -> \ 22, \ FontSlant\  -> \ Italic], 
              \ {20, \ 1}]}], \ DisplayFunction\  -> \ $DisplayFunction, \ 
        AspectRatio\  -> \ Automatic, \ PlotRange -> \ All, \ 
        ImageSize\  -> \ 4\ 72]\);

Sound Examples

Diesis

In meantone tuning mathematics, the enharmonic tones differ. Enharmonic tones are tones of different names but similar frequencies. Can you hear the difference? The function, MeanSemiF♯ToF, is an example of the meantone tuned semitone from F♯ to F.

\(MeanSemiF♯ToF[t_]\  := \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.4, \ 
        Sin[2\ π\ \((27\/16)\)\ \((440)\)\ t], 
		
        t\  >= \ 0.4\  && \ t\  < \ 0.8, \ 
        Sin[2\ π\ 
            \((\((2048\/2187)\)\ \((27\/16)\)\ \((531441\/524288)\))\) 
            \((\ 440)\)\ t]
	]; 

    Play[MeanSemiF♯ToF[t], \ {t, \ 0, \ 0.8}]\)

The function, MeanSemiEToE♯, is an example of the meantone tuned semitone from E to E♯.

\(MeanSemiEToE♯[t_]\  := \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.4, \ 
        Sin[2\ π\ \((3\/2)\)\ \((440)\)\ t], 
		
        t\  >= \ 0.4\  && \ t\  < \ 0.8, \ 
        Sin[2\ π\ 
            \((\((2187\/2048)\)\ \((3\/2)\)\ \((524288\/531441)\)\ 
                \((524288\/531441)\))\)\ \((440)\)\ \ t]
	]; 

    Play[MeanSemiEToE♯[t], \ {t, \ 0, \ 0.8}]\)

The function, Diesis, is an example of the difference in the meantone tuned tones of E♯ and F. Theoretically, these tones are enharmonic but meantone tuning says otherwise.

\(Diesis[t_]\  := \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.4, \ 
        Sin[2\ π\ 
            \((\((2048\/2187)\)\ \((27\/16)\)\ \((531441\/524288)\))\)\ 
            \((440)\)\ t], 
		t\  >= \ 0.4\  && \ t\  < \ 0.8, \ 
        Sin[2\ π\ 
            \((\((2187\/2048)\)\ \((3\/2)\)\ \((524288\/531441)\)\ 
                \((524288\/531441)\))\)\ \((440)\)\ t]
	]; 

    Play[Diesis[t], \ {t, \ 0, \ 0.8}]\)

Wolf Fifth

\(mtnoteC2\  = \ 260; 

    mtnoteG2\  = \ GenerateMeantoneMultiplier[1]\ mtnoteC2; 

    mtnoteD2\  = \ GenerateMeantoneMultiplier[2]\ mtnoteC2; 

    mtnoteA2\  = \ GenerateMeantoneMultiplier[3]\ mtnoteC2; 

    mtnoteE2\  = \ GenerateMeantoneMultiplier[4]\ mtnoteC2; 

    mtnoteB2\  = \ GenerateMeantoneMultiplier[5]\ mtnoteC2; 

    mtnoteF♯2\  = \ GenerateMeantoneMultiplier[6]\ mtnoteC2; 

    mtnoteC♯2\  = \ GenerateMeantoneMultiplier[7]\ mtnoteC2; 

    mtnoteG♯2\  = \ GenerateMeantoneMultiplier[8]\ mtnoteC2; \)

\(mtnoteF1\  = \ \((1/GenerateMeantoneMultiplier[1])\)\ mtnoteC2; 

    mtnoteB♭1\  = \ \((1/GenerateMeantoneMultiplier[2])\)\ mtnoteC2; 

    mtnoteE♭1\  = \ \((1/GenerateMeantoneMultiplier[3])\)\ mtnoteC2; 
    \)

The function, WolfFifth, plays the wolf fifth, G♯ to E♭, of the meantone scale.

\(WolfFifth[t_]\  := \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.4, \ 
        Sin[2\ π\ mtnoteG♯2\ t], 
		
        t\  >= \ 0.4\  && \ t\  < \ 0.8, \ 
        Sin[2  π\ 4  mtnoteE♭1\ t]
	]\)

As a reminder, here is a perfect Pythagorean fifth constructed from the meantone G♯.

\(Play[
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.4, \ 
        Sin[2\ π\ mtnoteG♯2\ t], 
		
        t\  >= \ 0.4\  && \ t\  < \ 0.8, \ 
        Sin[2  π\ \((3/2)\) mtnoteG♯2\ t]
	], \ {t, \ 0, \ 0.8}]
      \)

And here is the wolf fifth. Can you hear the difference?

Play[WolfFifth[t],  {t,  0,  0.8}]

Just Scale

Basic Discussion

As thirds became more widely used in music, a three note combination called a triad developed. A major triad is formed by adding a minor third on top of a major third. Mathematically, this is equivalent to the simultaneous sounding of a series of frequencies corresponding to 1 times the reference, (5/4) times the reference, and (3/2) times the reference. A minor triad has a similar construction. Adding a major third on top of a minor third creates this different chord. The multiplier series for the minor triad goes as 1 times the reference, (6/5) times the reference, and (3/2) times the reference. A new set of multipliers that construct the diatonic major scale can be found that are based on the major triad. The first tuned triad is F - A - C. Notice that this actually uses the reference as the top tone. We can do this by "going backwards" with the math. Multiplying the series by a factor of (4/3) will return a multiplier of 2 at the top end. We want this because an octave interval corresponds to 2 times the reference. This factor creates the series (4/3) , (5/3) , 2. Now construct the triad using C as the bottom end (C - E - G). The series is simply 1 , (5/4) , (3/2). At this point there is one triad left to construct (G - B - D) to complete the octave. Multiplying the series by a factor of (3/2) will place G at the bottom end. This results in a series of (3/2) , (15/8) , (9/4). This last note is outside the given octave so, to return, we must multiply by a factor of (1/2) giving (3/2) , (15/8) , (9/8). Figure 4 illustrates this scale construction.

\(fig4\  = \ 
      Show[
	{{
            Graphics[

              			{Line[{{0, \ 28}, \ {40, \ 28}}], 
				
                Line[{{0, \ 0}, \ {40, \ 0}}], 
				
                Line[{{0, \ 0}, \ {0, \ 28}}], 
				
                Line[{{40, \ 0}, \ {40, \ 28}}], 
				
                Line[{{5, \ 0}, \ {5, \ 6}}], 
				
                Line[{{10, \ 0}, \ {10, \ 6}}], 
				
                Line[{{15, \ 0}, \ {15, \ 28}}], 
				
                Line[{{20, \ 0}, \ {20, \ 6}}], 
				
                Line[{{25, \ 0}, \ {25, \ 6}}], 
				
                Line[{{30, \ 0}, \ {30, \ 6}}], 
				
                Line[{{35, \ 0}, \ {35, \ 28}}]
			}]}, 

          		{Graphics[

              				{GrayLevel[0], 
					
                Rectangle[{3, \ 6}, \ {7, \ 28}], 
					
                Rectangle[{8, \ 6}, \ {12, \ 28}], 
					
                Rectangle[{18, \ 6}, \ {22, \ 28}], 
					
                Rectangle[{23, \ 6}, \ {27, \ 28}], 
					
                Rectangle[{28, \ 6}, \ {32, \ 28}]}]}, 

          		{Graphics[

              				{
                Text[StyleForm["1", \ FontSize\  -> \ 14, \ 
                    FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times], 
                  \ {2.5, \ 3}], 
					
                Text[StyleForm[\*""\!\(9\/8\)"", \ FontSize\  -> \ 14, 
                    \ FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times], 
                  \ {7.5, \ 3}], 
					
                Text[StyleForm[\*""\!\(5\/4\)"", \ FontSize\  -> \ 14, 
                    \ FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times], 
                  \ {12.5, \ 3}], 
					
                Text[StyleForm[\*""\!\(4\/3\)"", \ FontSize\  -> \ 14, 
                    \ FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times], 
                  \ {17.5, \ 3}], 
					
                Text[StyleForm[\*""\!\(3\/2\)"", \ FontSize\  -> \ 14, 
                    \ FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times], 
                  \ {22.5, \ 3}], 
					
                Text[StyleForm[\*""\!\(5\/3\)"", \ FontSize\  -> \ 14, 
                    \ FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times], 
                  \ {27.5, \ 3}], 
					
                Text[StyleForm[\*""\!\(15\/8\)"", \ FontSize\  -> \ 14, 
                    \ FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times], 
                  \ {32.5, \ 3}], 
					
                Text[StyleForm["2", \ FontSize\  -> \ 14, \ 
                    FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times], 
                  \ {37.5, \ 3}]
				}]}
	}, \ 
        AspectRatio\  -> \ Automatic, \ DisplayFunction\  -> \ Identity]; 


    Show[Graphics[

        		{Rectangle[{0, \ 5}, \ {40, \ 33}, \ fig4], 
		
          Text[StyleForm["Figure 4", \ FontFamily\  -> \ Times, \ 
              FontSize\  -> \ 22, \ FontSlant\  -> \ Italic], \ {20, \ 1}]}], 
      \ DisplayFunction\  -> \ $DisplayFunction, \ 
      AspectRatio\  -> \ Automatic, \ PlotRange -> \ All, \ 
      ImageSize\  -> \ 4\ 72]; \)

Advantages and Drawbacks of Just Tuning

Three just major triads and two just minor triads make for a pretty good scale construction. However, there are some problems in this scale. For instance, the interval from D to A ((40/27)) is flat of a just fifth. This causes the minor triad, D - F - A to be quite out of tune. Further investigation of this scale reveals another interesting problem. The interval from C to D is (9/8), and the interval from D to E is (10/9) — two different sizes of whole steps! The step from D to E is slightly smaller than the step from C to E. Diesis (different enharmonic frequencies) again rears its ugly visage in this scale as it did in the meantone construction in the complete chromatic scale. Though many amateur and professional musicians (including the famed acoustician/experimental physicist, Hermann Helmholtz) have praised this scale, the problems that occur make this scale impractical for universal application as well.

Sound Examples

Triad root tones

In Just tuning mathematics, the minor triads in the scale differ. The function, JustTriad1, is an example of the C♯ minor triad. This is based on an A4 (440 Hz) tuned scale.

\(JustTriad1[t_]\  := \ 
      Which[t\  >= \ 0\  && \ t\  < \ 0.3, \ Sin[2\ Pi\ \((5/4)\)\ 440\ t], 

        	t\  >= \ 0.3\  && \ t\  < \ 0.6, \ Sin[2\ Pi\ \((3/2)\)\ 440\ t], 

        	t\  >= \ 0.6\  && \ t\  < \ 0.9, \ Sin[2\ Pi\ \((15/8)\)\ 440\ t]]; 
    
Play[JustTriad1[t], \ {t, \ 0, \ 0.9}]\)

The function, JustTriad2, is an example of the C♯ minor triad. This is based on a B4 (495 Hz) tuned scale.

\(JustTriad2[t_]\  := \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.3, \ 
        Sin[2\ π\ \((9\/8)\) \((495)\)\ t], 
		
        t\  >= \ 0.3\  && \ t\  < \ 0.6, \ 
        Sin[2\ π\ \((4\/3)\)\ \((495)\)\ t], 
		
        t\  >= \ 0.6\  && \ t\  < \ 0.9, \ 
        Sin[2\ π\ \((5\/3)\)\ \((495)\)\ t]
	]; 

    Play[JustTriad2[t], \ {t, \ 0, \ 0.9}]\)

The two triads sound pretty good, but they aren't quite the same. The roots of the triads (C♯) differ slightly. The function, TriadRoot, plays the roots of the two triads. Can you hear the difference?

\(TriadRoot[t_]\  := \ \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.4, \ 
        Sin[2\ π\ \((5\/4)\)\ \((440)\)\ t], 
		
        t\  >= \ 0.4\  && \ t\  < \ 0.8, \ 
        Sin[2\ π\ \((9\/8)\)\ \((495)\)\ t]
	]; 

    Play[TriadRoot[t], \ {t, \ 0, \ 0.8}]\)

Diesis in Just scale whole tones

The diesis of Just tuning can be seen (and heard) in the different whole tones. The function, CtoD1, plays C to D tuned in a C Major scale (260 Hz).

\(\(CtoD1[t_]\  := \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.4, \ 
        Sin[2\ π\ \((260)\)\ t], 
		t\  >= \ 0.4\  && \ t\  < \ 0.8, \ 
        Sin[2\ π\ \((9\/8)\)\ \((260)\)\ t]
	]; \)\)

Play[CtoD1[t],  {t,  0,  0.8}]

The function, CtoD2, plays C to D tuned in a B♭ Major scale (231.111 Hz).

\(\(CtoD2[t_]\  := \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.4, \ 
        Sin[2\ π\ \((9\/8)\) \((2080\/9)\)\ t], 
		
        t\  >= \ 0.4\  && \ t\  < \ 0.8, \ 
        Sin[2\ π\ \((10\/9)\)\ \((9\/8)\) \((2080\/9)\)\ t]
	]; \)\)

Play[CtoD2[t],  {t,  0,  0.8}]

The function, JustDiesis, plays the two D notes. Can you hear the difference?

\(\(JustDiesis[t_]\  := \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.4, \ 
        Sin[2\ π\ \((9\/8)\) \((260)\)\ t], 
		
        t\  >= \ 0.4\  && \ t\  < \ 0.8, \ 
        Sin[2\ π\ \((10\/9)\)\ \((9\/8)\) \((2080\/9)\)\ t]
	]; \)\)

Play[JustDiesis[t],  {t,  0,  0.8}]

Tempered Scale

Basic Discussion

At this point, one wonders if a method of scale tuning that smooths out the big problems of Pythagorean, meantone and just scales can be devised. When one problem is corrected, another steps in to take its place. About two hundred years ago, the mathematics of the afore mentioned scales were disregarded and a new scale idea formed -- the cent. If an octave were divided into 1200 equally spaced intervals called cents (¢), then one semitone (otherwise known as a halfstep) would consist of 100¢. To illustrate, the step from D# to E is 100¢ and the step from B to C is 100¢. All other intervals can be thought of as just a summation of semitones. A whole step is 200¢, a major third is 400¢, a perfect fifth is 700¢, and so on.  The advantage in this is that all semitones are equally spaced throughout the octave by design. All that remains now is to find the half step interval multiplier from the mathematics of this idea. To find the octave from semitone intervals, you have to multiply the semitone multiplier times itself a total of 12 times. Since this corresponds to an octave, it is equivalent to 2 times the reference. Once again, the following example illustrates, mathematically, this construction. Let s be the semitone multiplier.

s × s × s × s × s × s 
        × s × s × s × s × s 
        × s = (s^12) == 2

Now solve for s. This sort of equation is called a twelfth order equation. This means that we will get 12 solutions to this equation. You will notice that some of these solutions are complex (they contain real and imaginary parts). We are only interested in the positive real solutions, since tuning pianos relies solely on real numbers. Rounding the solution to six numerals is the easiest method of expression.

solution  =  NSolve[s^12 ==  2,  s]

semitoneMultiplier  =  s  /.  solution[[12]]

(semitoneMultiplier^12)

GenerateTemperedMultiplier[tone_]  :=  (semitoneMultiplier^tone)

GenerateTemperedMultiplier[12]

If we multiply 1.05946 times itself twelve times we get (roughly) 2. An illustration of the construction of the entire chromatic scale based on this multiplier can be seen in Figure 5.

\(fig5\  = \ 
      Show[
	{{
            Graphics[

              			{Line[{{0, \ 28}, \ {40, \ 28}}], 
				
                Line[{{0, \ 0}, \ {40, \ 0}}], 
				
                Line[{{0, \ 0}, \ {0, \ 28}}], 
				
                Line[{{40, \ 0}, \ {40, \ 28}}], 
				
                Line[{{5, \ 0}, \ {5, \ 6}}], 
				
                Line[{{10, \ 0}, \ {10, \ 6}}], 
				
                Line[{{15, \ 0}, \ {15, \ 28}}], 
				
                Line[{{20, \ 0}, \ {20, \ 6}}], 
				
                Line[{{25, \ 0}, \ {25, \ 6}}], 
				
                Line[{{30, \ 0}, \ {30, \ 6}}], 
				
                Line[{{35, \ 0}, \ {35, \ 28}}]
			}]}, 

          		{Graphics[

              				{GrayLevel[0], 
					
                Rectangle[{3, \ 6}, \ {7, \ 28}], 
					
                Rectangle[{8, \ 6}, \ {12, \ 28}], 
					
                Rectangle[{18, \ 6}, \ {22, \ 28}], 
					
                Rectangle[{23, \ 6}, \ {27, \ 28}], 
					
                Rectangle[{28, \ 6}, \ {32, \ 28}]}]}, 

          		{Graphics[

              				{
                Text[StyleForm["1.000", \ FontSize\  -> \ 10, \ 
                    FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times], 
                  \ {2, \ 3}, \ {\(-1\), \ 0}, \ {0, \ 1}], 
					
                Text[StyleForm["1.059", \ FontSize\  -> \ 10, \ 
                    FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times, \ 
                    FontColor\  -> \ GrayLevel[1]], \ {4.2, \ 10}, 
                  \ {\(-1\), \ 0}, \ {0, \ 1}], 
					
                Text[StyleForm["1.122", \ FontSize\  -> \ 10, \ 
                    FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times], 
                  \ {7, \ 3}, \ {\(-1\), \ 0}, \ {0, \ 1}], 
					
                Text[StyleForm["1.189", \ FontSize\  -> \ 10, \ 
                    FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times, \ 
                    FontColor\  -> \ GrayLevel[1]], \ {9.2, \ 10}, 
                  \ {\(-1\), \ 0}, \ {0, \ 1}], 
					
                Text[StyleForm["1.260", \ FontSize\  -> \ 10, \ 
                    FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times], 
                  \ {12, \ 3}, \ {\(-1\), \ 0}, \ {0, \ 1}], 
					
                Text[StyleForm["1.335", \ FontSize\  -> \ 10, \ 
                    FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times], 
                  \ {17, \ 3}, \ {\(-1\), \ 0}, \ {0, \ 1}], 
					
                Text[StyleForm["1.414", \ FontSize\  -> \ 10, \ 
                    FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times, \ 
                    FontColor\  -> \ GrayLevel[1]], \ {19.2, \ 10}, 
                  \ {\(-1\), \ 0}, \ {0, \ 1}], 
					
                Text[StyleForm["1.498", \ FontSize\  -> \ 10, \ 
                    FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times], 
                  \ {22, \ 3}, \ {\(-1\), \ 0}, \ {0, \ 1}], 
					
                Text[StyleForm["1.587", \ FontSize\  -> \ 10, \ 
                    FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times, \ 
                    FontColor\  -> \ GrayLevel[1]], \ {24.2, \ 10}, 
                  \ {\(-1\), \ 0}, \ {0, \ 1}], 
					
                Text[StyleForm["1.682", \ FontSize\  -> \ 10, \ 
                    FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times], 
                  \ {27, \ 3}, \ {\(-1\), \ 0}, \ {0, \ 1}], 
					
                Text[StyleForm["1.782", \ FontSize\  -> \ 10, \ 
                    FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times, \ 
                    FontColor\  -> \ GrayLevel[1]], \ {29.2, \ 10}, 
                  \ {\(-1\), \ 0}, \ {0, \ 1}], 
					
                Text[StyleForm["1.888", \ FontSize\  -> \ 10, \ 
                    FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times], 
                  \ {32, \ 3}, \ {\(-1\), \ 0}, \ {0, \ 1}], 
					
                Text[StyleForm["2.000", \ FontSize\  -> \ 10, \ 
                    FontSlant\  -> \ Italic, \ FontFamily\  -> \ Times], 
                  \ {37, \ 3}, \ {\(-1\), \ 0}, \ {0, \ 1}]
				}]}

          	}, \ AspectRatio\  -> \ Automatic, \ 
        DisplayFunction\  -> \ Identity]; 


    Show[Graphics[

        		{Rectangle[{0, \ 5}, \ {40, \ 33}, \ fig5], 
		
          Text[StyleForm["Figure 5", \ FontFamily\  -> \ Times, \ 
              FontSize\  -> \ 22, \ FontSlant\  -> \ Italic], \ {20, \ 1}]}], 
      \ \ DisplayFunction\  -> \ $DisplayFunction, \ 
      AspectRatio\  -> \ Automatic, \ PlotRange -> \ All, \ 
      ImageSize\  -> \ 4\ 72]; \)

Advantages and Drawbacks of Tempered Tuning

Systems of tuning that predate the tempered scale are impractical for modern music because of a composer's desire to change key signatures in the middle of a piece or to include atypical chords and chord structures. Scales of the past simply did not have the required flexibility for modern musical expression. They are limited to the key in which they are tuned and even more so to certain playable intervals in that key. The tempered scale is a collection of interval multipliers designed to correct the problems of Pythagorean, meantone, and just scales and to accomodate more modern trends in music composition. Although problems in this system do exist (tempered major thirds are 14¢ sharp of the just major third and the tempered minor thirds are 16¢ flat of the just minor thirds), the freedom provided by tempered tuning to change key signatures, and to play any interval without diesis or appreciable comma problems is a fair enough trade-off to warrant acceptance by most musicians as the best method of tuning.

Sound Examples

Major and Minor scales in tempered tuning.

Using the GenerateTemperedMultiplier iterative function defined above, the chromatic scale can be constructed starting at C (260 Hz).

\(tsnoteC\  = \ 260; 

    tsnoteC♯\  = \ 
      \(tsnoteD♭\  = \ GenerateTemperedMultiplier[1]\ tsnoteC\); 

    tsnoteD\  = \ GenerateTemperedMultiplier[2]\ tsnoteC; 

    tsnoteD♯\  = \ 
      \(tsnoteE♭\  = \ GenerateTemperedMultiplier[3]\ tsnoteC\); 

    tsnoteE\  = \ 
      \(tsnoteF♭\  = \ GenerateTemperedMultiplier[4]\ tsnoteC\); 

    tsnoteF\  = \ 
      \(tsnoteE♯\  = \ GenerateTemperedMultiplier[5]\ tsnoteC\); 

    tsnoteF♯\  = \ 
      \(tsnoteG♭\  = \ GenerateTemperedMultiplier[6]\ tsnoteC\); 

    tsnoteG\  = \ GenerateTemperedMultiplier[7]\ tsnoteC; 

    tsnoteG♯\  = \ 
      \(tsnoteA♭\  = \ GenerateTemperedMultiplier[8]\ tsnoteC\); 

    tsnoteA\  = \ GenerateTemperedMultiplier[9]\ tsnoteC; 

    tsnoteA♯\  = \ 
      \(tsnoteB♭\  = \ GenerateTemperedMultiplier[10]\ tsnoteC\); 

    tsnoteB\  = \ 
      \(tsnoteC2♭\  = \ GenerateTemperedMultiplier[11]\ tsnoteC\); 

    tsnoteC2\  = \ 
      \(tsnoteB♯\  = \ GenerateTemperedMultiplier[12]\ tsnoteC\); \)

TemperedChromaticScale combines these notes to form the tempered tuned chromatic scale.

\(\(TemperedChromaticScale[t_]\  := \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.3, \ Sin[2\ π\ tsnoteC\ t], 
        
		t\  >= \ 0.3\  && \ t\  < \ 0.6, \ 
        Sin[2\ π\ tsnoteC♯\ t], 
		
        t\  >= \ 0.6\  && \ t\  < \ 0.9, \ Sin[2\ π\ tsnoteD\ t], 
		
        t\  >= \ 0.9\  && \ t\  < \ 1.2, \ Sin[2\ π\ tsnoteD♯\ t], 
        
		t\  >= \ 1.2\  && \ t\  < \ 1.5, \ Sin[2\ π\ tsnoteE\ t], 

        		t\  >= \ 1.5\  && \ t\  < \ 1.8, \ Sin[2\ π\ tsnoteF\ t], 

        		t\  >= \ 1.8\  && \ t\  < \ 2.1, \ 
        Sin[2\ π\ tsnoteF♯\ t], 
		
        t\  >= \ 2.1\  && \ t\  < \ 2.4, \ Sin[2\ π\ tsnoteG\ t], 
		
        t\  >= \ 2.4\  && \ t\  < \ 2.7, \ Sin[2\ π\ tsnoteG♯\ t], 
        
		t\  >= \ 2.7\  && \ t\  < \ 3.0, \ Sin[2\ π\ tsnoteA\ t], 

        		t\  >= \ 3.0\  && \ t\  < \ 3.3, \ 
        Sin[2\ π\ tsnoteA♯\ t], 
		
        t\  >= \ 3.3\  && \ t\  < \ 3.6, \ Sin[2\ π\ tsnoteB\ t], 
		
        t\  >= \ 3.6\  && \ t\  < \ 3.9, \ Sin[2\ π\ tsnoteC2\ t]
	]; 
    \)\)

Now the chromatic scale can be played.

Play[TemperedChromaticScale[t],  {t,  0,  3.9}]

By selecting the correct notes, the Major scale can be constructed.

\(\(TemperedMajorScale[t_]\  := \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.3, \ Sin[2\ π\ tsnoteC\ t], 
        
		t\  >= \ 0.3\  && \ t\  < \ 0.6, \ Sin[2\ π\ tsnoteD\ t], 

        		t\  >= \ 0.6\  && \ t\  < \ 0.9, \ Sin[2\ π\ tsnoteE\ t], 

        		t\  >= \ 0.9\  && \ t\  < \ 1.2, \ Sin[2\ π\ tsnoteF\ t], 

        		t\  >= \ 1.2\  && \ t\  < \ 1.5, \ Sin[2\ π\ tsnoteG\ t], 

        		t\  >= \ 1.5\  && \ t\  < \ 1.8, \ Sin[2\ π\ tsnoteA\ t], 

        		t\  >= \ 1.8\  && \ t\  < \ 2.1, \ Sin[2\ π\ tsnoteB\ t], 

        		t\  >= \ 2.1\  && \ t\  < \ 2.4, \ Sin[2\ π\ tsnoteC2\ t]

        	]; \)\)

Now the Major scale can be played.

Play[TemperedMajorScale[t],  {t,  0,  2.4}]

By selecting the correct notes, the Natural Minor scale can be constructed.

\(\(TemperedNaturalMinorScale[t_]\  := \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.3, \ Sin[2\ π\ tsnoteC\ t], 
        
		t\  >= \ 0.3\  && \ t\  < \ 0.6, \ Sin[2\ π\ tsnoteD\ t], 

        		t\  >= \ 0.6\  && \ t\  < \ 0.9, \ 
        Sin[2\ π\ tsnoteE♭\ t], 
		
        t\  >= \ 0.9\  && \ t\  < \ 1.2, \ Sin[2\ π\ tsnoteF\ t], 
		
        t\  >= \ 1.2\  && \ t\  < \ 1.5, \ Sin[2\ π\ tsnoteG\ t], 
		
        t\  >= \ 1.5\  && \ t\  < \ 1.8, \ Sin[2\ π\ tsnoteA♭\ t], 
        
		t\  >= \ 1.8\  && \ t\  < \ 2.1, \ 
        Sin[2\ π\ tsnoteB♭\ t], 
		
        t\  >= \ 2.1\  && \ t\  < \ 2.4, \ Sin[2\ π\ tsnoteC2\ t]
	]; 
    \)\)

Now the Natural Minor scale can be played.

Play[TemperedNaturalMinorScale[t],  {t,  0,  2.4}]

By selecting the correct notes, the Harmonic Minor scale can be constructed.

\(\(TemperedHarmonicMinorScale[t_]\  := \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.3, \ Sin[2\ π\ tsnoteC\ t], 
        
		t\  >= \ 0.3\  && \ t\  < \ 0.6, \ Sin[2\ π\ tsnoteD\ t], 

        		t\  >= \ 0.6\  && \ t\  < \ 0.9, \ 
        Sin[2\ π\ tsnoteE♭\ t], 
		
        t\  >= \ 0.9\  && \ t\  < \ 1.2, \ Sin[2\ π\ tsnoteF\ t], 
		
        t\  >= \ 1.2\  && \ t\  < \ 1.5, \ Sin[2\ π\ tsnoteG\ t], 
		
        t\  >= \ 1.5\  && \ t\  < \ 1.8, \ Sin[2\ π\ tsnoteA♭\ t], 
        
		t\  >= \ 1.8\  && \ t\  < \ 2.1, \ Sin[2\ π\ tsnoteB\ t], 

        		t\  >= \ 2.1\  && \ t\  < \ 2.4, \ Sin[2\ π\ tsnoteC2\ t]

        	]; \)\)

Now the Harmonic Minor scale can be played.

Play[TemperedHarmonicMinorScale[t],  {t,  0,  2.4}]

By selecting the correct notes, the Melodic Minor scale can be constructed.

\(\(TemperedMelodicMinorScale[t_]\  := \ 
      Which[
		t\  >= \ 0\  && \ t\  < \ 0.3, \ Sin[2\ π\ tsnoteC\ t], 
        
		t\  >= \ 0.3\  && \ t\  < \ 0.6, \ Sin[2\ π\ tsnoteD\ t], 

        		t\  >= \ 0.6\  && \ t\  < \ 0.9, \ 
        Sin[2\ π\ tsnoteE♭\ t], 
		
        t\  >= \ 0.9\  && \ t\  < \ 1.2, \ Sin[2\ π\ tsnoteF\ t], 
		
        t\  >= \ 1.2\  && \ t\  < \ 1.5, \ Sin[2\ π\ tsnoteG\ t], 
		
        t\  >= \ 1.5\  && \ t\  < \ 1.8, \ Sin[2\ π\ tsnoteA♭\ t], 
        
		t\  >= \ 1.8\  && \ t\  < \ 2.1, \ 
        Sin[2\ π\ tsnoteB♭\ t], 
		
        t\  >= \ 2.1\  && \ t\  < \ 2.4, \ Sin[2\ π\ tsnoteC2\ t], 
		
        t\  >= \ 2.4\  && \ t\  < \ 2.7, \ Sin[2\ π\ tsnoteB\ t], 
		
        t\  >= \ 2.7\  && \ t\  < \ 3.0, \ Sin[2\ π\ tsnoteA\ t], 
		
        t\  >= \ 3.0\  && \ t\  < \ 3.3, \ Sin[2\ π\ tsnoteG\ t], 
		
        t\  >= \ 3.3\  && \ t\  < \ 3.6, \ Sin[2\ π\ tsnoteF\ t], 
		
        t\  >= \ 3.6\  && \ t\  < \ 3.9, \ Sin[2\ π\ tsnoteE♭\ t], 
        
		t\  >= \ 3.9\  && \ t\  < \ 4.2, \ Sin[2\ π\ tsnoteD\ t], 

        		t\  >= \ 4.2\  && \ t\  < \ 4.5, \ Sin[2\ π\ tsnoteC\ t]

        	]; \)\)

Now the Melodic Minor scale can be played.

Play[TemperedMelodicMinorScale[t],  {t,  0,   4.5}]

Conclusions

Even though the ear may prefer the tone relationships discovered by Pythagoras over tempered tuning in theoretical interval situations, we know that theory rarely holds true to practice. As musical expression continued to break the boundaries set by past systems of tuning, scales needed revision in order to handle the complexity that accompanied changing musical tastes. Unfortunately, these revisions often required acceptance of new problems. This leaves two options : 1) writing music that avoids the problems of certain tuning systems or 2) minimize the problems. The tempered scale is the product of the efforts of minimization. Tempered tuning is the least restrictive scale for music created in the last two to three hundred years. The slight blemishes of the tempered scale seem insignificant to the limitations that prevail in the earlier three systems when they are used in a modern piano prelude or sonata.

References

Backus, John, The Foundations of Musical Acoustics: Second Edition, W. W. Norton & Company, New York, 1977.

Benade, Arthur H., Fundamentals of Musical Acoustics, Dover Publications, Inc., New York, 1990.

Closure

I wish to thank Dr. Roger Nelson, Professor of Mathematics, Ball State University, for giving me the idea that proved invaluable inspiration for writing this notebook.

"If we shadows have offended, 
	Think but this, and all is mended, 
	That you have but slumber'd here 
	While these visions did appear. 
	And this weak and idle theme, 
	No more yielding but a dream, 
	Gentles, do not reprehend: 
	if you pardon, we will mend: 
	And, as I am an honest Puck, 
	If we have unearned luck 
	Now to 'scape the serpent's tongue, 
	We will make amends ere long; 
	Else the Puck a liar call; 
	So, good night unto you all. 
	Give me your hands, if we be friends, 
	And Robin shall restore amends."

A Midsummer Night's Dream - Act V, Scene I