OK it's time for a mixture of Maths and Music - prepare for geekiness! I was explaining to someone (poor person) how an octave is double the frequency and a perfect fifth is actually 1 and a 1/2 times the frequency of the tonic (root) note of the scale. I hope I'm right so far!! But if you tune a piano using the exact fifths, and go from eg. C to G to D to A to E to B to F# to Db to Ab to Eb to Bb to F and back to C again it's slightly out of tune (by about a quarter of a semitone I think). So some clever person realised you have to somehow tune the chromatic scale so that each semitone is the same ratio apart as the one above and below it, in fact all the way up the (chromatic) scale from C to the next C. This actually means each interval of a fifth is very slightly out, and when played will give off 'beats'. The piano tuner has to know how fast the beats need to be to make the interval just out of tune enough!
If there are twelve semitone intervals in an octave, and they are all the same ratio apart, the difference in frequency between each semitone must be 2^(1/12). Trust me. Or work it out for yourself! This is called a well tempered scale - hence Bach's 48 Preludes and Fugues for the Well-Tempered Clavier ie. he wrote them in every single key. On a keyboard tuned to real 'perfect' fifths it would sound fine in C major but more and more out of tune as the key becomes more remote eg Ab would sound horrible. On a well-tempered instrument there is a sort of compromise, so that it is ever so slightly out of tune in every key but no-one notices.
Anyway!! Out of interest I worked out the actual ratios of the frequencies for other intervals than a fifth. It turns out that a fourth (5 semitones) is almost exactly 1 and a third. Maybe that's why it sounds pleasant to the ear, whereas a diminished fifth is 1.414 (square root of 2) and sounds very discordant. A third is 1 and a quarter, and a sixth is about 1 and 2/3.
If you're interested this is worked out by 2^(n/12) where n is the number of semitones in the interval.
Third = 2^(4/12) = 1.26
Fourth = 2^(5/12) = 1.335
Fifth = 2^(7/12) = 1.498 etc
A final thought. Stringed instruments are tuned to exact fifths etc (eg the violin). So why can they play in any key? Is is because of the vibrato? And what about the guitar, which has strings tuned to perfect intervals, but a logarithmic fretboard? I have a few ideas on this bout would welcome any comments. If anyone is still awake that is!
If there are twelve semitone intervals in an octave, and they are all the same ratio apart, the difference in frequency between each semitone must be 2^(1/12). Trust me. Or work it out for yourself! This is called a well tempered scale - hence Bach's 48 Preludes and Fugues for the Well-Tempered Clavier ie. he wrote them in every single key. On a keyboard tuned to real 'perfect' fifths it would sound fine in C major but more and more out of tune as the key becomes more remote eg Ab would sound horrible. On a well-tempered instrument there is a sort of compromise, so that it is ever so slightly out of tune in every key but no-one notices.
Anyway!! Out of interest I worked out the actual ratios of the frequencies for other intervals than a fifth. It turns out that a fourth (5 semitones) is almost exactly 1 and a third. Maybe that's why it sounds pleasant to the ear, whereas a diminished fifth is 1.414 (square root of 2) and sounds very discordant. A third is 1 and a quarter, and a sixth is about 1 and 2/3.
If you're interested this is worked out by 2^(n/12) where n is the number of semitones in the interval.
Third = 2^(4/12) = 1.26
Fourth = 2^(5/12) = 1.335
Fifth = 2^(7/12) = 1.498 etc
A final thought. Stringed instruments are tuned to exact fifths etc (eg the violin). So why can they play in any key? Is is because of the vibrato? And what about the guitar, which has strings tuned to perfect intervals, but a logarithmic fretboard? I have a few ideas on this bout would welcome any comments. If anyone is still awake that is!