Hi everyone,
I want to add a simple knob for CC11 (controlling volume) to one of my custom Kontakt Instruments.
So far I added an modulator (amplifier => external sources => midi CC) to tweak the volume.
This is my script so far:
on init
make_perfview
set_ui_height_px(120)
declare ui_knob $Expression (0,127,1)
move_control ($Expression,1,2)
make_persistent($Expression)
read_persistent_var($Expression)
end on
The I assigned midi CC to via midi learn to the knob.
This works when I adjust CC11 only with an external controller.
However, if I move the knob on the GUI with my mouse it won't have an effect on the engine (only the values on the GUI will change).
I figured that I would ne somethin involving
- "on ui_control"
- " set_engine_par",
- "$ENGINE_PAR_VOLUME",
- (maybe "set_knob_label" as well?)
but I'm not sure how to write the exact code.
I appreciate any help. Many thanks in advance.
Best,
Ray