The theory blossoms from science geniuses who also happened to be musicians. Most famous was Leonardo da Vinci; my favorite is Jef Raskin who invented the Mac computer; a Google search would yield thousands more. It is said that Pythagoras, plucking taut strings about 525 BC, noticed pleasant sounds when notes were played in an arithmetical ratio of 1 to 2 or 3 to 4 or 5. And Isaac Asimov in the 1966 book, Science, Numbers, and I, explained to laymen the relation of numbers in notes.
Brainy Asimov is no music great, though, which goes against theory. He can play only one piano tune, "Dancing Cheek to Cheek", and with only one stubby finger invariably sending his family howling for silence. Hurt to the core but picking up from Pythagoras, Asimov assumed that each note has a frequency: the number of times per second that a piano string beats back and forth in a sound-making vibration. The notes did have a nice and similar sound, following Pythagorass expanded ratio of 4 to 8.
But there are other keys in a piano octave. To the second octave, the most frequent of the seven that he pounded on, Asimov assigned a numeric progression: 4 (waves per second), then 4-1/2, 5, 5-1/3, 6, 6-2/3, 7-1/2, and onto 8 (which begins the next octave). From there, he extended the octave backward and forward. If backward, he jotted the corresponding ratio: 2, 2-1/4, 2-1/2, 2-2/3, 3, 3-1/3, 3-3/4, 4. If forward: 8, 9, 10, 10-2/3, 12, 13-1/3, 15, 16. Six octaves to the right, Asimov reached this frequency progression: 256, 288, 320, 341-1/3, 384, 426-2/3, 480, 512.
Physicists and mathematician-musicians would have no trouble with such numbers arising from doubling and redoubling the initial 4-to-8 ratio. But most people get by with only a little math, while trying to make lots of music. Musicians in fact use as basis the piano note 426-2/3, but tune it to 440 then build the octave around it. Starting thus with 440 and using his original progression, Asimov came up with: 264, 297, 330, 352, 394, (the magic) 440, 495, 528. At least he got rid of those pesky fractions.
Musicians also dont call notes by their frequency numbers. If they did, Bach and Beethoven would have gone mad. In most systems, they use normal language of normal people, with consonants and vowels. Italian musicologist Guido dArezzo developed one such system shortly after the year 1000 by composing a hymn to John the Baptist in progressing octaves:
Ut queant laxis, Resonare fibris,
Mira gestorum, Famuli tuorum,
Solve polluti, Labii reatum, Sancte Ioannes.
As you would have noticed, the first syllable (italicized) of each phrase corresponds to the notes as we know them today: ut, re, mi, fa, sol, la, then on to a higher ut. But there is one note missing: the seventh. The tonal or frequency progression is incomplete. Not to worry, someone must have filled in the blank with si by using the initials of Sancte Ioannes. Another lifesaver, noting too that most of the notes start with consonants and hating repetition, must have changed ut to tu and then to do, and si to ti. Dont ask me; ask Asimov who wrote such.
At any rate, the numeric frequencies now match the completed and edited note names: 264 = do, 297 = re, 330 = mi, 352 = fa, 396 = sol, 440 = la, 495 = ti, 528 = do.
Still, notes are not played singly, but in combinations or chords. This brought forth another system that saved Bach and Beethoven, and later the Beatles, from further headaches. For, it assigned alphabetically a letter to the dominant note in any combination or chord. Since the standard note, the one to which all instruments are tuned, is 440, it was only fair to call it A. The next note, 495 , is B; 528 is C, and so on. From this came the correspondence: do = C, re = D, mi = E, fa = F, sol = G, la = A, ti = B, do = C.
Now comes the intriguing part. Asimov asked if the notes are spread more or less equally across the gap of the octave. He checked this by taking the ratio of the frequencies of each successive pair of notes:
D/C = 297/264 = 1.125
E/D = 330/297 = 1.111
F/E = 352/330 = 1.067
G/F = 396/352 = 1.125
A/G = 440/396 = 1.111
B/A = 495/440 = 1.125
C/B = 528/495 = 1.067
The seven intervals in the octave fall into three groups of ratios, Asimov noted: three with 1.125, two with 1.111, and two with 1.067. Considering only the digits to the right of the decimal point, 1.125 and 1.111 are quite close together, while 1.067 is roughly half the size. Applying the "whole" and "half" intervals, Asimov listed the scale and the interval size as: C (1) , D (1) , E (1/2), F (1), G (1), A (1), B (1/2), C.
Theres seemingly no sense in the list. But since the theory goes that musicians are mathematicians, the logic emerges if one observes that a piano has ebony keys aside from ivory. Musicians call the ebonies "sharps" and "flats", for they either stand up a note sharply or sit it down flatly. More important, they complete the whole and half intervals. C and D have a sharp or flat between them, depending if youre moving forward or back. D and E also have either between them. But E and F dont, because E already is a half interval moving to F.
See how the ebonies, marked as X, work to complete 12 whole and half tones:
X X X X X
C D E F G A B C
Now doesnt that look like a piano octave? Count them, play them.