Kontakt KSP - 100 steps for each ui_knob?
- KVRian
- Topic Starter
- 878 posts since 2 Oct, 2013
Am I right or I can only set 100 different values in Kontakt scripting for a ui_knob?
I mean, I see I can fine-tune the knob using shift, but the values set are always 100, distinct.
Thus, also the automations for that knob can be only 100 different steps, no more, no less.
Or am I missing somethings?
I mean, I see I can fine-tune the knob using shift, but the values set are always 100, distinct.
Thus, also the automations for that knob can be only 100 different steps, no more, no less.
Or am I missing somethings?
- KVRAF
- 23102 posts since 7 Jan, 2009 from Croatia
That's a part of declaring the knob...
declare ui_knob $name (min_value,max_value,display_stepsize)
declare ui_knob $name (min_value,max_value,display_stepsize)
- KVRian
- Topic Starter
- 878 posts since 2 Oct, 2013
Yes, but I don't mean this. I mean...EvilDragon wrote:That's a part of declaring the knob...
declare ui_knob $name (min_value,max_value,display_stepsize)
Even if I declare:
Code: Select all
declare ui_knob $tune_knob_1(0, 10000, 1)
So 0-11-54, instead of 0-1-2. But the avalable step/value that I can manage are 100.
I can't deal with (for example) 128 different/distinct values moving that knob... or more...
Is it more clear what I mean?
- KVRian
- Topic Starter
- 878 posts since 2 Oct, 2013
Uhm not true! In fact if I set 10000 fine tune knob works well. More value->more values to fine tune.
Since I can only output 128 data to outside it on my DAW, I guess a good deal is to set them 0, 127, so I can catch any single movements.
Right?
Since I can only output 128 data to outside it on my DAW, I guess a good deal is to set them 0, 127, so I can catch any single movements.
Right?
- KVRAF
- 23102 posts since 7 Jan, 2009 from Croatia
Kontakt will scale 0-127 to whatever you have the knob set up. For tuning, it's recommended not to limit yourself to 0-127 range (and in fact in that case don't use MIDI CCs, use host automation instead as it covers all the knob values).
- KVRian
- Topic Starter
- 878 posts since 2 Oct, 2013
I need to output to my DAW the value of a ui_knob that is moving using internal script. Such as I click on a switch, it set random value for that ui_knob (which move some other params) and I need to output that knob position to DAW. This is limited to 128 for what I know... right?
- KVRAF
- 23102 posts since 7 Jan, 2009 from Croatia
Nope, you can send any display value using $CONTROL_PAR_LABEL as a text string.
- KVRian
- Topic Starter
- 878 posts since 2 Oct, 2013
Uhm, really? I thought this was the only way http://www.kvraudio.com/forum/viewtopic ... 3#p6078760EvilDragon wrote:Nope, you can send any display value using $CONTROL_PAR_LABEL as a text string.
I'll try it later, but not sure if I/you well understand the problem. For what I know CONTROL_PAR_LABEL it useful for set "value" inside the plug, not outside the DAW. I need to catch each of the knob steps in my DAW, so using set_controller(). You said in the other topic it is limited to 128 values...
- KVRAF
- 23102 posts since 7 Jan, 2009 from Croatia
Ah, in case of using an external MIDI controller, then yeah, I guess that's the only way.
- KVRian
- Topic Starter
- 878 posts since 2 Oct, 2013
I don't need to use an external MIDI controller at all The knob inside the script is moving by a button:EvilDragon wrote:Ah, in case of using an external MIDI controller, then yeah, I guess that's the only way.
Code: Select all
function setRandomKnob(tune_knob, eq_knob, dist_knob, group)
value := random (0, 100)
set_control_par(tune_knob, CONTROL_PAR_VALUE, value)
moveTune(tune_knob, group)
value := random (0, 100)
set_control_par(eq_knob, CONTROL_PAR_VALUE, value)
moveEQ(eq_knob, group)
value := random (0, 100)
set_control_par(dist_knob, CONTROL_PAR_VALUE, value)
moveDist(dist_knob, group)
end function
on ui_control(button_random_1)
setRandomKnob(tune_knob_1, eq_knob_1, dist_knob_1, 0)
end on
That's why I think set_controller() (128 values only) is the only way. Or am I wrong?
- KVRAF
- 23102 posts since 7 Jan, 2009 from Croatia
No, you can just set the control directly:
$knob := random(0,1000000)
The host will pick up the value of the knob if it's automated (not necessarily MIDI learned).
$knob := random(0,1000000)
The host will pick up the value of the knob if it's automated (not necessarily MIDI learned).
- KVRian
- Topic Starter
- 878 posts since 2 Oct, 2013
Nope. If I wrote that code, my DAW (FL Studio) can't catch the value of that knob. I tried right now.EvilDragon wrote:No, you can just set the control directly:
$knob := random(0,1000000)
The host will pick up the value of the knob if it's automated (not necessarily MIDI learned).
Anyway, seems that also using set_controller don't works
Code: Select all
function setRandomKnob(tune_knob, eq_knob, dist_knob, group)
value := random (0, 100)
tune_knob := value
set_controller(20, value)
moveTune(tune_knob, group)
end function
- KVRAF
- 23102 posts since 7 Jan, 2009 from Croatia
I don't know, then...
- KVRian
- Topic Starter
- 878 posts since 2 Oct, 2013
This is a short part that should works:
are you able to test it in your Kontakt? I don't see any reasons why it doesn't output value on my DAW
Code: Select all
on init
declare $value
declare ui_knob $tune_knob(0, 100, 1)
set_text($tune_knob,"Tune")
move_control_px($tune_knob,8,20)
make_persistent($tune_knob)
declare ui_switch $button_random
set_text($button_random,"Random")
move_control_px($button_random,100,20)
set_ui_height_px(100)
make_perfview
end on
on ui_control($button_random)
$value := random(0,100)
$tune_knob := $value
set_controller(20,$value)
end on