Musical Scale

   A Above Middle C is 440 Hz
   The Tempered Scale can be worked out with 
   freq = 440 * 2^(n/12)

   where n is the number of notes from A, like Middle C is 9 notes down the scale

   eg Middle C is 440*2^(-9/12.0) = 261.63

Note  A   A#  B   C  C# D  D# E  F  F# G  G# A  A# B  C  C# D  D# E  F  F# G  G# A  etc.
N    -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1  0  1  2  3  4  5  6  7  8  9  10 11 12 etc. 

Sliding Scale stuff

something like
new_level = (old_level*0.75) + (read_level*0.25)

fiddle with the numbers somewhat to change how fast it converges

the above will mean a new level is 1/4 on the way towards this new level 
from the old level

This smoothing trick makes the X client look really cool (smooth with no jagginess)
maybe try read*0.4 
