Many books on music include a diagram somewhat like the one below:

However, those diagrams are not usually exactly like this one. For one thing, they usually start with the note C, while this diagram starts with the note F. Also, the notes all have the same time value, and there are no rests.
The diagram depicts a musical note, and the first few of its harmonic overtones. To bring out how the same notes repeat from one octave to the next, the sequence of notes occupying an octave is made to fit in a bar, by adjusting the time value of notes from octave to octave. Also, since the Western musical scale is based on harmonics at 2x, 3x, and 5x a given frequency, ignoring any harmonic which includes a higher prime number, those notes which do not relate to the Western musical scale, instead of being depicted imperfectly, are shown as having no representation through the use of rests.
To show the development of all seven of the notes in the diatonic scale, however, it is necessary to start the diagram at a lower pitch:

and continue it for a greater length.

Here, the overtones of an 11 Hz note are shown. Actually, 11Hz is an inaudible infrasonic frequency, although 16 Hz (16.5 Hz in the scale shown here) is a very low C sometimes found in some organ music. This illustrates why the pitch which sets the A above middle C to 440 Hz was chosen as the current standard; in addition to corresponding roughly to the concert pitch of the day when the standard was established (there is a tendency for one musician or musical group to play slightly higher in pitch than the next one, as it makes his music seem to sound "better"; this has reduced the utility of Stradivarius violins because they were constructed to function under a lower pitch standard), Hermann Helmholtz had used 440 Hz because the other notes of the octave, in just intonation, would also have frequencies which were an integral number of cycles per second.
It is because natural sounds are often accompanied by frequencies that are integer multiples of the lowest frequency present, and because our ears also add such frequencies as distortion, that sounds with frequencies in simple integer ratios are felt to be in harmony with each other. In terms of the lengths of strings, instead of actual sound vibrations, which were not yet accessible to study, this was realized by Pythagoras.
How the Western musical scale is constructed, based on the following principles:
can be illustrated by a two-dimensional diagram:
F 27/20 A 27/16 C# 135/128 E# 675/512 Bb 9/5 D 9/8 F# 45/32 A# 225/128 Eb 6/5 G 3/2 B 15/8 D# 75/64 Ab 8/5 C 1 E 5/4 G# 25/16 Db 16/15 F 4/3 A 5/3 C# 25/24 Gb 64/45 Bb 16/9 D 10/9 F# 25/18 Cb 256/135 Eb 32/27 G 40/27 B 50/27
Each note is followed by the ratio of its pitch to that of C. Moving one step up multiplies the frequency of a note by 3/2, moving one step to the right multiplies the frequency of a note by 5/4, except that 2 is multiplied or divided as needed to keep the note in its proper position on the scale.
The seven notes of the diatonic scale are shown in bold on the diagram. In most Western music, melodies are composed of sections in which seven notes are used, corresponding to the seven notes with letter names, or the white keys on the piano. But although the notes correspond to these seven notes, it is not always true that they are those seven notes.
Sections of a musical piece may be in one key or another. If part of a song is in the key of C, then that means the seven notes with letter names are the notes that are used. If it is in the key of G, however, then G corresponds to C (it is the tonic of the scale) and the other six notes of the diatonic scale are also shifted by an equal amount.
This is why the same black key on the piano is sometimes called either B flat or A sharp. If I take the seven bold notes in the diagram above, and overlay them so that the C is on top of the F in another copy of the whole diagram, then I am making F correspond to C, to illustrate the key of F. The note corresponding to F is B flat. It is more convenient to call it B flat than to call it A sharp, because the note corresponding to E is A, so A is already used, but there is no note that has B corresponding to it.
The degrees of the scale, which are the notes considered relative to the tonic of the musical piece being played, or within the key of that piece, as opposed to the notes referred to by their absolute frequencies, are named as follows:
Corresponds to notes: Mode starting here:
Do Tonic C G D A E B C F Bb Eb Ab Db Major (Ionian)
Re Supertonic D A E B F# C# D G C F Bb Eb Dorian
Mi Mediant E B F# C# G# D# E A D G C F Phrygian
Fa Subdominant F C G D A E F Bb Eb Ab Db Gb Lydian
So Dominant G D A E B F# G C F Bb Eb Ab Mixolydian
La Submediant A E B F# C# G# A D G C F Bb Minor (Aeolian)
Ti Subtonic B F# C# G# D# A# B E A D G C Locrian
thus, "the note that corresponds to C" is the Tonic, "the note that corresponds to D" is the Supertonic, and so on.
The column with E at the top illustrates the notes in the scale of E major. The set of notes used for the key of C major is also the set of notes used for the key of A minor. Major and minor are examples of modes, and the final column gives the name of the mode with that degree of the diatonic scale as its tonic.
Note that while the mode beginning with C is the most natural musical mode, the less harmonious minor mode was regarded as more serious, and hence more suitable for church music. Since it was in that context that much of Western musical notation developed, that is why the minor mode, rather than the major mode, starts with A when played on the white keys of the piano.
For the different keys of the major mode, another way to see why the tonic moves by a fifth when a sharp or flat is added or subtracted to the key signature, is this chart, showing the twelve notes of the equal-tempered scale with equal spacing:
Note: C Db D Eb E F Gb G Ab A Bb B
-------------------------------------
Gb So La Ti Do Re Mi Fa
Db Ti Do Re Mi Fa So La
Ab Mi Fa So La Ti Do Re
Eb La Ti Do Re Mi Fa So
Bb Re Mi Fa So La Ti Do
F So La Ti Do Re Mi Fa
C Do Re Mi Fa So La Ti
G Fa So La Ti Do Re Mi
D Ti Do Re Mi Fa So La
A Mi Fa So La Ti Do Re
E La Ti Do Re Mi Fa So
B Re Mi Fa So La Ti Do
F# So La Ti Do Re Mi Fa
-------------------------------------
C C# D D# E F F# G G# A A# B
Note that when the frequency of a note is multiplied or divided by the ratio of 81/80, a note is obtained with the same name. Therefore, this interval is called the syntonic comma.
The equal-tempered scale to which most instruments are tuned is an attempt to approximate the frequencies of the notes derived from the integer harmonics. Other approximations are possible, but less convenient; in addition to using 5 or 7 equally spaced notes, as an alternative to a scale of 12 equally spaced notes, one could use 19 equally spaced notes (the 2:3 ratio is less well approximated, but the 4:5 ratio is better approximated) or 53 equally spaced notes (which is very close to an exact fit), or even 9 equally spaced notes, similar to the Pélog tuning used for gamelan music, just as 5 equally spaced notes resembles the Salendro tuning.
Note Just 5 7 9 12 19 53 C 264 252.71 268.18 277.18 (1) 261.63 (1) 264.02 (1) 264.20 (1) D 297 290.29 296.10 299.37 (2) 293.66 (3) 294.56 (4) 297.21 (10) E 330 326.92 323.34 (3) 329.63 (5) 326.62 (7) 329.99 (18) F 352 333.46 360.95 377.19 (5) 349.23 (6) 353.50 (9) 352.29 (23) G 396 383.04 398.52 407.38 (6) 392.00 (8) 394.39 (12) 396.29 (32) A 440 440 440 440 (7) 440 (10) 440 (15) 440 (40) B 495 485.80 475.23 (8) 493.88 (12) 490.89 (18) 494.96 (49)
In the case of the temperaments with 9, 12, 19 or 53 notes to the scale, the number in parentheses shows which note in the scale is being used.
The intervals, or ratios between the frequencies of two notes, in the Western musical scale are called by these names:
Name: Frequency Distance in Distance on
ratio: semitones: the 53-unit scale:
Unison 1:1 0 0
Minor second 16:15 1 5
Major second 9:8 2 9
Minor third 6:5 3 14
Major third 5:4 4 17
Perfect fourth 4:3 5 22
Augmented fourth 45:32 or 25:18 6 26 or 25
Diminished fifth 64:45 or 36:25 6 28 or 29
Perfect fifth 3:2 7 31
Minor sixth 8:5 8 36
Major sixth 5:3 9 39
Minor seventh 16:9 10 44
Major seventh 15:8 11 48
Octave 2:1 12 53
and these intervals are the basic elements of the chords used in music. Those for the tritone, that is, for the two intervals corresponding to a distance of 6 semitones, the augmented fourth and the diminished fifth, are not to be taken too seriously, however.
Thus, a major chord consists of three notes in 4:5:6 ratio, a major third followed by a minor third, and a minor chord conists of three notes in 10:12:15 ratio, a minor third followed by a major third.
Just as a tritone, an interval of six semitones, in the equal tempered scale is merely a discord, not corresponding to the ratios given here for either the augmented fourth or the diminished fifth, a diminished seventh chord consists of four notes, each note three semitones away from the preceding one, is a chord that should be thought about in equal-tempered terms rather than as an approximation to any set of integer ratios, on the other hand.
The two-dimensional chart shown above can be sloped over slightly:

and in this way, notes having the same spelling can be directly above one another.
Thus, the notes called "C" form a vertical line, which include the starting point, with the value 1, and also other values at regular intervals, such as 6561/6400, 81/80 and 80/81. Since the ratio between two adjacent dots in that line is constant at 81/80, one could think of placing any note called C, based on its frequency, somewhere on that line.
The notes of the equal-tempered tuning, starting with C=1, are illustrated on the diagram by a line of dots enclosed in diamonds.
There is also a line of dots enclosed in squares, and another line of circled dots in the diagram. They represent quarter-comma meantone tuning and Silbermann's one-sixth-comma meantone tuning.Quarter-comma meantone tuning was used to tune some older organs. Essentially, the notes on the organ are tuned on the basis of a perfect fifth that has been flattened by the fourth root of the syntonic comma, so that while the fifths are not accurate, the major thirds are exact. Since flat notes and sharp notes are different in this tuning, as can be seen from the fact that the line representing it has a slope different from that for the equal-tempered tuning, discords arise in music that uses keys which are transposed too many fifths away from the key of C: since a keyboard only has five black keys in addition to the seven keys of the diatonic scale, only five additional keys will have all seven notes forming a diatonic scale having the same pitch relationships as that of the scale provided for the key of C.
Another straight line passing through C=1 on the diagram is the line that was vertical in the original diagram, but is now tilted: the notes formed by an exact perfect fifth of 3/2. This tuning is called the Pythagorean tuning, and the ratio between B sharp (not shown on the diagram) and C on that tuning is called the Pythagorean comma, as distinct from the syntonic comma.
The syntonic comma is so named because it is the distance between two notes with the same spelling, thus representing the same tone.
Some books about music refer to a persistent "myth" that it is possible, using only two keyboards, to construct an instrument on which it is possible to play music in any key using just intonation. Indeed, it is true that it is not possible, with only 24 keys to the octave, to construct an instrument that will play in perfect just intonation in every key.
However, it is possible to exhibit an example of the type of keyboard that has given rise to this "myth", so that its capabilities, as well as its limitations, can be seen. If one is willing to approximate just intonation to the same level as equal temperament with 53 notes to the octave does, respecting differences of the order of the syntonic comma, but neglecting differences of the order of the schisma, one can indeed, with only one alternate pitch for each of the twelve notes in the octave, provide a scale of tones closely corresponding to just intonation with each of the twelve notes in the conventional octave as a possible starting point.
Thus, what may be constructed with 24 keys to the octave is a keyboard which allows playing diatonic music in just intonation in any of the twelve conventionally designated keys, even if nothing can be ensured concerning the pitch of accidentals, and with the provision that one has to make a jump in pitch when one transposes around the far end of the circle of fifths. This will be shown explicitly below.
The most obvious design:
Note: C Db D Eb E F Gb G Ab A Bb B
------------------------------------------------------------
Key:
80 256 32 320 1024 128 1280
Db -- --- -- --- ---- --- ----
81 243 27 243 729 81 729
80 256 32 320 40 128 16
Ab -- --- -- --- -- --- --
81 243 27 243 27 81 9
80 10 32 4 40 128 16
Eb -- -- -- - -- --- --
81 9 27 3 27 81 9
10 32 4 40 5 16
Bb 1 -- -- - -- - --
9 27 3 27 3 9
10 5 4 3 5 16
F 1 -- - - - - --
9 4 3 2 3 9
9 5 4 3 5 15
C 1 - - - - - --
8 4 3 2 3 8
9 5 45 3 27 15
G 1 - - -- - -- --
8 4 32 2 16 8
135 9 81 45 3 27 15
D --- - -- -- - -- --
128 8 64 32 2 16 8
135 9 81 45 405 27 243
A --- - -- -- --- -- ---
128 8 64 32 256 16 128
135 1215 81 729 405 27 243
E --- ---- -- --- --- -- ---
128 1024 64 512 256 16 128
2187 1215 81 729 405 3645 243
B ---- ---- -- --- --- ---- ---
2048 1024 64 512 256 2048 128
------------------------------------------------------------
Note: C C# D D# E F F# G G# A A# B
seems to require three pitches for some of the notes, even to handle only 11 of the possible keys.
However, while 2187/2048 is a full syntonic comma (81/80) higher in pitch than 135/128, 256/243, on the other hand, is only a tenth of a syntonic comma below 135/128. Thus, the two would be represented by the same note on a 53-note scale.
Similarly, 1024/729 is close to 45/32, while 729/512 differs from it by a syntonic comma.
1280/729 and 16/9, on the other hand, differ by a full syntonic comma, while it is 3645/2048 that is redundant.
Thus, it is by maintaining just intonation to the precision of the comma, but ignoring smaller differences (on the order of a schisma) that one can achieve just intonation with a double keyboard in all keys.
Illustrating this in terms, therefore, of the 53-note scale directly, we get:
Note: C Db D Eb E F Gb G Ab A Bb B
-------------------------------------
Db 53 5 14 22 27 36 44
Ab 53 5 14 22 31 36 45
Eb 53 9 14 23 31 36 45
Bb 1 9 14 23 31 40 45
F 1 9 18 23 32 40 45
C 1 10 18 23 32 40 49
G 1 10 18 27 32 41 49
D 5 10 19 27 32 41 49
A 5 10 19 27 36 41 50
E 5 14 19 28 36 41 50
B 6 14 19 28 36 45 50
F# 6 14 23 28 37 45 50
-------------------------------------
C C# D D# E F F# G G# A A# B
Moving back to the simple world of the equal-tempered scale, the following image

illustrates the Jankó keyboard, in comparison to a conventional piano keyboard on the same scale. (In fact, the spacing of keys on the Jankó keyboard is normally smaller than that of a conventional keyboard, to make it more convenient to play chords.)
The three buttons in a vertical line on the Jankó keyboard are all connected together, so that they can be used to play the same note. On this keyboard, since F is a semitone higher than E, it stands in the same relation to E as D# does to D. This, combined with the repetition of the keyboard arrangement three times over, means that the same melody, and the same chord, may be played in any key simply by moving the starting position of one's hands on the keyboard; the relative positions of the keys that can be used to play the melody or the chord do not change.
While it would be possible, by having the three keys in a column play notes of pitch differing by a syntonic comma, to adapt a Jankó keyboard to the 53-note scale, the result would, in order to be uniform, disperse the notes belonging to a particular conventional scale in just intonation over at least four rows of the keyboard.