There seems to still be an issue with keyboard mappings, probably in my code, but
I do not understand what Scala actually does.
An illustration (click on image to get the text file, there are a couple of typos
in the image which got fixed in the file and in the next image as well).
In the top section are the contents of 13-19.scl and 128.kbm. In the bottom
section left there is (a part of) the scala 'tuning dump frequencies' without the
keyboard mapping applied, and this one seems to match the contents of 13-19.scl.
In the right column the same Scala dump type after the keyboard scaling was
applied. The yellow markings show where the tuning got changed after the keyboard
mapping got applied … I do not get it … My code does not change the
tuning after a keymap is applied, it only changes the keyboard mapping then, which
seems to me to be the right thing to do, and it outputs the same frequencies as
Scala does before a keyboard mapping is applied.
Ok, got it, it got transposed over five small intervvals (of about 62.15 cents),
shift the right one 5 positions up (or eight down) and the interval differences
will be at the same positions. Something like this :
Which involved some trickery with deccomposing the internal notes table into
intervals and recomposing it with a transposition applied – now getting the
exact same results as scala! Basically what I had to add was a transposition of
the intervals over ReferenceNote modulo ScaleLength,
Hmm, but still not for all scales … yuck. Ah OK simple issue for a change
… for rational to cents conversion I used an 'octave size' based Logarithm
instead of a base 2 log, so the sumatra.scl with an octave of a factor of 3 came
out a bit odd. Interesting scale BTW going from 178 mHz to 863 kHz, that's what
you'll get for a large 'octave' and not many notes in the scale.
Looks like it is OK now :-)