Deriving the Musical Scale

by Jeff Jensen           2002

Why are the keys on the piano tuned the way they are? This simple question led to browsing a good number of the vast collection of web sites and library books on music theory, but I still couldn't find an explanation that covered the ground I wanted. In this discussion, which is still evolving, I hope to explore what principles lie behind the construction of the standard Western musical scales and the music that is based upon them.

In fact, I want to try to understand basic music theory, including such deep subjects as tonality and the theory of harmony, from an outsider's perspective, utilizing principles of physics, mathematics and human hearing. (Presumably then, the things that have no such explanation can be attributed to arbitrary cultural conventions). I also want to avoid giving a historical discussion, however worthwhile that may be, and avoid using arcane terminology, like "diesis" or "septimal comma", as much as possible. There are still a number of unanswered questions and gaps in this discussion, and probably some outright errors. If you know how to fix something, please email me .

Contents: (Newer material in Extras section)

  1. The Major scale from Harmonics (Just Intonation) [2002]
  2. The Minor scale(s) (Just Intonation)
    • Why is A the relative minor to C?
  3. Fundamental Bass of Rameau
  4. The dissonance curve of [Plomp and Levelt 1965], [Sethares 1993]
  5. What does this mean for scales?
  6. Changing keys: Graphical Applet to demonstrate the problems changing keys in JI
  7. What are sharps and flats? Why do we need them?
  8. What about simple whole number ratios?
  9. Deriving 12 Tone equal temperament. Why 12?
  10. What is tonality? Why does the G7 chord "resolve" to C? (not available yet)
  11. Brief historical remarks.(not available yet)
  12. Concluding Remarks and Other Scales
  13. References
  14. Acknowledgements and additional references
Extras:
  1. Theory of Temperament: Meantone, Irregular and n-equal [2005]
  2. Virtual Pitch calculation applet [2005]
  3. Properties of the Circle of 5ths and Identifying Chords [2004]
  4. Theory of Chords from Harmonics
  5. charts of scales and blank circle of 5ths diagrams
  6. Appendix: Applet to study the reflections of waves on a string
  7. .

The Major Scale from Harmonics 

To get started, consider plucking a taut string on a guitar, for example, or striking a piano string with a hammer. The string will vibrate at a fundamental frequency f, and segments of it vibrate with frequencies 2f, 3f, 4f, ... These are harmonics. (Strictly speaking, a real string is not perfectly flexible, and the vibration rates of the segments deviate a little from pure integer multiples of the fundamental frequency. In acoustics, the term partials is prefered. For solid objects like bells and gongs, the partials differ greatly from integer multiples of the fundamental. However, in the present discussion, we shall avoid this complication and work with harmonics).

Octave Equivalence Axiom: A tone produced at frequency f and another tone at 2f are so similiar in sound and blend so well together that they are identified as "the same note", or more precisely, they are given the same letter name ( e.g. "C" ) and considered to belong to the same family. (This does not mean they are interchangeable for all musical purposes. For example, they are not in a melody).

Please note: if a common musical term is unfamiliar, see [Apel 1961] in the references.

The Major Triad comes from the harmonics of a string (so just plucking a string is making a weak chord!) If the fundamental frequency is f ( for definiteness, let it be 264Hz, the Middle C in Just Intonation for A = 440Hz ) then the harmonics, separated into octaves, are:

[ f ],    [ 2f, 3f, ]    [ 4f, 5f, 6f, 7f ]    [8f, 9f, 10f, 11f, 12f, 13f, 14f, 15f ], ....

2f, 4f, 8f, are all C's by the Octave Axiom. Let us consider the harmonics which are not 2 raised to an integer power. For reasons which will become clear later, we shall call 3f a G and 5f an E. Since the notes of the scale repeat in every octave, we want to find the corresponding frequency in the base octave [f, 2f]. Multiplying by 1/2 (as many times as necessary to bring them down into range) we find E has the frequency 5/4f and G has 3/2f. The higher harmonics are also interesting, especially the 7th and 9th, but they aren't incorporated in deriving the standard major scale. (The 7th is mentioned by Ellis in [Helmholtz 1877 p.464] and the 9th is a D, because it is the 3rd harmonic of G ). Indeed, it is said piano makers traditionally try to make the hammer strike the string 1/7 of the distance from the end to (partially) suppress the 7th harmonic [Helmholtz 1877 p.79]; [Backus 1969 p. 241] claims that the thickness of the hammer nullifies this. Anyway, the intensity of the upper harmonics is very weak, and they contribute mostly to timbre.

Thus the C Major chord (C-E-G) has the frequency set ( 1f, 5/4f, 3/2f) which we shall write in array, or row vector, notation as
[1 5/4 3/2] f.
It is based on the dominance of the 3rd and 5th harmonics; indeed the note given by the 3rd harmonic is called the dominant. See the dissonance curve link below.

[Watch Out: The 3rd harmonic of f is the 5th step in the diatonic major scale; the 5th harmonic is the 3rd scale step, so we shall try to be very explicit to avoid confusion. When musicians say 5th, as in "Circle of 5ths", they are referring to the 5th step of the diatonic scale].

Based upon the strength of the consonances with C (discussed in more detail when we get to the dissonance curve), we complete the major scale by taking the 3rd harmonic of C (namely G) and building the major chord there, and then finding the note below middle C which has middle C as its 3rd harmonic (namely F) and building another major chord there. Note that F (frequency 2/3f -- or 4/3f when put in the proper octave) is not one of the harmonics of C no matter how high you go, but C is a harmonic of F. To see that F is not a harmonic of C, observe that 2, raised to any integer power, times 4/3f is not equal to any integer multiple of f.

We derive the G major triad by
[1 5/4 3/2] (3/2f) = [ 3/2 15/8 9/4] = (G-B-D)

and the F major triad
[1 5/4 3/2] (4/3f) = [ 4/3 20/12 12/6] = (F-A-C)

Then, rescaling (this is probably the origin of the word) by 1/2 to bring terms into the correct octave and reducing fractions to lowest terms, we have the frequency set for the (Just) major scale:

(C-D-E-F-G-A-B) = [ 1 9/8 5/4 4/3 3/2 5/3 15/8 ]


Definition: A scale or key is the set of individual notes taken from a related family of chords. Thus a melody can wander around in this set of tones and pleasantly harmonize with the chords, or another melodic line. Of course, the scale we just defined also allows for the dissonant tension and resolution of a cadence. Remark: This is what we propose as the basic definition of a musical scale. Later in this document we will consider some other possible definitions and scales.

Since our defining 3 note chords are C = (C-E-G), F = (F-A-C), and G = (G-B-D), and they are all 3 note chords with the notes separated by one note (we don't want the pitches too close or they will fall in the maximum dissonance region, the discussion of which is coming up), we can easily think to form the remaining possibilities (D-F-A), (E-G-B), (A-C-E) and (B-D-F). (The natural idea of applying the major chord operator [1 5/4 3/2] to every note in this scale will lead us outside the scale! More on that in the discussion of Changing Keys below). We could compute the relative dissonance values of these chords, but we'll take it as an empirical fact that Am = (A-C-E) and Em = (E-G-B) sound the best. These are minor chords.

The above discussion does not reflect what actually happened historically.

The Minor Scale(s) 

Continuing the above discussion, let's look at their ratios ( extending into the next octave so as to preserve the increasing order of the frequencies i.e. the chords are in root position):

(A-C-E) = [  5/3 2/1  5/2 ] =  5/3 [ 1 6/5 3/2] 

(E-G-B) = [ 5/4 3/2 15/8 ] = 5/4 [ 1 6/5 3/2]
(D-F-A) = [ 9/8 4/3 5/3 ] = 9/8 [ 1 32/27 40/27] (not the same triad)
(B-D-F) = [ 15/8 9/4 8/3 ] = 15/8 [ 1 6/5 64/45] (not the same triad)


The array [ 1 6/5 3/2] is the minor chord triad; let's see if we can show it has some nice fundamental properties to justify this distinction. Going back down to C with frequency f, we form the C minor chord (1f) [1 6/5 3/2] = [1 6/5 3/2](f) and list the harmonics of the notes:

1f:       2f      3f      4f      5f      6f      7f ...

(6/5)f: 2(6/5f) 3(6/5f) 4(6/5f) 5(6/5f) 6(6/5f) 7(6/5f) ...
(3/2)f: 2(3/2f) 3(3/2f) 4(3/2f) 5(3/2f) 6(3/2f) 7(3/2f) ...


We see that the [6th harmonic of f] = [5th harmonic of (6/5)f] = [4th harmonic of (3/2)f], and this is what characterizes a minor chord, although [Helmholtz 1877 p.232] seems to say something slightly different, which is worrisome. Also note that this characterization isn't nearly as fundamental as the major chord. We can play the same game as before and build the C minor scale with triads on C, F, and G. Note that 6/5 is a local minima of C's dissonance curve. We get [Helmholtz 1877 p.274]

F: (4/3) [ 1 6/5 3/2 ] = [ 4/3 8/5 2/1         ] = (F - Ab - C) = Fm

G: (3/2) [ 1 6/5 3/2 ] = [ 3/2 9/5 9/4 9/8 ] = (G - Bb - D) = Gm


And thus the C minor scale: [1 9/8 6/5 4/3 3/2 8/5 9/5].

This is called the natural minor [Apel 1961 p.262] Other minor scales are a formed by using more notes from the major scale: The notes from the chords Cm, Fm, G give the harmonic minor, and using the notes from Cm, F, G when ascending, and Cm, Fm, Gm when descending, gives the melodic minor.

At this point, we should take a look at the Dissonance Curve and Applet. There we can better see why C, F, and G chords are chosen for the major and minor scales.

Why is A minor considered the relative minor to C major? In equal temperament (discussed later) they share exactly the same set of notes. Here, in the more fundamental just intonation, they share all but one key: Apply the minor scale operator to the A from C major (and rescale)

[1 9/8 6/5 4/3 3/2 8/5 9/5] ( 5/3) = [5/3 15/8 2 20/18 5/4 4/3 3/2]

Thus 20/18 = 10/9 is the only one that doesn't match up. The other perfect minor triad in the C major scale was Em = (E-G-B) and it also misses by only 1 note (F#):

[1 9/8 6/5 4/3 3/2 8/5 9/5] ( 5/4) = [5/4 45/32 3/2 5/3 15/8 2 9/4]

Thus we have natural 2 choices for a minor key related to C major; the 10/9 of A minor would have to be corrected by the factor 6/5 = 1.2 to be F=4/3f, whereas 45/32 of E minor must be corrected by the factor 128/135 = 0.948. Thus E minor would seem to be closer, but that is not the way it is: E minor is the relative minor of G major. So we do not have an adequate explanation for this without appealing to equal temperament, or perhaps certain meantone temperaments. But see my remarks about reflections in the Circle of 5ths.

Aside: The Fundamental Bass of Rameau 

In 1721, Rameau put forward a theory of harmony, which was clarified by d'Alembert in 1762 [Helmholtz 1877 p.232]. One principle finding was that the major chord has a fundamental bass, 2 octaves below.

[ 1 5/4 3/2] f = [ 4 5 6 ] (1/4)f

Thus all the harmonics in this chord are harmonics of (1/4)f. We can rearrange the notes in a C chord, reaching into different octaves, and the resulting chords all have a C as their fundamental bass: (C-E-G), (E-G-C), (G-C-E), (C-G-E), (E-C-G), (G-E-C). Minor chords are more problematic ( we say nothing about 7th chords, diminished chords, etc ). We can factor the minor triad as

[ 1 6/5 3/2] f = [ 10 12 15 ] (1/10)f

But (1/10)f is not any note in our scale. Something that is mildly interesting is to observe that the common upper harmonic of the C minor chord, G, is the 6th harmonic of the C, the 5th harmonic of the E-flat, and the 4th harmonic of the G. Thus we have a 4-5-6 combination, like the major chord, but reversed.

Remark: The concept of fundamental bass has a generalization to virtual pitch, which is the foundation of a complex theory of [Terhardt 1974]. See also [Pierce 1983 ch. 6]. There is also the issue of combinational tones inherent in chords, see [Helmholtz 1877].

Changing Keys in Just Intonation  

Graphical Applet to show changing keys in JI is ugly.
A related discussion of what are sharps and flats, fundamentally.


What about Simple Whole Number Ratios? 

Consider the fractions in the interval (1,2) made by small positive integers. The ancient Greeks (especially Pythagoras ) were very interested in these for musical scales, and the interest continues up to the present day. We have tried to show that the fractions themselves are not fundamental for making a scale; they are a consequence of harmonics and avoiding what the human auditory system percieves as unpleasant dissonance. Still, we have marked in blue the ones that occur in the major scale, and in red the additional ones that occur in the minor scale. The blank spots correspond to fractions that already occurred.

3/2

4/3 5/3
5/4 7/4
6/5 7/5 8/5 9/5
7/6 11/6
8/7 9/7 10/7 11/7 12/7 13/7
9/8 11/8 13/8 15/8

Evidently, 7 is unlucky here!

12 Tone Equal Temperament 

How do we have a playable number of physical keys on the piano keyboard, but still be able to modulate into any musical key and have the chords harmonically correct? Well, we can't. We have to weaken the last condition to having the chords almost harmonically correct. To do this, we divide the octave up into 12 equally spaced seqments (called the chromatic scale). It is the fact that the divisions are equal that enables all musical keys to equally accessible. The reason for the choice of the number 12 is that the note locations that we will end up with will pretty closely approximate the pitch ratios of the JI scale (to do significantly better requires many more chromatic scale steps).

Note that the naive way to do this doesn't work: If our base note C has frequency f, then we might try defining

C#  = (1 +  1/12) f

D = (1 + 2/12) f
...
B = (1 + 11/12) f
Among other problems, this results in G having a frequency of 1.5833, which is too far off from the 3rd harmonic value of 3/2 = 1.5 to sound good against C (recall the dissonance curve has a steep, narrow valley at 3/2). The generally accepted solution is to build the chromatic scale in intervals determined by iteratively multiplying the base frequency by a factor c, where c is the twelvth root of 2 (approximately 1.059463). This will result in the scale divisions drawn on the horizonal axis of the dissonance curve applet. It should be remarked that the human ear percieves these divisions as being equally spaced in pitch, because the ratio of any 2 adjacent intervals is constant.

Then for the equally tempered chromatic scale, we define the notes to be:

C = c0 f


C# = c1 f = Db

...

B = c11 f


Then G = c7f = 1.4983f, which is pretty close. (See [Rusin *] for an extensive discussion of other possible choices for the number of chromatic keys, and how well they'd approximate the 3rd harmonic of C). The diatonic major scale in equal temperament is

[ c0 c2 c4 c5 c7 c9 c11 ] f

It matches the Just scale pretty well, with the largest error being at the E (the 3rd note) and the A (the 6th). The diatonic major scale is made up of the {1, 3, 5, 6, 8, 10, 12} notes of the chromatic scale, or equivalently, the intervals ( 2, 2, 1, 2, 2, 2, 1) of chromatic steps. This is the big strength of equal temperament. We can change to any key and generate the major scale by chromatic steps of ( 2, 2, 1, 2, 2, 2, 1); any transposed chord is just as harmonically correct as it was in the key of C.

12 tone equal temperament is the modern, generally accepted solution to the problem, but it has its share of criticisms, for a discussion see [Helmholtz 1877] and [Sethares 1997] in the references. [Terhardt 1974] makes the statement that every scale is a choice between how much to satisfy the principle of "minimal roughness" and the principle of "tonal meanings" (his terminology); in this sense the equal tempered scale is just one of several compromises.

Conclusions and Other scales  

We have derived the major chord from the primary harmonics on a string, the major scale from the notes making up 3 related chords, and the minor scales from other pleasing chords formed in the major scale. This has probably been well known for hundreds of years, but not clearly explained today, even in [Pierce 1983] or [Helmholtz 1877].

From the calculations of the dissonance curve, we could quantify why the C, F and G chords should be chosen, because they include the maximally consonant notes against C. They also include some highly dissonant tones against C, but these have some interesting properties, primarily the ability to form at least one dissonant chord (G-B-D-F) that produces the psychological effect of wanting to "resolve" to C major.

We only sketched some ideas of how to make this leading tone property mathematically precise, but did not do so. Therefore we have established no explanation of why B is a leading tone to tonic C, but C# isn't. We were unable to explain why no other notes should be included in the major or minor scales.

Equal temperament (which is a very clever idea, whatever its faults) allows moving into any musical key, at the price of some small loss in harmonic quality. It defines an evenly spaced chromatic scale, and from here we can form new scales, just from subsets of the notes on the keyboard. Let's list some other popular scales [Apel 1961 p.221, 262]:

The pentatonic scale: (C D F G A )
The Blues pentatonic scale: (C D E G A ) the 3rd note has been flatted.
Lydian: (C D E F# G A B)
Whole Tone: (C D E F# G# A#)
The chromatic scale itself.
A more general definition of scale would be: A baseline set of notes that a melody is restricted to, except when it departs from it for purposes of contrast.

Something Extra 

Java Applet to study Wave Reflections on a String 

References 

(what was consulted, not all that exist) in alphabetical order:

[Apel 1961] Willi Apel and Ralph T Daniel The Harvard Brief Dictionary of Music Pocket Books 1961

[Backus 1969] John Backus The Acoustical Foundations of Music W.W.Norton 1969

[Benson 2002] Dave Benson Mathematics and Music web site [book published on the web].

[Feynman 1963] R.P. Feynman, R. Leighton, M. Sands The Feynman Lectures on Physics Vol. 2 p.50-4 Addison-Wesley 1977.

[Helmholtz 1877] Hermann Helmholtz (translated by Alexander Ellis ) On the Sensations of Tone as a Physiological Basis for the Theory of Music reprinted by Dover 1954.

[Pierce 1983] John Pierce The Science of Musical Sound Scientific American Books, W.H. Freeman 1983

[Plomp and Levelt 1965] R. Plomp and W.J.M. Levelt Tonal Consonance and Critical Bandwidth Journal of the Acoustical Society of America 38 1965. p.548-560

[Rusin *] Dave Rusin Mathematics and Music web site [collections of articles, usenet postings, etc...]

[Sethares 1993] William A Sethares Local consonance and the relationship between timbre and scale Journal of the Acoustical Society of America 94 #3 1993. p.1218-1228

[Sethares 1997] William A Sethares Tuning, Timbre, Spectrum, Scale Springer 1997

[Sethares *] William A Sethares web site at the University of Wisconsin

[Terhardt 1974] Ernst Terhardt Pitch, consonance, and harmony Journal of the Acoustical Society of America 55 #5 1974. p.1061-1069

[Terhardt *] Ernst Terhardt web site at Technische Universitat Munchen

[Wolfe *] Joe Wolfe Musical Acoustics - Some Introductory Pages

Acknowledgements 

The author would like to thank the following people for providing detailed and specific comments about portions of this discussion (although the author may not have had the good sense to fully implement them all):
  • John Wood (rec.music.theory newsgroup 2002)
  • Graham Breed (groups.yahoo.com/group/tuning 2002)
  • Paul Erlich (groups.yahoo.com/group/tuning 2002)
  • Gene Ward Smith (groups.yahoo.com/group/tuning 2002)
  • Carl Lumma (groups.yahoo.com/group/tuning 2002)
  • Daniel Stevens (private communication 2003)

Additional References

Return to Home Page 
Send me email: jjensen14@hotmail.com Advisory: messages with keywords typical of spam in the subject line (including "!") get automatically discarded before I see them.