convert midi pitch data to playback value
I have a kslider going through mtof into a float box that determines the playback speed of a sample but when I select the note the sample is playing the float doesn't equal 1 which means it's not in pitch with the sample. how do I make so it equals 1?
I tried + the decimal that made it equal 1 but it started going up in microtonal intervals. I also tried bypassing the kslider and using accum to continually add 1/24 (a half step in decimal form) but since the float box only goes up to 15 decimal places it wasn't accurate enough to get to 1 exactly when I made it up to the note of the sample. if adding 1/24 is the best route to take, how can I get an infinitely accurate decimal so it will add up to 1?
playspeed is not (only) pitch.
if you are coming from linear frequency, you first have to define which note number should equal a speed of 1 (for example note number 60.0), and then apply a function which converts linear frequency to playspeed.
i use this: [expr exp(.057762265*($f1-60.))]
now pitching down gives you the correct values. :)

the formula is interrelated with mtof, but on the base of 1Hz instead of 440.