So here's another way of understanding how scales work, and why equal temperament is a compromise that makes notes sound equally "nearly" right in all keys.
First of all, understand that for two notes an octave apart, the higher note is twice the frequency of the lower. For a true perfect 5th, the frequency ratio is 3/2. A perfect 4th is 4/3. All the intervals of the major scale can be expressed in terms of these whole number ratios (i.e. positions in the harmonic sequence relative to the key note). The example of C major scale is as follows Each note is described in terms of its frequency ratio relative to the C at the bottom end of the scale.
- C 1/1
- D 9/8
- E 5/4
- F 4/3
- G 3/2
- A 5/3
- B 15/8
- C 2/1
- G 3/2
- A 3/2 * 9/8 = 27/16
- B 3/2 * 5/4 = 15/8
- C 3/2 * 4/3 = 2/1
- D 3/2 * 3/2 = 9/4 (halve the frequency to go down an octave = 9/8)
- E 3/2 * 5/3 = 5/2 (down an octave = 5/4)
- F# 3/2 * 15/8 = 45/16 (down an octave = 45/32)
- G 3/2 * 2/1
As you work your way through the various scales, you find that for every single scale, just intonation gives you different frequencies for some notes as compared to other scales which have those notes in common.
Now, if you are singing, or playing a stringed instrument without frets, then this is not a problem, you can sing or play in just intonation for whichever key you happen to be in and you can make the necessary adjustments as you change key. But it is a bit of a problem for a keyboard instrument. You can't instantaneously change the tuning of the a proportion of the strings whenever a piece modulates into another key! This mean that if a keyboard was tuned to just intonation in one key, it would sound distinctly odd if you play a piece in a key that is distant from it.
Enter equal temperament. I'm not sure anybody knows who invented it, but Vincenzo Galilei (father of the astronomer Galileo Galilei) was one of the first recorded advocates of it. It took a while to catch on, but by the time of Mozart, it was universally used for the tuning of keyboard instruments. Bach wrote the Well-Tempered Clavier in order to demonstrate the possibilities of "well tempering" which was a form of nearly-equal temperament, showing that a single keyboard instrument could play reasonably in tune in all 12 major and minor keys.
True 12-tone equal temperament, which is what we generally mean by the phrase these days, works on the principle that an octave is divided into 12 exactly equal semitones. By equal, that means equal in frequency ratio. But if you divide a 2:1 ratio into 12 equal ratios, you don't get integer ratios. The frequency ratio is 21/12 or about 1.059. This is not an integer ratio - you can't get a pair of integers where you divide one into the other to get exactly 21/12.
Now, when you compare the integer ratios with the frequencies obtained by equal temperament, you find that there are some differences. The following list gives you the difference in cents (100ths of a semitone) between equal temperament and just temperament for the notes of a major scale. Negative numbers indicate that just intonation is flat relative to equal temperament, positive numbers indicate that just intonation is sharp.
- C 0
- D 3.91
- E −13.69
- F −1.96
- G 1.96
- A −15.64
- B −11.73
- C 0
The Wikipedia entry on Just intonation includes some sound samples which enable you to compare chords using just intonation with equal temperament. (You will need to have a player that can play OGG files to listen to the samples.) If you compare the sound sample that plays a scale and then various triads in just intonation, and then the sound sample that plays the same scale and triads in equal temperament, you will probably be able to hear some "beats" in the equal temperament version that aren't present in just intonation. So the advantage of equal temperament is that everything sounds about as good in all keys, and the disadvantage is that in all keys, you lose a little bit of harmonic purity through the frequency ratios of chords not being true harmonic (i.e. integer) ratios.
Now all that horrid maths is out of the way, you still are left with the question of how do you tune your horn?
And the answer has to be that because tuning varies, if you want to eliminate beats, especially when the horn section is playing as a quartet, you need to listen to and adjust if necessary every note you play. What is more, you can't assume that a particular adjustment (e.g. of hand position) will work the same way in two different pieces, especially if they happen to be in different keys. And then again, if you are playing with a piano, you are going to have to adapt to its equal temperament, whereas if you are playing the Beethoven Sextet (for 2 horns and string quartet), making the tuning sound "right" will involve something very close to just intonation.
Tuning is a dynamic thing - you never achieve a perfectly tuned instrument because the tuning varies according to circumstance, from piece to piece and even within a piece when the key modulates. You have to stay on your toes all the time.