Kslider note value to float conversion
Hi all,
I'm relatively new to Max, and this forum has helped me massively with so many problems, but couldn't find any posts about this...
I'm currently trying to use a Kslider to control the transposition (pitch) parameter of my granular synth. As in depending on what key is pressed on the Kslider, represents a pitch value to transpose a sample to.
The transposition slider ranges from 0-5 (because higher than 5 the samples are too high to hear and lower than 0 there's no transposition effect). I want to be able to set a relative transposition value to a set ranges of keys key on the kslider, ie keys 1-49 move the transposition in equal increments from 0-5.
Apologies if my description is a bit poor, any help would be great!!
Cheers
J
presumably the pich parameter in your synth is a ratio, so that 1 = no transposition, 0.5 is and octave lower and 2 is an octave higher?
if that is the case, you need to decide which MIDI note = no transposition, (ratio =1), find out the frequency of that mIDI pitch (ie if it is A, then 440hz). This is the base frequency then connect up mtof object to the kslider to convert MIDI to frequency, and divide that by the base.
sorry, I understand everything but what I am supposed to be dividing by the base?
Thanks
the output of the mtof object