Kontakt KSP - 100 steps for each ui_knob?

Sampler and Sampling discussion (techniques, tips and tricks, etc.)
RELATED
PRODUCTS

Post

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?

Post

That's a part of declaring the knob...

declare ui_knob $name (min_value,max_value,display_stepsize)

Post

EvilDragon wrote:That's a part of declaring the knob...

declare ui_knob $name (min_value,max_value,display_stepsize)
Yes, but I don't mean this. I mean...
Even if I declare:

Code: Select all

declare ui_knob $tune_knob_1(0, 10000, 1)
I don't have 10000 different steps moving the knob. I always have 100. Of course the second step is not 2% but 11.

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?

Post

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?

Post

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).

Post

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?

Post

Nope, you can send any display value using $CONTROL_PAR_LABEL as a text string.

Post

EvilDragon wrote:Nope, you can send any display value using $CONTROL_PAR_LABEL as a text string.
Uhm, really? I thought this was the only way http://www.kvraudio.com/forum/viewtopic ... 3#p6078760 :o

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...

Post

Ah, in case of using an external MIDI controller, then yeah, I guess that's the only way.

Post

EvilDragon wrote:Ah, in case of using an external MIDI controller, then yeah, I guess that's the only way.
I don't need to use an external MIDI controller at all :) The knob inside the script is moving by a button:

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
when I click on button_random_1, it randoms 3 knob on PW (which move some further knobs accordly). I want to output to the DAW the random value choosed for each knob, so I can store the states of these 3 knobs when I hear the sound I like (tune_knob_1, eq_knob_1 and dist_knob_1 values).

That's why I think set_controller() (128 values only) is the only way. Or am I wrong?

Post

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).

Post

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).
Nope. If I wrote that code, my DAW (FL Studio) can't catch the value of that knob. I tried right now.
Anyway, seems that also using set_controller don't works :ud:

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
mmm... where could I be wrong here? Send MIDI to outside world is set on GUY keyboard, script generated cc and incoming CC...

Post

I don't know, then...

Post

This is a short part that should works:

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
are you able to test it in your Kontakt? I don't see any reasons why it doesn't output value on my DAW :(

Post

Boss? Please help me :) I can't figure it out why it doesn't works...

Post Reply

Return to “Samplers, Sampling & Sample Libraries”