How to edit scala scales (mtof seems broken)?
Hi,
I'm working on a project that implies to basically extract the scale of a monophonic vocal recording.
I can get a correct list of frequencies for the root note and the degrees, I can convert them into cents, but then I'm almost unable to correctly reuse that scale.
Using [mtof] with its 'scale' and 'tune' messages, I can only get the root note to properly scale accros octaves, but other degrees seem non-sense.
Using Timo's th.scala, it works perfectly, but the caveheat is that you cannot simply edit your scale. You need to export it to a .scl file, then load it into [th.scala] which is very cumbersome and not ideal.
In the below patch, I show the process of starting from a list of frequencies and building a list of cents from it (and a .scl file). Then I show the different results using mtof and th.scala.
Is mtof really broken when using scala? The 'mid' attribute doesn't even seem to work.
Did anyone of you already edited scales directly by manipulating th.scala dictionnary and/or buffer?
I would really like to be able to simply edit the dict, and see the repercuted changes, and why not even export the result as a .scl file.
If one of you confirm my observations, I will open a ticket to C74 for mtof and write the suggestion for th.scala on its github.
i use a custom format which works without mtof. if you do that, you can choose if you want to store the scala scales linear or in hertz - and edit them using math on the fly when playing events.
Thanks for your answer Roman.
This is what I do in the meantime (basically buidling a coll to map every possible MIDI note number to its scaled float counterpart), but it doesn't really answer my questions.
Answering my own thread: mtof is not broken (at least not here). I just missed the @ref attribute. If I put @ref and @base to the same value (same as @center in th.scala), I get what I was expecting.