Hi,
I have an instrument with 5 groups per Menu item/preset. I want to purge the unused groups when selecting from the menu but can't seem to figure out where I am going wrong.
Can anybody please help? Do I need to add a Fade_Out somewhere also?
I will add Previous + Next buttons later in case that matters at this stage.
This a test using 10 groups for now to simulate 2 banks of 5 groups.
Thanks very much.
on init
make_perfview
set_script_title("MIXER")
declare const $UI_HEIGHT := 120
set_ui_height_px(120)
set_skin_offset(0)
message ("")
declare const $MENU_A_FIRST := 0
declare const $MENU_A_LAST := 9
{PRESET MENU}
declare $GROUP_COUNT
$GROUP_COUNT := $NUM_GROUPS
declare ui_menu $MENU_A
move_control_px($MENU_A, 138, 56)
set_control_par(get_ui_id($MENU_A), $CONTROL_PAR_WIDTH, 89)
add_menu_item ($MENU_A, "01", 0)
add_menu_item ($MENU_A, "01 - REVERSED", 5)
make_persistent($MENU_A)
read_persistent_var ($MENU_A)
end on
{ON UI CONTROLS - MENU A}
on ui_control ($MENU_A)
$GROUP_COUNT := 0
while ($GROUP_COUNT <= $MENU_A_LAST)
purge_group($GROUP_COUNT, 0)
purge_group($GROUP_COUNT +1, 0) {***This method isn't working***}
purge_group($GROUP_COUNT +2, 0)
purge_group($GROUP_COUNT +3, 0)
purge_group($GROUP_COUNT +4, 0)
inc($GROUP_COUNT)
end while
purge_group($MENU_A, 1)
purge_group($MENU_A +1, 1) {***This method isn't working***}
purge_group($MENU_A +2, 1)
purge_group($MENU_A +3, 1)
purge_group($MENU_A +4, 1)
end on
{ON NOTE}
on note
select ($MENU_A)
case 0
disallow_group ($ALL_GROUPS)
allow_group(0)
allow_group(1)
allow_group(2)
allow_group(3)
allow_group(4)
case 5
disallow_group ($ALL_GROUPS)
allow_group(5)
allow_group(6)
allow_group(7)
allow_group(8)
allow_group(9)
end select
end on