Custom Kontakt Knobs For ADSR


#1

Teaching myself how to script custom knobs… Got as far as insert FX but now I’m stuck when it comes to attaching knobs to ADSR mod. Would anyone be able to point me in the direction of public scripts, or be able to advise on where my script is going wrong?

Don’t want to post on VI Control out of fear of getting rinsed by the pros.

Thanks.

Current Script that is completely wrong:

on init

set_ui_height_px(200) 
set_ui_width_px(632)

declare ui_slider $attack (0, 1000000)
make_persistent($attack)

declare $attackId
$attackId := get_ui_id($attack)
set_control_par_str($attackId, $CONTROL_PAR_PICTURE, "ARC_Knob")
move_control_px($attack,230,30)
set_control_par($attack,$CONTROL_PAR_MOUSE_BEHAVIOUR,-50)

end on

on ui_control ($attack)

set_engine_par($ENGINE_PAR_ATTACK,$attack,1,0,0)

end on


#2

Solved.


#3

I know this is solved but just in case someone else is struggling with this… You just have to set the last argument in the set_engine_par() function to -1 like this:

set_engine_par($ENGINE_PAR_ATTACK, $attack, 0, 0, -1)

The format is like this:

set_engine_par(<parameter>,<value>,<group>,<slot>,<generic>)

<parameter> is the the engine parameter variable (what you want to control), <value> is the value you are sending it (in this case from the $attack knob, <group> tells Kontakt on which level to look for the engine parameter. <slot> is the FX slot and <generic> (the key here) distinguishes between the engine types and addresses send FX, insert FX, modulators, any parameter inside buses or other parameters outside like vol, pan, tune or the ADSR etc.

There’s a good write up on it here.


#4

Thank you, mate, that worked liek a charm! Could finally implement a basic ADSR envelope for one of my “29 bagpipes tuning up” patches (as you saw on my Twitter :slightly_smiling_face: )


#5

I don’t get this scripting, I sampled my Epiphone Hummingbird acoustic guitar.
I wanted to put echo, reverb and chorus knobs in the UI so I copied and pasted a script from Kontakts libraries and it put all the knobs in the UI but some of them don’t actually work, like the reverb one just does volume instead so I don’t understand what’s gone wrong.


#6

Hi Keith,

Firstly, do you have the FX on Group Insert FX?

If that is the case, might be worth posting your script so we can pick out any issues.

I would also check out Dave Hilowitz: https://www.youtube.com/watch?v=uYghRBv1piE&t=826s


#7

No worries buddy! Just saw you’re lasted post by the way! Sounds really sick! I have to make a demo for mine soon. Also sits in that giant space organ niche.


#8

If you share your script I’m sure we can help you out. :ok_hand:


#9

Wow! The wallpaper is the best bit :smile:


#10

I can’t wait to see what ‘Laser Eyes’ produces