[I'll get to Andrew's questions shortly but I'd already started this message so I'll finish this one first!]
I must confess that while a lot of this is background knowledge that I've had for many years, from studying music as a kid, some of it I've been refreshing from other sources and some things I'm discovering today, particularly the stuff about tempered tunings which is very interesting.
I didn't realise before today that the scales are not actually consistent, which I've been reading about. In other words, the notes of the chromatic scale in C are not the same as the chromatic scale for A, for example. I will try to briefly explain this mathematically.
I already mentioned that an octave is a 2 to 1 ratio of frequencies, i.e. an octave above your root note is twice the frequency. If we take a base frequency of 100 Hz (about 1.5 octaves below middle C), an octave above that will be 200 Hz. Similarly, a perfect fifth is a ratio of 3:2, i.e. a fifth above our 100 Hz root note is 150 Hz. This, by extension, gives us the ratio for a perfect fourth, which is 4:3, i.e. 200 Hz to 150 Hz (going up from our fifth note to the octave note instead of down, i.e. G - C instead of C - G).
The next most common "pleasing" interval is a major third. Surprise surprise, this is also a very simple mathematical ratio - this time it's 5:4. Hence a major third above 100 Hz is 125 Hz.
All of the other notes on the chromatic scale have similar, relatively simple ratios. I won't go into all of them but I found
this article which explains it well. I'll just mention a major sixth (C - A), which is a ratio of 5:3, and I'll explain why.
In the examples below, I'm going to pretend that 100 Hz is a C on the major scale. It's not, but I will do this to make the calculations easier and so that I can label the notes more easily!
Taking our 100 Hz "pretend C" root note, a major sixth above that (the A) will be 100 * 5 / 3, i.e. 166.7 Hz. A is also three notes along the circle of fifths - i.e. it's the fifth of the fifth of the fifth (the circle goes C - G - D - A etc with each note being the fifth of the previous one). But the maths breaks down.
Let's work out the notes in the circle of fifths using two methods. For the first 5th, G, we just apply the 3:2 ratio, so that's 150 Hz. That's easy, no problem.
The second note is D, a fifth above the G. If we calculate 150% of the G, that makes 225 Hz. A major second is a ratio of 9:8, so to calculate this D from our 100 Hz C, we do the following:
100 * 2 (an octave up) = 200 * 9/8 (the second) = 225 Hz.
Great, both of these agree. Let's go up another 5th to the A above that. Firstly, a fifth above the 225 Hz note is 225 * 150%, i.e. 337.5 Hz. But if we start from the C and use the major sixth ratio (5:3), we get the following:
100 * 2 (octave up) * 5 / 3 (major 6th) = 333.3 Hz
Oops!
This difference illustrates the problem of
tempering of scales. It arises because the ratios between the notes on one scale don't give the same results as the ratios of the notes on another scale, i.e. some of the notes on a C scale are not actually the same as the notes on, for example, a scale in Eb. This is why there are different ways of tuning instruments like guitars or pianos to try to compensate. On some instruments, particularly brass instruments, this is simply not possible since they just a few valves and are tuned to a specific scale. This is also why the frets on a guitar are an approximation, and why we have seen a strange tempered fretboard on some guitars (the
True Temperament system that someone noticed a while ago). Even that won't solve the problem, because it's just a different way of choosing your note tunings.