pitch bend scale question

    Mar 17 2012 | 10:22 am
    With a scale object scaling midi values (1-127) to -2. and 2. the idle value is 0. when I want it to be 1. with a range of -2. and 2. (this will be the multiple used to shift the pitch, 2 = +1 octave etc.)
    How would I use scale and get 1 to be the idle value?

    • Mar 17 2012 | 10:53 am
      I'm not sure if i understand this. pitch bend (7bit pb that is) like every other midi message sends out values from 0-127, idle value is usually 63 which gives you -63 in one extreme and +64 in other extreme. you could if then to set the value to 1 whenever the input is 0. Also, scaling 0 127 -2. 2. won't give you an absolute 0 value.
      Could you be more specific? Perhaps paste a patcher?
    • Mar 17 2012 | 11:26 am
      I think this sums up what my problem is. I'm guessing this is a really easy thing to solve. I managed to do it ages ago but i've not used max for a while and im a bit rusty.
    • Mar 17 2012 | 12:12 pm
      i think you're having some scaling misconception: if you want a pitch bend range of +/- 1 octave, the frequency multiplier should be between 2 (+ 1 octave) and 0.5 (- 1 octave), with 1 as idle (no bend). so it's not a linear scaling what you need.
    • Mar 17 2012 | 12:22 pm
      i tried this: scale to +/- 12 (semitones), do a floating point midi sum, and only then to mtof. the other way you have to go through some nastier maths...
    • Mar 17 2012 | 5:19 pm
      Good answer oldTurtle, and good solution. I rarely use 14bit pb, find it a tad useless because i don't have a controller that would need such high resolution output.
    • Mar 17 2012 | 5:58 pm
      i don't have any 14bit pitch bend controller either. when using max, simple [$1 100] message to [line] does the trick, avoiding steps if you're using large PB ranges like 1 octave...
    • Mar 17 2012 | 6:24 pm
      is there an easier way to scale bendin values to multiply a frequency value? I've tried the solutions above and I'm stumped.
    • Mar 17 2012 | 7:22 pm
      this example maps pitch bend (7bits) to -1/+1 range, then directly to frequency multiplier: the [expr] object. i just find it easier the other way, because the non-linear conversion is kept hidden in the [mtof]. hope it helps.