Help with changing Send Levels with 1 instrument
I got this piece of script...
And I'm trying to use to change the level of the send effects with just 1 knob, but I can't seem to get it to work.
Can anyone help please? I've been at this for 6 hours now.
Gablux Member Posts: 39 Sine
check this code to understand how these things work:
on init declare ui_knob $knob1 (1,100,1) declare ui_knob $knob2 (1,100,1) end on on ui_control ($knob1) set_engine_par($ENGINE_PAR_SENDLEVEL_0, $knob1*10000, -1, 0, $NI_INSERT_BUS) end on on ui_control ($knob2) set_engine_par($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN, $knob2*10000, -1, 0, $NI_SEND_BUS) end on
Note that I set knobs range 1-100 for simplicity but the engine parameters range is 0-1000000, hence multiplying the knobs' values by 10000.
Also to access the other send levels in the sends module, use the constants $ENGINE_PAR_SENDLEVEL_1, $ENGINE_PAR_SENDLEVEL_2, etc
Attention to where the send module is inserted: in this case in slot 0.
Use what I call the japanese bullet train pilot method - point at each argument (values passed by the coder) in the set_engine_par function and call it out in loud voice:
first argument tell the function which parameter it should affect.
second argument is the value to pass to that parameter
third argument is which group is going to be affected. If not in the group level, then -1 (for inserts, busses, sends and main).
fourth argument is the slot index. All of groups, instrument insert, busses, sends and main have 8 slots indexed from 0 to 7.
last argument is used to identify the location of the affected parameter+slot, in Kontakt 6 we use constants for that:
insert -> $NI_INSERT_BUS
send -> $NI_SEND_BUS
busses -> $NI_BUS_OFFSET+bus_index (0-15)
main -> $ NI_MAIN_BUS
groups -> -11
- 10.6K All Categories
- 20 Welcome
- 441 Hangout
- 58 NI News
- 205 Tech Talks
- 1K Native Access
- 4.9K Komplete
- 612 Komplete General
- 1.1K Komplete Kontrol
- 1.8K Kontakt
- 481 Reaktor
- 150 Battery 4
- 268 Guitar Rig & FX
- 202 Massive X & Synths
- 210 Other Software & Hardware
- 2.2K Maschine
- 14 Sampling Room
- 2.6K Traktor
- 2.4K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators