The feature you'd like
when converting from MIDI value to Frequency, you can use decimals on the midi values to get a more precise frequency, but it doesn't the other way around. It would be really useful to be able to get MIDI decimals values when converting from Frequency to Midi.
Any alternatives you've considered
I haven't go through the source code, but if there is already code to use MIDI decimal values to convert to frequency, then there must be some Math.round method used on the ftom method. Honestly I don't want to use an extra library on my project just to get a precise value instead of a round value...
Additional context
here's an example of how it should work using Max/MSP.
if you use ftom by default, it would round the result value:
But if you initialized it with a float number, it won't round the result value:
the Tone.ftom() method could have and additional input boolean value to either round the result value or not... If there was already a way, then I don't know how to use it, because there is no info about the mtof and ftom methods on the Tone.JS docs...
The feature you'd like when converting from MIDI value to Frequency, you can use decimals on the midi values to get a more precise frequency, but it doesn't the other way around. It would be really useful to be able to get MIDI decimals values when converting from Frequency to Midi.
Any alternatives you've considered I haven't go through the source code, but if there is already code to use MIDI decimal values to convert to frequency, then there must be some
Math.round
method used on theftom
method. Honestly I don't want to use an extra library on my project just to get a precise value instead of a round value...Additional context here's an example of how it should work using Max/MSP. if you use ftom by default, it would round the result value: But if you initialized it with a float number, it won't round the result value:
the
Tone.ftom()
method could have and additional input boolean value to either round the result value or not... If there was already a way, then I don't know how to use it, because there is no info about themtof
andftom
methods on the Tone.JS docs...