Claud9
Active Member
Hello,
I'm doing some script experiments with the new wavetable functions in K6.
Everything is working fine with 1 group/zone
But if I try with a 4 group/zones instrument I have some problems showing the correct zone/waveform...
This is the code I have in the on init
in the on ui_control I have this:
Thanks in advance for any help
I'm doing some script experiments with the new wavetable functions in K6.
Everything is working fine with 1 group/zone
But if I try with a 4 group/zones instrument I have some problems showing the correct zone/waveform...
This is the code I have in the on init
Code:
declare ui_wavetable $wt
set_control_par(get_ui_id($wt), $CONTROL_PAR_WT_VIS_MODE, $NI_WT_VIS_2D)
make_persistent($wt)
read_persistent_var($wt)
declare ui_menu $waveform
while ($i < $NUM_GROUPS)
add_menu_item($waveform,group_name($i),$i)
inc($i)
end while
if ($waveform=0)
set_control_par(get_ui_id($wt),$CONTROL_PAR_WT_ZONE,1)
end if
if ($waveform=1)
set_control_par(get_ui_id($wt),$CONTROL_PAR_WT_ZONE,2)
end if
if ($waveform=2)
set_control_par(get_ui_id($wt),$CONTROL_PAR_WT_ZONE,3)
end if
if ($waveform=3)
set_control_par(get_ui_id($wt),$CONTROL_PAR_WT_ZONE,4)
end if
make_persistent($waveform)
read_persistent_var($waveform)
end on
in the on ui_control I have this:
Code:
on ui_control ($waveform)
$i :=0
while ($i < $NUM_GROUPS)
purge_group($i,0)
inc($i)
end while
purge_group($waveform,1)
if ($waveform=0)
set_control_par(get_ui_id($wt),$CONTROL_PAR_WT_ZONE,1)
end if
if ($waveform=1)
set_control_par(get_ui_id($wt),$CONTROL_PAR_WT_ZONE,2)
end if
if ($waveform=2)
set_control_par(get_ui_id($wt),$CONTROL_PAR_WT_ZONE,3)
end if
if ($waveform=3)
set_control_par(get_ui_id($wt),$CONTROL_PAR_WT_ZONE,4)
end if
end on
Thanks in advance for any help
Last edited: