Deprecated Command for ADSR Control, alternative?

Options
Myntian
Myntian Member Posts: 1 Member
edited March 2023 in Scripting Workshop

Hello, it's my first post here so be easy on me 😅

With the introduction of Kontakt 7, the find_mod() command has been deprecated, replacing it with get_mod_idx(). 

I'm sure I am doing this correctly (according to Kontakt 6 standards), but maybe I have something wrong.

on ui_control( $ADSRView_attack )
    set_engine_par( $ENGINE_PAR_ATTACK, $ADSRView_attack, 0, find_mod( 0, "ENV 0" ), -1 )
    set_engine_par( $ENGINE_PAR_ATTACK, $ADSRView_attack, 1, find_mod( 1, "ENV 1" ), -1 )
end on

If the code looks correct and I need to find a workaround until I upgrade to Kontakt 7, do you know of any alternative solutions I can do for now?

EDIT:

For now, I am doing this and it seems to be working fine, but it bothers me I'm unable to do it the old way:

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


Additional Screenshots:

Thanks!

Back To Top