You can use the pitch directly, without the need to calculate the note number fraction, by using into: (interpolating table lookup) instead of of: (indexing a discrete value from an array) in the pitch expression.
The original expression was:
(!KeyNumber - 60 // 12) twoExp * ((!KeyNumber - 60 mod: 12) of: #( 1 {(135 / 128)} {(9 / 8)} {(75 / 64)} {(5 / 4)} {(4 / 3)} {(45 / 32)} {(3 / 2)} {(25 / 16)} {(5 / 3)} {(225 / 128)} {(15 / 8)} )) * 261.626 hz
The middle part of this expression (!KeyNumber - 60 mod: 12) determines the scale step within the octave and uses the scale step as an index into an array of ratios.
To use the interpolating table lookup instead, create an Array containing each scale step and ratio as a Point of the form: {scaleStep @ ratio}.
For example, the above expression could be rewritten as:
(!KeyNumber - 60 // 12) twoExp
* ((!KeyNumber - 60 mod: 12) into: #(
{0 @ 1} {1 @ (135 / 128)} {2 @ (9 / 8)}
{3 @ (75 / 64)} {4 @ (5 / 4)} {5 @ (4 / 3)}
{6 @ (45 / 32)} {7 @ (3 / 2)} {8 @ (25 / 16)}
{9 @ (5 / 3)} {10 @ (225 / 128)} {11 @ (15 / 8)}
{12 @ 2} ))
* 261.626 hz}
In this example, if the scale step were 4.5, the looked-up ratio would be half-way between 5/4 and 4/3.
You can find more information and see examples of into: in the Capytalk help within Kyma.
We added a new example to the Kyma Sound Library to illustrate this: Kyma Sound Library/Feature extration/Tuning*.kym