Welcome to the new and improved Native Instruments online community. Join our active forum of 40,000+ members for discussions and much more.

Filter AHDSR

Reylon Member Posts: 23 Sine
edited April 2022 in Scripting Workshop

Hey guys,

Hope you are doing well.

In the "Group Insert FX" I am using a filter which controls the modulator for the AHDSR.

However I have 6 different groups and I would like to affect them all using a loop of course.

The code I am using doesn't do nothing when the loop is included. By removing the loop the script works fine for targeted group only...

on ui_control ($FilterAttack)
    while($group_counter < $ALL_GROUPS)
    set_engine_par($ENGINE_PAR_ATTACK, $FilterAttack,$group_counter,1,-1)
    set_control_par_str(get_ui_id($FilterAttack_label),$CONTROL_PAR_TEXT, get_engine_par_disp($ENGINE_PAR_ATTACK,$group_counter,1,-1)& " Ms")
    end while
end on


  • Reylon
    Reylon Member Posts: 23 Sine


    finally working!

  • medusa
    medusa Member Posts: 32 Tri

    Groups are counted from 0 btw, so your while loop is skipping the first group.

  • EvilDragon
    EvilDragon Moderator Posts: 858 mod

    Also, it is customary to use $i, $j, $k... as loop counters. It's short and to the point.

  • Reylon
    Reylon Member Posts: 23 Sine
    edited April 2022

    Thanks for the reply guys. Medusa Im intentionally skipping the first group for sound system.☺️

Back To Top