KSP – set_engine_par $ENGINE_PAR_PAN の値の指定


ググったてみたところ、$ENGINE_PAR_PAN は 5000 区切りっぽい (=200段階っぽい?)
MIDI CC(PAN)からの変換数式はたぶん
value = x * 200 / 127 * 5000
( x = pan(0-127) )

ACTUAL parameter value – engine parameter value will always be in range from 0 to 1000000, for EVERY knob accessible to KSP. If you want to display the actual value of a certain control in Kontakt (say, volume in dB), then you need to use get_engine_par_disp() – as you can see in my example above.
So, you need to do this:  

set_engine_par($ENGINE_PAR_PAN,<value from 0 to 1000000>,<group index>,-1,-1)

for each group you want (first group has a group index of 0). For example, if you want to put group 5 to 25L, then you would write:  


because engine parameter value of 500000 is center. But not all engine parameters have linear distribution! Thankfully, panning is linear (one unit of panning is 5000 engine parameter units).