# The semitone ratio

There are twelve semitones in a music octave, when frequency doubles. Dividing this doubling into twelve equal parts, yields the twelfth root of two. An interesting Maxima problem is to compute its convergents; These values agree with wikipedia and provide some sort of explanation https://en.wikipedia.org/wiki/Twelfth_root_of_two

```(%i3) 2^(1/12),numer;
(%o3)                          1.059463094359295
(%i4) cf(%);
(%o4)         [1, 16, 1, 4, 2, 7, 1, 1, 2, 2, 7, 4, 1, 2, 1, 59]
(%i5) ratsimp(cfdisrep(cf([1, 16, 1, 4, 2, 7, 1, 1, 2, 2, 7, 4, 1, 2, 1])));
2739815
(%o5)                               -------
2586041

(%i8) ratsimp(cfdisrep(cf([1, 16, 1])));
18
(%o8)                                 --
17
(%i10) ratsimp(cfdisrep(cf([1, 16, 1, 4, 2])));
196
(%o10)                                ---
185

(%i5) map(lambda([i],frequency(4,i)),[1,2,3,4,5,6,7,8,9,10,11,12]);
9/4      7/3      29/12      5/2      31/12      8/3      11/4
(%o5) [55 2   , 55 2   , 55 2     , 55 2   , 55 2     , 55 2   , 55 2    ,
17/6      35/12           37/12      19/6
55 2    , 55 2     , 440, 55 2     , 55 2    ]
(%i6) %,numer;
(%o6) [261.6255653005986, 277.1826309768721, 293.6647679174075,
311.1269837220811, 329.62755691287, 349.2282314330039, 369.9944227116344,
391.9954359817492, 415.304697579945, 440, 466.1637615180899, 493.8833012561239]

The tenth is fourth octave A, 440 Hz

Eight of the twelve form an octave, here is a computer voiced fourth octave:```

With the twelve semitones voiced,

If we divide the interval in 24, we get twenty four semi-semitones voiced,

```
My ear can hear the difference between a fourth octave A, 440 Hz and 435 Hz, a difference of 5 Hz.
I can't hear a smaller interval. This would lead to about a limit of (493-261)/5 = 52 possible semitones in an octave. This is a
melodic limit, my ear can easily hear  harmonic intervals of 1 Hz or finer. This can be explained by beat physics.```