Saturday 8 November 2014

Well Temperament

Most pre 20th century we hear is out of tune!

Temperament (in music) is the moving of pitch away from Just Intonation to allow more flexible harmonies and/or more range chromatic expression on a keyboard. Nowadays we think of tuning mainly in terms of equal temperament (et). However, this tuning system is really quite badly out of tune. The thing is that it is exactly the same amount out for tune for the same interval (say a major third) in very key. This makes et very flexible. It allows the complex forms of 12 tone music which became popular amongst composers (not sure about audiences) in the 20th century.

Sadly, et is not how organs, harpsichords and even pianos were tuned in earlier centuries. Therefore, the music composed then was not written to be played in et. Indeed, much of the subtlety of that music is destroyed by et.

Earlier music had different temperaments. In this write up I am going to look at Werckmerster III, a 'Well Temperament' which has sweeter, more harmonic sounding intervals for most of the popular intervals in Bach's music. It is probably very close to the temperament he would have had his organs tuned to.

Aria from the Goldberg Variations in 
Well Temperament (Werckmeister III)

Midi represents notes as a number starting from 0. 0 is the lowest C and 1 is C# and so on. This is usually considered to be an equal temperament form where each note is exactly the twelfth root of two higher than the previous. However, there are other ways of interpreting these numbers; it is quite straight forward to map them to an alternative tuning. Here is some code to do that:

def WerckmeisterIII(key):
    key=float(key)
    cent=2.0**(1.0/1200.0)
    #Pitch:  C   C#     D       Eb      E       F       F#      G       G#      A       A#      B       C
    cents=[  0,  90.225,192.18, 294.135,390.225,498.045,588.27, 696.09, 792.18, 888.27, 996.09, 1092.18,1200]
    octave=math.floor(key/12.0)
    pitch=base*2.0**octave
    note=int(key-octave*12)
    pitch*=cent**cents[note]
    return pitch
    
def Equal(key):
    key=float(key)

    return(sf.Semitone(0)**key) * base

So a word on 'cents'. A cent is the 1200th root of 2. 
  1. An octave is the frequency ration of 2:1.
  2. We can say a semitone is a 1/12 of that. Therefore each semitone is 2**1/12 i.e. the twelfth root of two.
  3. A cent is a 1/100 of a semitone so it becomes 2**1/1200.

Now we have a handy measure of very small ratios of pitch we can use it to define different tunings. In et every semitone is 100 cents so the scale looks like this:
C     0
C#  100
D   200
Eb  300
E   400
F   500
F#  600
G   700
G#  800
A   900
A# 1000
B  1100

In Werkmeister III we have this (I have added the et at the third column for comparison):
C    0.000    
C#  90.225  100
D  192.180  200
Eb 294.135  300
E  390.225  400
F  498.045  500
F# 588.270  600
G  696.090  700
G# 792.18   800
A  888.27   900
A# 996.09  1000
B  092.18  1100

Ae we can see, the difference is tiny. Even the larger differences, for example F, are only around 12 cents apart. That represents about 1/8th of a semi-tone. However, the over all impact of the temperament is enormous. Here I have rendered BWV 478 (Come Sweet Death) in Well Temperament (first) and then Equal Temperament (second). Only the temperament is different, everything else about the two is identical:

Well Temperament

Equal Temperament