> For a long time instruments used to be tuned in such intervals between notes that transposition (playing a melody in a key different from the originally intended one) usually produced a melody that was clearly out of tune. Finding the right intervals was an interesting mathematical problem to solve, and it was done in the 17th century by Andreas Werckmeister.

This statement is wrong on many counts:

- The meaning of "out of tune" is culture- and epoque-dependent. For example, arabic music employs scales with 3/4 tone intervals, which to western ears might sound "out of tune", but to arab listeners would sound perfectly normal. In a similar fashion, an equal tempered major triad which would sound "in tune" to our ears (trained as they are on the now universal equal temperament) would sound "out of tune" to musicians and listeners in the 16th and 17th centuries, because they would expect a major third to be pure, i.e. much narrower than in equal temperament. In short, the meaning of "in tune" and "out of tune" is a matter of environmental conditioning, not an absolute truth.

- Since the middle ages, musicians, instrument makers and theoreticians developed tuning systems that actually allowed transposition. This is true for the hexachord system, based upon pythagorean tuning (perfect fifths of 3/2 ratio), employed in the late medieval era. This is also true for meantone tuning, a system of tuning which tempers the all fifths by a 1/4 of a syntonic comma in order to arrive at pure thirds (a 5/4 ratio interval). Both pythagorean tuning and meantone tuning are acyclical systems (that is, a sequence of 12 fifths does not make 7 octaves), but actually can be considered forms of equal tuning because all scales would sound the same (at least theoretically).

- The problem of transposition becomes an issue mainly on keyboard instruments, because they split the octave into a fixed number of notes. In both pythagorean tuning and meantone tuning, there is no enharmonic identity - C sharp does not equal D flat, etc. This would impose a practical limit on the possible tonalities that can be used. In the 16th and 17th centuries, a harpsichord or organ with 12 keys to the octave would typically be tuned meantone with C sharp, E flat, F sharp, G sharp and B flat. This would make scales such D flat major, F minor or A flat major quite unpleasant to the ear. This would also cause one fifth to be larger than pure and therefore unusable (the "wolf"). One solution would be the addition of more keys, and indeed in the 16th century many keyboard instruments were produced that included split sharps, and versions of harpsichords were developed with up to 36 keys to the octave, allowing the player to reach very remote tonalities.

- In the late 17th century people are beginning to explore less tempered versions of meantone, and Werckmeister is indeed the first to publish several methods of tuning which are "well tempered", i.e. they are cyclical (a cycle of 12 fifths) and all fifths are "good" (pure or smaller). Werckmeister was soon followed by other theoreticians, and the issue of well tempered tuning versus meantone tuning, which was practically universal in Europe back then, was a matter of hot debate at the time, even as late as the French revolution. Bach was indeed a proponent of well tempered tuning, but his contemporary the great organ maker Gottfried Silbermann insisted on employing a form of meantone tuning in his organs. Mozart, working in the late 18th century, 50 years after Bach, still used 1/6th comma meantone. The French have continued to employ meantone and meantone-derived tuning well into the 19th century.

- Well tempered tuning is not a perfect solution to the problem of transposition. In well tempered tuning each tonality would sound slightly different. Some tonalities, usually the ones closer to the C in the cycle of fifths (i.e. C major, G major, F major) would sound purer, and the more remote ones would usually sound more "spicy", "bitter" or "quirky". In some contexts, such as the performance of Bach's cantatas, the keyboard (organ) player would be required to play a transposed part, which would lead him to play in more remote, and therefore more discordant, tonalities.

- Equal temperament as a universal tuning is a relatively recent phenomenon, but one that has completely tainted our ability to listen with open ears to other ways of tuning keyboard instruments. In fact, singers and players of instruments with flexible tuning (e.g. violins) are so conditioned by equal temperament, that they play discordant, equal-tempered thirds instead of pure thirds, even when unaccompanied. By using equal temperament, we impose a uniformity of intervals and tonalities which was certainly not there in the 18th century.

- Bach's "well tempered clavier" != equal temperament. In fact, the beauty of realising the 48 on a well tempered harpsichord, unlike the equal tempered modern piano, is that each tonality would have its own character. That is the prime reason why playing Bach on the piano is wrong.

- The frontispiece of the "well tempered clavier" has led some to speculate that in it Bach has encoded his method of tuning. The first was Bradley Lehman in 2005 [0]. A more recent attempt was made by French harpsichord maker Emile Jobin [1].

[0] http://www-personal.umich.edu/~bpl/larips/outline.html
[1] http://www.clavecin-en-france.org/spip.php?article52 (in French)