Anda di halaman 1dari 49

on init

set_script_title("VIP")

make_perfview
set_ui_height_px(532)
message("")

set_control_par_str($INST_WALLPAPER_ID,$CONTROL_PAR_PICTURE,"background")

declare ui_switch $nyf1r


set_control_par_str(get_ui_id($nyf1r),$CONTROL_PAR_PICTURE,"lockx")
set_control_par(get_ui_id($nyf1r),$CONTROL_PAR_WIDTH,64)
set_text($nyf1r,"")
move_control_px($nyf1r,0,511)

set_key_color(24,$KEY_COLOR_RED)
set_key_color(25,$KEY_COLOR_RED)
set_key_color(26,$KEY_COLOR_RED)
set_key_color(27,$KEY_COLOR_RED)
set_key_color(28,$KEY_COLOR_RED)
set_key_color(29,$KEY_COLOR_RED)
set_key_color(30,$KEY_COLOR_RED)
set_key_color(32,$KEY_COLOR_NONE)
set_key_color(34,$KEY_COLOR_NONE)

declare $PitchSwitch
declare $SkinOffset := 600

declare $i
declare $ii

declare $count
declare $c

declare $ANIMplay := 0
declare ui_label $Anim(0, 0)
move_control_px($Anim,119,207)
set_control_par_str(get_ui_id($Anim),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($Anim),$CONTROL_PAR_PICTURE,"Key Animation")
set_control_par(get_ui_id($Anim),$CONTROL_PAR_WIDTH,500)
set_control_par(get_ui_id($Anim),$CONTROL_PAR_HEIGHT,20)
set_listener($NI_SIGNAL_TIMER_MS,50000)

declare $ANIMplay2 := 0
declare ui_label $Anim2(0, 0)
move_control_px($Anim2,0,28)
set_control_par_str(get_ui_id($Anim2),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($Anim2),$CONTROL_PAR_PICTURE,"Load Animation")
set_control_par(get_ui_id($Anim2),$CONTROL_PAR_WIDTH,500)
set_control_par(get_ui_id($Anim2),$CONTROL_PAR_HEIGHT,20)

pgs_create_key(INITa, 1)
pgs_create_key(MONOLEGATOv, 5)
pgs_create_key(UNICHECK, 1)
pgs_create_key(INITb, 1)

pgs_create_key(CHORD, 8)
pgs_create_key(CHORDx, 1)

declare $ActiveArpPage
declare $ActiveTab
make_persistent($ActiveTab)
read_persistent_var($ActiveTab)

declare %main[29]
declare %main2[29]
declare %tfx[7]
declare %arp[120]

declare $steps := 16
declare $gate_length

declare ui_label $status (1,1)


move_control_px($status,275,2)
set_control_par(get_ui_id($status),$CONTROL_PAR_FONT_TYPE,0)
set_control_par(get_ui_id($status),$CONTROL_PAR_TEXT_ALIGNMENT,1)
set_control_par(get_ui_id($status),$CONTROL_PAR_WIDTH,83)
set_control_par(get_ui_id($status),$CONTROL_PAR_HEIGHT,20)
set_text ($status,"VIP!")

{TFX}

declare ui_switch $tfx1


declare ui_switch $tfx2
declare ui_switch $tfx3
declare ui_switch $tfx4
declare ui_switch $tfx5
declare ui_switch $tfx6
declare ui_switch $tfx7

make_persistent($tfx1)
read_persistent_var($tfx1)
make_persistent($tfx2)
read_persistent_var($tfx2)
make_persistent($tfx3)
read_persistent_var($tfx3)
make_persistent($tfx4)
read_persistent_var($tfx4)
make_persistent($tfx5)
read_persistent_var($tfx5)
make_persistent($tfx6)
read_persistent_var($tfx6)
make_persistent($tfx7)
read_persistent_var($tfx7)

%tfx[0] := get_ui_id($tfx1)
%tfx[1] := get_ui_id($tfx2)
%tfx[2] := get_ui_id($tfx3)
%tfx[3] := get_ui_id($tfx4)
%tfx[4] := get_ui_id($tfx5)
%tfx[5] := get_ui_id($tfx6)
%tfx[6] := get_ui_id($tfx7)

$i := 0
while ($i < 7)
set_control_par_str(%tfx[$i],$CONTROL_PAR_TEXT,"")
set_control_par(%tfx[$i],$CONTROL_PAR_WIDTH,115)
set_control_par(%tfx[$i],$CONTROL_PAR_HEIGHT,115)
inc ($i)
end while

set_control_par_str(%tfx[0],$CONTROL_PAR_PICTURE,"KFX Small")
set_control_par_str(%tfx[1],$CONTROL_PAR_PICTURE,"KFX Big")
set_control_par_str(%tfx[2],$CONTROL_PAR_PICTURE,"KFX Small")
set_control_par_str(%tfx[3],$CONTROL_PAR_PICTURE,"KFX Big")
set_control_par_str(%tfx[4],$CONTROL_PAR_PICTURE,"KFX Small")
set_control_par_str(%tfx[5],$CONTROL_PAR_PICTURE,"KFX Small")
set_control_par_str(%tfx[6],$CONTROL_PAR_PICTURE,"KFX Big")

{set_control_par_str(%tfx[0],$CONTROL_PAR_PICTURE,"EQ sweep")
set_control_par_str(%tfx[1],$CONTROL_PAR_PICTURE,"Pitch Env")
set_control_par_str(%tfx[2],$CONTROL_PAR_PICTURE,"glitcher")
set_control_par_str(%tfx[3],$CONTROL_PAR_PICTURE,"cabinet")
set_control_par_str(%tfx[4],$CONTROL_PAR_PICTURE,"panner")
set_control_par_str(%tfx[5],$CONTROL_PAR_PICTURE,"filter")
set_control_par_str(%tfx[6],$CONTROL_PAR_PICTURE,"dirt")}

move_control_px($tfx1,32,420)
move_control_px($tfx2,64,295)
move_control_px($tfx3,146,435)
move_control_px($tfx4,275,275)
move_control_px($tfx5,417,435)
move_control_px($tfx6,530,420)
move_control_px($tfx7,483,300)

{NAVIGATION}

declare ui_switch $Tab1


move_control_px($Tab1,25,185)
set_control_par_str(get_ui_id($Tab1),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($Tab1),$CONTROL_PAR_PICTURE,"transparentbut")
set_control_par(get_ui_id($Tab1),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($Tab1),$CONTROL_PAR_HEIGHT,55)
set_control_par_str(get_ui_id($Tab1),$CONTROL_PAR_HELP,"FX 1 Page")
make_persistent($Tab1)
read_persistent_var($Tab1)

declare ui_switch $Tab2


move_control_px($Tab2,25,209)
set_control_par_str(get_ui_id($Tab2),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($Tab2),$CONTROL_PAR_PICTURE,"transparentbut")
set_control_par(get_ui_id($Tab2),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($Tab2),$CONTROL_PAR_HEIGHT,55)
set_control_par_str(get_ui_id($Tab2),$CONTROL_PAR_HELP,"FX 2 Page")
make_persistent($Tab2)
read_persistent_var($Tab2)

declare ui_switch $Tab3


move_control_px($Tab3,550,185)
set_control_par_str(get_ui_id($Tab3),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($Tab3),$CONTROL_PAR_PICTURE,"transparentbut")
set_control_par(get_ui_id($Tab3),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($Tab3),$CONTROL_PAR_HEIGHT,55)
set_control_par_str(get_ui_id($Tab3),$CONTROL_PAR_HELP,"Arp Page")
make_persistent($Tab3)
read_persistent_var($Tab3)

declare ui_switch $Tab4


move_control_px($Tab4,550,209)
set_control_par_str(get_ui_id($Tab4),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($Tab4),$CONTROL_PAR_PICTURE,"transparentbut")
set_control_par(get_ui_id($Tab4),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($Tab4),$CONTROL_PAR_HEIGHT,55)
set_control_par_str(get_ui_id($Tab4),$CONTROL_PAR_HELP,"KFX Page")
make_persistent($Tab4)
read_persistent_var($Tab4)

{ENV}
declare ui_slider $attack(5000, 1000000)
move_control_px($attack,15,278)
set_control_par_str(get_ui_id($attack),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($attack),$CONTROL_PAR_PICTURE,"Big Red Knob")
set_control_par(get_ui_id($attack),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($attack),$CONTROL_PAR_HEIGHT,55)
set_control_par(get_ui_id($attack),$CONTROL_PAR_MOUSE_BEHAVIOUR,-800)
set_control_par(get_ui_id($attack),$CONTROL_PAR_DEFAULT_VALUE,5000)
make_persistent($attack)
read_persistent_var($attack)
%main[0] := get_ui_id($attack)

declare ui_slider $decay(0, 1000000)


move_control_px($decay,142,276)
set_control_par_str(get_ui_id($decay),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($decay),$CONTROL_PAR_PICTURE,"Big Red Knob")
set_control_par(get_ui_id($decay),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($decay),$CONTROL_PAR_HEIGHT,55)
set_control_par(get_ui_id($decay),$CONTROL_PAR_MOUSE_BEHAVIOUR,-800)
set_control_par(get_ui_id($decay),$CONTROL_PAR_DEFAULT_VALUE,500000)
make_persistent($decay)
read_persistent_var($decay)
%main[1] := get_ui_id($decay)

declare ui_slider $sustain(0, 1000000)


move_control_px($sustain,402,277)
set_control_par_str(get_ui_id($sustain),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($sustain),$CONTROL_PAR_PICTURE,"Big Red Knob")
set_control_par(get_ui_id($sustain),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($sustain),$CONTROL_PAR_HEIGHT,55)
set_control_par(get_ui_id($sustain),$CONTROL_PAR_MOUSE_BEHAVIOUR,-800)
set_control_par(get_ui_id($sustain),$CONTROL_PAR_DEFAULT_VALUE,1000000)
make_persistent($sustain)
read_persistent_var($sustain)
%main[2] := get_ui_id($sustain)

declare ui_slider $release(0, 1000000)


move_control_px($release,526,276)
set_control_par_str(get_ui_id($release),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($release),$CONTROL_PAR_PICTURE,"Big Red Knob")
set_control_par(get_ui_id($release),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($release),$CONTROL_PAR_HEIGHT,55)
set_control_par(get_ui_id($release),$CONTROL_PAR_MOUSE_BEHAVIOUR,-800)
set_control_par(get_ui_id($release),$CONTROL_PAR_DEFAULT_VALUE,500000)
make_persistent($release)
read_persistent_var($release)
%main[3] := get_ui_id($release)

{FILTERS}
declare ui_slider $LPFilterCutoff(0, 1000000)
move_control_px($LPFilterCutoff,19,410)
set_control_par_str(get_ui_id($LPFilterCutoff),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($LPFilterCutoff),$CONTROL_PAR_PICTURE,"Purple
Knob")
set_control_par(get_ui_id($LPFilterCutoff),$CONTROL_PAR_WIDTH,45)
set_control_par(get_ui_id($LPFilterCutoff),$CONTROL_PAR_HEIGHT,45)
set_control_par(get_ui_id($LPFilterCutoff),$CONTROL_PAR_MOUSE_BEHAVIOUR,-600)
set_control_par(get_ui_id($LPFilterCutoff),$CONTROL_PAR_DEFAULT_VALUE,1000000)
make_persistent($LPFilterCutoff)
read_persistent_var($LPFilterCutoff)
%main[4] := get_ui_id($LPFilterCutoff)

declare ui_slider $LPFilterResonance(0, 1000000)


move_control_px($LPFilterResonance,136,410)
set_control_par_str(get_ui_id($LPFilterResonance),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($LPFilterResonance),$CONTROL_PAR_PICTURE,"Purple
Knob")
set_control_par(get_ui_id($LPFilterResonance),$CONTROL_PAR_WIDTH,45)
set_control_par(get_ui_id($LPFilterResonance),$CONTROL_PAR_HEIGHT,45)
set_control_par(get_ui_id($LPFilterResonance),$CONTROL_PAR_MOUSE_BEHAVIOUR,-
600)
set_control_par(get_ui_id($LPFilterResonance),$CONTROL_PAR_DEFAULT_VALUE,0)
make_persistent($LPFilterResonance)
read_persistent_var($LPFilterResonance)
%main[5] := get_ui_id($LPFilterResonance)

declare ui_slider $HPFilterCutoff(0, 1000000)


move_control_px($HPFilterCutoff,409,410)
set_control_par_str(get_ui_id($HPFilterCutoff),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($HPFilterCutoff),$CONTROL_PAR_PICTURE,"Purple
Knob")
set_control_par(get_ui_id($HPFilterCutoff),$CONTROL_PAR_WIDTH,45)
set_control_par(get_ui_id($HPFilterCutoff),$CONTROL_PAR_HEIGHT,45)
set_control_par(get_ui_id($HPFilterCutoff),$CONTROL_PAR_MOUSE_BEHAVIOUR,-600)
set_control_par(get_ui_id($HPFilterCutoff),$CONTROL_PAR_DEFAULT_VALUE,0)
make_persistent($HPFilterCutoff)
read_persistent_var($HPFilterCutoff)
%main[6] := get_ui_id($HPFilterCutoff)

declare ui_slider $HPFilterResonance(0, 1000000)


move_control_px($HPFilterResonance,521,410)
set_control_par_str(get_ui_id($HPFilterResonance),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($HPFilterResonance),$CONTROL_PAR_PICTURE,"Purple
Knob")
set_control_par(get_ui_id($HPFilterResonance),$CONTROL_PAR_WIDTH,45)
set_control_par(get_ui_id($HPFilterResonance),$CONTROL_PAR_HEIGHT,45)
set_control_par(get_ui_id($HPFilterResonance),$CONTROL_PAR_MOUSE_BEHAVIOUR,-
600)
set_control_par(get_ui_id($HPFilterResonance),$CONTROL_PAR_DEFAULT_VALUE,0)
make_persistent($HPFilterResonance)
read_persistent_var($HPFilterResonance)
%main[7] := get_ui_id($HPFilterResonance)

{CONTROLS}
declare ui_switch $Mono
move_control_px($Mono,255,438)
set_control_par_str(get_ui_id($Mono),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($Mono),$CONTROL_PAR_PICTURE,"switch")
set_control_par(get_ui_id($Mono),$CONTROL_PAR_WIDTH,65)
set_control_par(get_ui_id($Mono),$CONTROL_PAR_HEIGHT,65)
make_persistent($Mono)
read_persistent_var($Mono)
%main[8] := get_ui_id($Mono)

declare ui_switch $Legato


move_control_px($Legato,354,438)
set_control_par_str(get_ui_id($Legato),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($Legato),$CONTROL_PAR_PICTURE,"switch")
set_control_par(get_ui_id($Legato),$CONTROL_PAR_WIDTH,65)
set_control_par(get_ui_id($Legato),$CONTROL_PAR_HEIGHT,65)
make_persistent($Legato)
read_persistent_var($Legato)
%main[9] := get_ui_id($Legato)

declare ui_slider $Glide(0, 127)


move_control_px($Glide,305,414)
set_control_par_str(get_ui_id($Glide),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($Glide),$CONTROL_PAR_PICTURE,"glide")
set_control_par(get_ui_id($Glide),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($Glide),$CONTROL_PAR_HEIGHT,55)
set_control_par(get_ui_id($Glide),$CONTROL_PAR_MOUSE_BEHAVIOUR,-600)
set_control_par(get_ui_id($Glide),$CONTROL_PAR_DEFAULT_VALUE,6000)
make_persistent($Glide)
read_persistent_var($Glide)
%main[10] := get_ui_id($Glide)

declare ui_slider $VibratoRate(0, 1000000)


move_control_px($VibratoRate,249,294)
set_control_par_str(get_ui_id($VibratoRate),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($VibratoRate),$CONTROL_PAR_PICTURE,"Small Red
Knob")
set_control_par(get_ui_id($VibratoRate),$CONTROL_PAR_WIDTH,45)
set_control_par(get_ui_id($VibratoRate),$CONTROL_PAR_HEIGHT,45)
set_control_par(get_ui_id($VibratoRate),$CONTROL_PAR_MOUSE_BEHAVIOUR,-1000)
set_control_par(get_ui_id($VibratoRate),$CONTROL_PAR_DEFAULT_VALUE,1000000)
make_persistent($VibratoRate)
read_persistent_var($VibratoRate)
%main[11] := get_ui_id($VibratoRate)

declare ui_slider $VibratoDepth(0, 1000000)


move_control_px($VibratoDepth,323,294)
set_control_par_str(get_ui_id($VibratoDepth),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($VibratoDepth),$CONTROL_PAR_PICTURE,"Small Red
Knob")
set_control_par(get_ui_id($VibratoDepth),$CONTROL_PAR_WIDTH,45)
set_control_par(get_ui_id($VibratoDepth),$CONTROL_PAR_HEIGHT,45)
set_control_par(get_ui_id($VibratoDepth),$CONTROL_PAR_MOUSE_BEHAVIOUR,-1000)
set_control_par(get_ui_id($VibratoDepth),$CONTROL_PAR_DEFAULT_VALUE,1000000)
make_persistent($VibratoDepth)
read_persistent_var($VibratoDepth)
%main[12] := get_ui_id($VibratoDepth)

{EFFECTS}
declare ui_slider $Delay(0, 397000)
move_control_px($Delay,522,410)
set_control_par_str(get_ui_id($Delay),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($Delay),$CONTROL_PAR_PICTURE,"Purple Knob")
set_control_par(get_ui_id($Delay),$CONTROL_PAR_WIDTH,45)
set_control_par(get_ui_id($Delay),$CONTROL_PAR_HEIGHT,45)
set_control_par(get_ui_id($Delay),$CONTROL_PAR_MOUSE_BEHAVIOUR,-1000)
set_control_par(get_ui_id($Delay),$CONTROL_PAR_DEFAULT_VALUE,397000)
make_persistent($Delay)
read_persistent_var($Delay)
%main2[0] := get_ui_id($Delay)

declare ui_switch $DelaySync


move_control_px($DelaySync,612,387)
set_control_par_str(get_ui_id($DelaySync),$CONTROL_PAR_PICTURE,"Sync")
set_control_par_str(get_ui_id($DelaySync),$CONTROL_PAR_TEXT,"")
set_control_par(get_ui_id($DelaySync),$CONTROL_PAR_WIDTH,50)
set_control_par(get_ui_id($DelaySync),$CONTROL_PAR_HEIGHT,40)
make_persistent($DelaySync)
read_persistent_var($DelaySync)
%main2[1] := get_ui_id($DelaySync)

declare ui_slider $Reverb(0, 397000)


move_control_px($Reverb,423,410)
set_control_par_str(get_ui_id($Reverb),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($Reverb),$CONTROL_PAR_PICTURE,"Purple Knob")
set_control_par(get_ui_id($Reverb),$CONTROL_PAR_WIDTH,45)
set_control_par(get_ui_id($Reverb),$CONTROL_PAR_HEIGHT,45)
set_control_par(get_ui_id($Reverb),$CONTROL_PAR_MOUSE_BEHAVIOUR,-1000)
set_control_par(get_ui_id($Reverb),$CONTROL_PAR_DEFAULT_VALUE,397000)
make_persistent($Reverb)
read_persistent_var($Reverb)
%main2[2] := get_ui_id($Reverb)

declare ui_slider $Phaser(0, 397000)


move_control_px($Phaser,322,410)
set_control_par_str(get_ui_id($Phaser),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($Phaser),$CONTROL_PAR_PICTURE,"Purple Knob")
set_control_par(get_ui_id($Phaser),$CONTROL_PAR_WIDTH,45)
set_control_par(get_ui_id($Phaser),$CONTROL_PAR_HEIGHT,45)
set_control_par(get_ui_id($Phaser),$CONTROL_PAR_MOUSE_BEHAVIOUR,-1000)
set_control_par(get_ui_id($Phaser),$CONTROL_PAR_DEFAULT_VALUE,397000)
make_persistent($Phaser)
read_persistent_var($Phaser)
%main2[3] := get_ui_id($Phaser)

declare ui_slider $Dist(0, 397000)


move_control_px($Dist,222,410)
set_control_par_str(get_ui_id($Dist),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($Dist),$CONTROL_PAR_PICTURE,"Purple Knob")
set_control_par(get_ui_id($Dist),$CONTROL_PAR_WIDTH,45)
set_control_par(get_ui_id($Dist),$CONTROL_PAR_HEIGHT,45)
set_control_par(get_ui_id($Dist),$CONTROL_PAR_MOUSE_BEHAVIOUR,-1000)
set_control_par(get_ui_id($Dist),$CONTROL_PAR_DEFAULT_VALUE,397000)
make_persistent($Dist)
read_persistent_var($Dist)
%main2[4] := get_ui_id($Dist)

declare ui_slider $Tremolo(0, 1000000)


move_control_px($Tremolo,123,410)
set_control_par_str(get_ui_id($Tremolo),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($Tremolo),$CONTROL_PAR_PICTURE,"Purple Knob")
set_control_par(get_ui_id($Tremolo),$CONTROL_PAR_WIDTH,45)
set_control_par(get_ui_id($Tremolo),$CONTROL_PAR_HEIGHT,45)
set_control_par(get_ui_id($Tremolo),$CONTROL_PAR_MOUSE_BEHAVIOUR,-1000)
set_control_par(get_ui_id($Tremolo),$CONTROL_PAR_DEFAULT_VALUE,1000000)
make_persistent($Tremolo)
read_persistent_var($Tremolo)
%main2[5] := get_ui_id($Tremolo)

declare ui_slider $Chorus(0, 397000)


move_control_px($Chorus,20,410)
set_control_par_str(get_ui_id($Chorus),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($Chorus),$CONTROL_PAR_PICTURE,"Purple Knob")
set_control_par(get_ui_id($Chorus),$CONTROL_PAR_WIDTH,45)
set_control_par(get_ui_id($Chorus),$CONTROL_PAR_HEIGHT,45)
set_control_par(get_ui_id($Chorus),$CONTROL_PAR_MOUSE_BEHAVIOUR,-1000)
set_control_par(get_ui_id($Chorus),$CONTROL_PAR_DEFAULT_VALUE,397000)
make_persistent($Chorus)
read_persistent_var($Chorus)
%main2[6] := get_ui_id($Chorus)

{EQ}
declare ui_slider $EQlo(0, 1000000)
move_control_px($EQlo,15,278)
set_control_par_str(get_ui_id($EQlo),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($EQlo),$CONTROL_PAR_PICTURE,"Big Red Knob")
set_control_par(get_ui_id($EQlo),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($EQlo),$CONTROL_PAR_HEIGHT,55)
set_control_par(get_ui_id($EQlo),$CONTROL_PAR_MOUSE_BEHAVIOUR,-800)
set_control_par(get_ui_id($EQlo),$CONTROL_PAR_DEFAULT_VALUE,500000)
make_persistent($EQlo)
read_persistent_var($EQlo)
%main2[7] := get_ui_id($EQlo)

declare ui_slider $EQlomid(0, 1000000)


move_control_px($EQlomid,142,276)
set_control_par_str(get_ui_id($EQlomid),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($EQlomid),$CONTROL_PAR_PICTURE,"Big Red Knob")
set_control_par(get_ui_id($EQlomid),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($EQlomid),$CONTROL_PAR_HEIGHT,55)
set_control_par(get_ui_id($EQlomid),$CONTROL_PAR_MOUSE_BEHAVIOUR,-800)
set_control_par(get_ui_id($EQlomid),$CONTROL_PAR_DEFAULT_VALUE,500000)
make_persistent($EQlomid)
read_persistent_var($EQlomid)
%main2[8] := get_ui_id($EQlomid)
declare ui_slider $EQhimid(0, 1000000)
move_control_px($EQhimid,402,277)
set_control_par_str(get_ui_id($EQhimid),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($EQhimid),$CONTROL_PAR_PICTURE,"Big Red Knob")
set_control_par(get_ui_id($EQhimid),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($EQhimid),$CONTROL_PAR_HEIGHT,55)
set_control_par(get_ui_id($EQhimid),$CONTROL_PAR_MOUSE_BEHAVIOUR,-800)
set_control_par(get_ui_id($EQhimid),$CONTROL_PAR_DEFAULT_VALUE,500000)
make_persistent($EQhimid)
read_persistent_var($EQhimid)
%main2[9] := get_ui_id($EQhimid)

declare ui_slider $EQhi(0, 1000000)


move_control_px($EQhi,526,276)
set_control_par_str(get_ui_id($EQhi),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($EQhi),$CONTROL_PAR_PICTURE,"Big Red Knob")
set_control_par(get_ui_id($EQhi),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($EQhi),$CONTROL_PAR_HEIGHT,55)
set_control_par(get_ui_id($EQhi),$CONTROL_PAR_MOUSE_BEHAVIOUR,-800)
set_control_par(get_ui_id($EQhi),$CONTROL_PAR_DEFAULT_VALUE,500000)
make_persistent($EQhi)
read_persistent_var($EQhi)
%main2[10] := get_ui_id($EQhi)

{PITCHENV}
declare ui_slider $PitchAttack(0, 900000)
move_control_px($PitchAttack,249,294)
set_control_par_str(get_ui_id($PitchAttack),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($PitchAttack),$CONTROL_PAR_PICTURE,"Small Red
Knob")
set_control_par(get_ui_id($PitchAttack),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($PitchAttack),$CONTROL_PAR_HEIGHT,55)
set_control_par(get_ui_id($PitchAttack),$CONTROL_PAR_MOUSE_BEHAVIOUR,-800)
set_control_par(get_ui_id($PitchAttack),$CONTROL_PAR_DEFAULT_VALUE,450000)
make_persistent($PitchAttack)
read_persistent_var($PitchAttack)
%main2[11] := get_ui_id($PitchAttack)

declare ui_slider $PitchRel(0, 800000)


move_control_px($PitchRel,323,294)
set_control_par_str(get_ui_id($PitchRel),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($PitchRel),$CONTROL_PAR_PICTURE,"Small Red Knob")
set_control_par(get_ui_id($PitchRel),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($PitchRel),$CONTROL_PAR_HEIGHT,55)
set_control_par(get_ui_id($PitchRel),$CONTROL_PAR_MOUSE_BEHAVIOUR,-800)
set_control_par(get_ui_id($PitchRel),$CONTROL_PAR_DEFAULT_VALUE,400000)
make_persistent($PitchRel)
read_persistent_var($PitchRel)
%main2[12] := get_ui_id($PitchRel)

{ARP}
declare %orderArp[7] := (1, 2, 3, 4, 5, 16, 14)
declare $orderArpI
make_persistent($orderArpI)
read_persistent_var($orderArpI)
if ($orderArpI = 0)
$orderArpI := 1
end if

declare ui_label $led_0_lbl (1,1)


declare ui_label $led_1_lbl (1,1)
declare ui_label $led_2_lbl (1,1)
declare ui_label $led_3_lbl (1,1)
declare ui_label $led_4_lbl (1,1)
declare ui_label $led_5_lbl (1,1)
declare ui_label $led_6_lbl (1,1)
declare ui_label $led_7_lbl (1,1)
declare ui_label $led_8_lbl (1,1)
declare ui_label $led_9_lbl (1,1)
declare ui_label $led_10_lbl (1,1)
declare ui_label $led_11_lbl (1,1)
declare ui_label $led_12_lbl (1,1)
declare ui_label $led_13_lbl (1,1)
declare ui_label $led_14_lbl (1,1)
declare ui_label $led_15_lbl (1,1)

declare %led_lbl_ids[16]
%led_lbl_ids[0] := get_ui_id($led_0_lbl)
%led_lbl_ids[1] := get_ui_id($led_1_lbl)
%led_lbl_ids[2] := get_ui_id($led_2_lbl)
%led_lbl_ids[3] := get_ui_id($led_3_lbl)
%led_lbl_ids[4] := get_ui_id($led_4_lbl)
%led_lbl_ids[5] := get_ui_id($led_5_lbl)
%led_lbl_ids[6] := get_ui_id($led_6_lbl)
%led_lbl_ids[7] := get_ui_id($led_7_lbl)
%led_lbl_ids[8] := get_ui_id($led_8_lbl)
%led_lbl_ids[9] := get_ui_id($led_9_lbl)
%led_lbl_ids[10] := get_ui_id($led_10_lbl)
%led_lbl_ids[11] := get_ui_id($led_11_lbl)
%led_lbl_ids[12] := get_ui_id($led_12_lbl)
%led_lbl_ids[13] := get_ui_id($led_13_lbl)
%led_lbl_ids[14] := get_ui_id($led_14_lbl)
%led_lbl_ids[15] := get_ui_id($led_15_lbl)

declare %led[16]

$count := 0
while ($count < 16)

set_control_par_str(%led_lbl_ids[$count],
$CONTROL_PAR_PICTURE,"Arp_LED")
set_control_par(%led_lbl_ids[$count],
$CONTROL_PAR_MOUSE_BEHAVIOUR,-1000)

set_control_par_str(%led_lbl_ids[$count],$CONTROL_PAR_TEXT,"")

set_control_par(%led_lbl_ids[$count],$CONTROL_PAR_POS_X,80+
($count*30))
set_control_par(%led_lbl_ids[$count],$CONTROL_PAR_POS_Y,381)

inc($count)
end while
declare ui_slider $arp_rhythm_0_sld (0,127)
declare ui_slider $arp_rhythm_1_sld (0,127)
declare ui_slider $arp_rhythm_2_sld (0,127)
declare ui_slider $arp_rhythm_3_sld (0,127)
declare ui_slider $arp_rhythm_4_sld (0,127)
declare ui_slider $arp_rhythm_5_sld (0,127)
declare ui_slider $arp_rhythm_6_sld (0,127)
declare ui_slider $arp_rhythm_7_sld (0,127)
declare ui_slider $arp_rhythm_8_sld (0,127)
declare ui_slider $arp_rhythm_9_sld (0,127)
declare ui_slider $arp_rhythm_10_sld (0,127)
declare ui_slider $arp_rhythm_11_sld (0,127)
declare ui_slider $arp_rhythm_12_sld (0,127)
declare ui_slider $arp_rhythm_13_sld (0,127)
declare ui_slider $arp_rhythm_14_sld (0,127)
declare ui_slider $arp_rhythm_15_sld (0,127)

make_persistent($arp_rhythm_0_sld)
read_persistent_var($arp_rhythm_0_sld)
make_persistent($arp_rhythm_1_sld)
read_persistent_var($arp_rhythm_1_sld)
make_persistent($arp_rhythm_2_sld)
read_persistent_var($arp_rhythm_2_sld)
make_persistent($arp_rhythm_3_sld)
read_persistent_var($arp_rhythm_3_sld)
make_persistent($arp_rhythm_4_sld)
read_persistent_var($arp_rhythm_4_sld)
make_persistent($arp_rhythm_5_sld)
read_persistent_var($arp_rhythm_5_sld)
make_persistent($arp_rhythm_6_sld)
read_persistent_var($arp_rhythm_6_sld)
make_persistent($arp_rhythm_7_sld)
read_persistent_var($arp_rhythm_7_sld)
make_persistent($arp_rhythm_8_sld)
read_persistent_var($arp_rhythm_8_sld)
make_persistent($arp_rhythm_9_sld)
read_persistent_var($arp_rhythm_9_sld)
make_persistent($arp_rhythm_10_sld)
read_persistent_var($arp_rhythm_10_sld)
make_persistent($arp_rhythm_11_sld)
read_persistent_var($arp_rhythm_11_sld)
make_persistent($arp_rhythm_12_sld)
read_persistent_var($arp_rhythm_12_sld)
make_persistent($arp_rhythm_13_sld)
read_persistent_var($arp_rhythm_13_sld)
make_persistent($arp_rhythm_14_sld)
read_persistent_var($arp_rhythm_14_sld)
make_persistent($arp_rhythm_15_sld)
read_persistent_var($arp_rhythm_15_sld)

declare %rhythm_sld_ids[16]
%rhythm_sld_ids[0] := get_ui_id($arp_rhythm_0_sld)
%rhythm_sld_ids[1] := get_ui_id($arp_rhythm_1_sld)
%rhythm_sld_ids[2] := get_ui_id($arp_rhythm_2_sld)
%rhythm_sld_ids[3] := get_ui_id($arp_rhythm_3_sld)
%rhythm_sld_ids[4] := get_ui_id($arp_rhythm_4_sld)
%rhythm_sld_ids[5] := get_ui_id($arp_rhythm_5_sld)
%rhythm_sld_ids[6] := get_ui_id($arp_rhythm_6_sld)
%rhythm_sld_ids[7] := get_ui_id($arp_rhythm_7_sld)
%rhythm_sld_ids[8] := get_ui_id($arp_rhythm_8_sld)
%rhythm_sld_ids[9] := get_ui_id($arp_rhythm_9_sld)
%rhythm_sld_ids[10] := get_ui_id($arp_rhythm_10_sld)
%rhythm_sld_ids[11] := get_ui_id($arp_rhythm_11_sld)
%rhythm_sld_ids[12] := get_ui_id($arp_rhythm_12_sld)
%rhythm_sld_ids[13] := get_ui_id($arp_rhythm_13_sld)
%rhythm_sld_ids[14] := get_ui_id($arp_rhythm_14_sld)
%rhythm_sld_ids[15] := get_ui_id($arp_rhythm_15_sld)

$count := 0
while ($count < 16)

set_control_par_str(%rhythm_sld_ids[$count],
$CONTROL_PAR_PICTURE,"Arp_Slider")
set_control_par(%rhythm_sld_ids[$count],
$CONTROL_PAR_MOUSE_BEHAVIOUR,-1300)

set_control_par_str(%rhythm_sld_ids[$count],
$CONTROL_PAR_TEXT,"as")

set_control_par(%rhythm_sld_ids[$count],$CONTROL_PAR_POS_X,74+
($count*30))
set_control_par(%rhythm_sld_ids[$count],$CONTROL_PAR_POS_Y,400)

inc($count)
end while

declare %duration[16]

declare ui_slider $arp_duration_0_sld (0,127)


declare ui_slider $arp_duration_1_sld (0,127)
declare ui_slider $arp_duration_2_sld (0,127)
declare ui_slider $arp_duration_3_sld (0,127)
declare ui_slider $arp_duration_4_sld (0,127)
declare ui_slider $arp_duration_5_sld (0,127)
declare ui_slider $arp_duration_6_sld (0,127)
declare ui_slider $arp_duration_7_sld (0,127)
declare ui_slider $arp_duration_8_sld (0,127)
declare ui_slider $arp_duration_9_sld (0,127)
declare ui_slider $arp_duration_10_sld (0,127)
declare ui_slider $arp_duration_11_sld (0,127)
declare ui_slider $arp_duration_12_sld (0,127)
declare ui_slider $arp_duration_13_sld (0,127)
declare ui_slider $arp_duration_14_sld (0,127)
declare ui_slider $arp_duration_15_sld (0,127)

make_persistent($arp_duration_0_sld)
read_persistent_var($arp_duration_0_sld)
make_persistent($arp_duration_1_sld)
read_persistent_var($arp_duration_1_sld)
make_persistent($arp_duration_2_sld)
read_persistent_var($arp_duration_2_sld)
make_persistent($arp_duration_3_sld)
read_persistent_var($arp_duration_3_sld)
make_persistent($arp_duration_4_sld)
read_persistent_var($arp_duration_4_sld)
make_persistent($arp_duration_5_sld)
read_persistent_var($arp_duration_5_sld)
make_persistent($arp_duration_6_sld)
read_persistent_var($arp_duration_6_sld)
make_persistent($arp_duration_7_sld)
read_persistent_var($arp_duration_7_sld)
make_persistent($arp_duration_8_sld)
read_persistent_var($arp_duration_8_sld)
make_persistent($arp_duration_9_sld)
read_persistent_var($arp_duration_9_sld)
make_persistent($arp_duration_10_sld)
read_persistent_var($arp_duration_10_sld)
make_persistent($arp_duration_11_sld)
read_persistent_var($arp_duration_11_sld)
make_persistent($arp_duration_12_sld)
read_persistent_var($arp_duration_12_sld)
make_persistent($arp_duration_13_sld)
read_persistent_var($arp_duration_13_sld)
make_persistent($arp_duration_14_sld)
read_persistent_var($arp_duration_14_sld)
make_persistent($arp_duration_15_sld)
read_persistent_var($arp_duration_15_sld)

declare %duration_sld_ids[16]
%duration_sld_ids[0] := get_ui_id($arp_duration_0_sld)
%duration_sld_ids[1] := get_ui_id($arp_duration_1_sld)
%duration_sld_ids[2] := get_ui_id($arp_duration_2_sld)
%duration_sld_ids[3] := get_ui_id($arp_duration_3_sld)
%duration_sld_ids[4] := get_ui_id($arp_duration_4_sld)
%duration_sld_ids[5] := get_ui_id($arp_duration_5_sld)
%duration_sld_ids[6] := get_ui_id($arp_duration_6_sld)
%duration_sld_ids[7] := get_ui_id($arp_duration_7_sld)
%duration_sld_ids[8] := get_ui_id($arp_duration_8_sld)
%duration_sld_ids[9] := get_ui_id($arp_duration_9_sld)
%duration_sld_ids[10] := get_ui_id($arp_duration_10_sld)
%duration_sld_ids[11] := get_ui_id($arp_duration_11_sld)
%duration_sld_ids[12] := get_ui_id($arp_duration_12_sld)
%duration_sld_ids[13] := get_ui_id($arp_duration_13_sld)
%duration_sld_ids[14] := get_ui_id($arp_duration_14_sld)
%duration_sld_ids[15] := get_ui_id($arp_duration_15_sld)

$count := 0
while ($count < 16)

set_control_par_str(%duration_sld_ids[$count],
$CONTROL_PAR_PICTURE,"Arp_Slider")
set_control_par(%duration_sld_ids[$count],
$CONTROL_PAR_MOUSE_BEHAVIOUR,-1300)

set_control_par_str(%duration_sld_ids[$count],
$CONTROL_PAR_TEXT,"as")

set_control_par(%duration_sld_ids[$count],$CONTROL_PAR_POS_X,51+
($count*34))
set_control_par(%duration_sld_ids[$count],$CONTROL_PAR_POS_Y,306)

inc($count)
end while

declare $played_pitch
declare %arp_pitch[16]
make_persistent(%arp_pitch)
read_persistent_var(%arp_pitch)

declare %arp_pitch_ids[16]

declare ui_slider $arp_pitch0(-12, 24)


declare ui_slider $arp_pitch1(-12, 24)
declare ui_slider $arp_pitch2(-12, 24)
declare ui_slider $arp_pitch3(-12, 24)
declare ui_slider $arp_pitch4(-12, 24)
declare ui_slider $arp_pitch5(-12, 24)
declare ui_slider $arp_pitch6(-12, 24)
declare ui_slider $arp_pitch7(-12, 24)
declare ui_slider $arp_pitch8(-12, 24)
declare ui_slider $arp_pitch9(-12, 24)
declare ui_slider $arp_pitch10(-12, 24)
declare ui_slider $arp_pitch11(-12, 24)
declare ui_slider $arp_pitch12(-12, 24)
declare ui_slider $arp_pitch13(-12, 24)
declare ui_slider $arp_pitch14(-12, 24)
declare ui_slider $arp_pitch15(-12, 24)

make_persistent($arp_pitch0)
read_persistent_var($arp_pitch0)
make_persistent($arp_pitch1)
read_persistent_var($arp_pitch1)
make_persistent($arp_pitch2)
read_persistent_var($arp_pitch2)
make_persistent($arp_pitch3)
read_persistent_var($arp_pitch3)
make_persistent($arp_pitch4)
read_persistent_var($arp_pitch4)
make_persistent($arp_pitch5)
read_persistent_var($arp_pitch5)
make_persistent($arp_pitch6)
read_persistent_var($arp_pitch6)
make_persistent($arp_pitch7)
read_persistent_var($arp_pitch7)
make_persistent($arp_pitch8)
read_persistent_var($arp_pitch8)
make_persistent($arp_pitch9)
read_persistent_var($arp_pitch9)
make_persistent($arp_pitch10)
read_persistent_var($arp_pitch10)
make_persistent($arp_pitch11)
read_persistent_var($arp_pitch11)
make_persistent($arp_pitch12)
read_persistent_var($arp_pitch12)
make_persistent($arp_pitch13)
read_persistent_var($arp_pitch13)
make_persistent($arp_pitch14)
read_persistent_var($arp_pitch14)
make_persistent($arp_pitch15)
read_persistent_var($arp_pitch15)

%arp_pitch_ids[0] := get_ui_id($arp_pitch0)
%arp_pitch_ids[1] := get_ui_id($arp_pitch1)
%arp_pitch_ids[2] := get_ui_id($arp_pitch2)
%arp_pitch_ids[3] := get_ui_id($arp_pitch3)
%arp_pitch_ids[4] := get_ui_id($arp_pitch4)
%arp_pitch_ids[5] := get_ui_id($arp_pitch5)
%arp_pitch_ids[6] := get_ui_id($arp_pitch6)
%arp_pitch_ids[7] := get_ui_id($arp_pitch7)
%arp_pitch_ids[8] := get_ui_id($arp_pitch8)
%arp_pitch_ids[9] := get_ui_id($arp_pitch9)
%arp_pitch_ids[10] := get_ui_id($arp_pitch10)
%arp_pitch_ids[11] := get_ui_id($arp_pitch11)
%arp_pitch_ids[12] := get_ui_id($arp_pitch12)
%arp_pitch_ids[13] := get_ui_id($arp_pitch13)
%arp_pitch_ids[14] := get_ui_id($arp_pitch14)
%arp_pitch_ids[15] := get_ui_id($arp_pitch15)

$i := 0
while ($i < 16)
set_control_par_str(%arp_pitch_ids[$i],$CONTROL_PAR_TEXT,"")
set_control_par_str(%arp_pitch_ids[$i],$CONTROL_PAR_PICTURE,"pitch")
set_control_par(%arp_pitch_ids[$i],$CONTROL_PAR_WIDTH,55)
set_control_par(%arp_pitch_ids[$i],$CONTROL_PAR_HEIGHT,55)
set_control_par(%arp_pitch_ids[$i],$CONTROL_PAR_POS_X,80+($i*30))
set_control_par(%arp_pitch_ids[$i],$CONTROL_PAR_POS_Y,503)
set_control_par(%arp_pitch_ids[$i],$CONTROL_PAR_MOUSE_BEHAVIOUR,-200)
set_control_par(%arp_pitch_ids[$i],$CONTROL_PAR_DEFAULT_VALUE,0)
inc($i)
end while

{ARP}

declare $presetX := 110


declare $presetY := 228

declare ui_switch $ClearVel


move_control_px ($ClearVel,563,411)
set_control_par_str(get_ui_id($ClearVel),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($ClearVel),$CONTROL_PAR_PICTURE,"Clear")
set_control_par(get_ui_id($ClearVel), $CONTROL_PAR_TEXTPOS_Y, 6)
set_control_par(get_ui_id($ClearVel), $CONTROL_PAR_TEXT_ALIGNMENT, 1)
set_control_par(get_ui_id($ClearVel), $CONTROL_PAR_FONT_TYPE, 1)
set_control_par(get_ui_id($ClearVel), $CONTROL_PAR_WIDTH, 70)
set_control_par(get_ui_id($ClearVel), $CONTROL_PAR_HEIGHT, 55)
set_control_par_str(get_ui_id($ClearVel),$CONTROL_PAR_HELP,"Clear all steps")
make_persistent($ClearVel)
read_persistent_var($ClearVel)
%arp[1] := get_ui_id($ClearVel)

declare ui_switch $InitVel


move_control_px ($InitVel,12,430)
set_control_par_str(get_ui_id($InitVel),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($InitVel),$CONTROL_PAR_PICTURE,"Init")
set_control_par(get_ui_id($InitVel), $CONTROL_PAR_TEXTPOS_Y, 6)
set_control_par(get_ui_id($InitVel), $CONTROL_PAR_TEXT_ALIGNMENT, 1)
set_control_par(get_ui_id($InitVel), $CONTROL_PAR_FONT_TYPE, 1)
set_control_par(get_ui_id($InitVel), $CONTROL_PAR_WIDTH, 70)
set_control_par(get_ui_id($InitVel), $CONTROL_PAR_HEIGHT, 55)
set_control_par_str(get_ui_id($InitVel),$CONTROL_PAR_HELP,"Init all steps")
make_persistent($InitVel)
read_persistent_var($InitVel)
%arp[3] := get_ui_id($InitVel)

declare ui_switch $ClearPitch


move_control_px ($ClearPitch,563,448)
set_control_par_str(get_ui_id($ClearPitch),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($ClearPitch),$CONTROL_PAR_PICTURE,"Clear")
set_control_par(get_ui_id($ClearPitch), $CONTROL_PAR_TEXTPOS_Y, 6)
set_control_par(get_ui_id($ClearPitch), $CONTROL_PAR_TEXT_ALIGNMENT, 1)
set_control_par(get_ui_id($ClearPitch), $CONTROL_PAR_FONT_TYPE, 1)
set_control_par(get_ui_id($ClearPitch), $CONTROL_PAR_WIDTH, 65)
set_control_par(get_ui_id($ClearPitch), $CONTROL_PAR_HEIGHT, 55)
set_control_par_str(get_ui_id($ClearPitch),$CONTROL_PAR_HELP,"Clear all steps")
make_persistent($ClearPitch)
read_persistent_var($ClearPitch)
%arp[4] := get_ui_id($ClearPitch)

declare ui_menu $ARPoctave


move_control_px ($ARPoctave,540,310)
set_control_par(get_ui_id($ARPoctave), $CONTROL_PAR_WIDTH, 30)
set_control_par(get_ui_id($ARPoctave), $CONTROL_PAR_HEIGHT, 17)
set_control_par_str(get_ui_id($ARPoctave),$CONTROL_PAR_PICTURE,"transparent")
set_control_par(get_ui_id($ARPoctave),$CONTROL_PAR_DEFAULT_VALUE,0)
set_control_par_str(get_ui_id($ARPoctave),$CONTROL_PAR_HELP,"Sets the octave
displacement range")
make_persistent($ARPoctave)
read_persistent_var($ARPoctave)
add_menu_item ($ARPoctave," -2",-2)
add_menu_item ($ARPoctave," -1",-2)
add_menu_item ($ARPoctave," 0",0)
add_menu_item ($ARPoctave," +1",1)
add_menu_item ($ARPoctave," +2",2)
%arp[5] := get_ui_id($ARPoctave)

declare !tempo_names[18]
!tempo_names[0] := "1/128"
!tempo_names[1] := "1/64"
!tempo_names[2] := "1/32"
!tempo_names[3] := "1/16 T"
!tempo_names[4] := "1/16"
!tempo_names[5] := "1/8 T"
!tempo_names[6] := "1/8"
!tempo_names[7] := "1/4 T"
!tempo_names[8] := "1/4"
!tempo_names[9] := "1/2 T"
!tempo_names[10] := "1/2"
!tempo_names[11] := "3/4"
!tempo_names[12] := "Bar"

declare ui_menu $ARPgate


move_control_px ($ARPgate,1124,86)
set_control_par_str(get_ui_id($ARPgate),$CONTROL_PAR_PICTURE,"transparent4")
set_control_par(get_ui_id($ARPgate), $CONTROL_PAR_WIDTH, 75)
set_control_par(get_ui_id($ARPgate), $CONTROL_PAR_HEIGHT, 17)
set_control_par(get_ui_id($ARPgate),$CONTROL_PAR_DEFAULT_VALUE,0)
set_control_par(get_ui_id($ARPgate),$CONTROL_PAR_TEXT_ALIGNMENT,1)
set_control_par_str(get_ui_id($ARPgate),$CONTROL_PAR_HELP,"Sets the rhythmic
grid from 128th notes to 1bar")
make_persistent($ARPgate)
read_persistent_var($ARPgate)
$i := 0
while ($i < 13)
add_menu_item ($ARPgate, !tempo_names[$i],$i)
inc($i)
end while
%arp[6] := get_ui_id($ARPgate)

declare ui_menu $ARPrate


move_control_px ($ARPrate,1540,86)
set_control_par_str(get_ui_id($ARPrate),$CONTROL_PAR_PICTURE,"transparent4")
set_control_par(get_ui_id($ARPrate), $CONTROL_PAR_WIDTH, 75)
set_control_par(get_ui_id($ARPrate), $CONTROL_PAR_HEIGHT, 27)
set_control_par(get_ui_id($ARPrate),$CONTROL_PAR_DEFAULT_VALUE,0)
set_control_par(get_ui_id($ARPrate),$CONTROL_PAR_TEXT_ALIGNMENT,1)
set_control_par_str(get_ui_id($ARPrate),$CONTROL_PAR_HELP,"Sets the rhythmic
grid from 128th notes to 1bar")
make_persistent($ARPrate)
read_persistent_var($ARPrate)
$i := 0
while ($i < 13)
add_menu_item ($ARPrate, !tempo_names[$i],$i)
inc($i)
end while
%arp[7] := get_ui_id($ARPrate)

declare ui_slider $ARPrateS(0, 12)


move_control_px($ARPrateS,157,266)
set_control_par_str(get_ui_id($ARPrateS),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($ARPrateS),$CONTROL_PAR_PICTURE,"Purple Knob")
set_control_par(get_ui_id($ARPrateS),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($ARPrateS),$CONTROL_PAR_HEIGHT,55)
set_control_par(get_ui_id($ARPrateS),$CONTROL_PAR_MOUSE_BEHAVIOUR,-800)
set_control_par(get_ui_id($ARPrateS),$CONTROL_PAR_DEFAULT_VALUE,6)
make_persistent($ARPrateS)
read_persistent_var($ARPrateS)
%arp[12] := get_ui_id($ARPrateS)

declare ui_slider $ARPgateS(0, 12)


move_control_px($ARPgateS,380,266)
set_control_par_str(get_ui_id($ARPgateS),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($ARPgateS),$CONTROL_PAR_PICTURE,"Purple Knob")
set_control_par(get_ui_id($ARPgateS),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($ARPgateS),$CONTROL_PAR_HEIGHT,55)
set_control_par(get_ui_id($ARPgateS),$CONTROL_PAR_MOUSE_BEHAVIOUR,-800)
set_control_par(get_ui_id($ARPgateS),$CONTROL_PAR_DEFAULT_VALUE,6)
make_persistent($ARPgateS)
read_persistent_var($ARPgateS)
%arp[11] := get_ui_id($ARPgateS)

declare ui_menu $ARPorder


move_control_px ($ARPorder,45,310)
set_control_par_str(get_ui_id($ARPorder),$CONTROL_PAR_PICTURE,"transparent")
set_control_par(get_ui_id($ARPorder), $CONTROL_PAR_WIDTH, 65)
set_control_par(get_ui_id($ARPorder), $CONTROL_PAR_HEIGHT, 17)
set_control_par(get_ui_id($ARPorder),$CONTROL_PAR_DEFAULT_VALUE,0)
set_control_par(get_ui_id($ARPorder),$CONTROL_PAR_TEXT_ALIGNMENT,1)
set_control_par_str(get_ui_id($ARPorder),$CONTROL_PAR_HELP,"Defines the pattern
for the order in which notes are arpeggiated")
make_persistent($ARPorder)
read_persistent_var($ARPorder)
add_menu_item ($ARPorder, "As Played",1)
add_menu_item ($ARPorder, "---------",99)
add_menu_item ($ARPorder, "Up",2)
add_menu_item ($ARPorder, "Down",3)
add_menu_item ($ARPorder, "Up & Down",4)
add_menu_item ($ARPorder, "Down & Up",5)
add_menu_item ($ARPorder, "---------",99)
add_menu_item ($ARPorder, "Chord",16)
add_menu_item ($ARPorder, "---------",99)
add_menu_item ($ARPorder, "Random",14)
%arp[8] := get_ui_id($ARPorder)

declare ui_switch $ARPmode


move_control_px ($ARPmode,325,304)
set_control_par_str(get_ui_id($ARPmode),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($ARPmode),$CONTROL_PAR_PICTURE,"Switch")
set_control_par(get_ui_id($ARPmode), $CONTROL_PAR_WIDTH, 85)
set_control_par(get_ui_id($ARPmode), $CONTROL_PAR_HEIGHT, 45)
make_persistent($ARPmode)
read_persistent_var($ARPmode)
%arp[9] := get_ui_id($ARPmode)

declare %rhythm[16]
make_persistent(%rhythm)
read_persistent_var(%rhythm)

declare ui_switch $SaveArp


move_control_px($SaveArp,3405,3376)
set_control_par_str(get_ui_id($SaveArp),$CONTROL_PAR_TEXT,"")
set_control_par_str(get_ui_id($SaveArp),$CONTROL_PAR_PICTURE,"save")
set_control_par(get_ui_id($SaveArp),$CONTROL_PAR_WIDTH,80)
set_control_par(get_ui_id($SaveArp),$CONTROL_PAR_HEIGHT,35)
make_persistent($SaveArp)
read_persistent_var($SaveArp)
%arp[14] := get_ui_id($SaveArp)

declare const $REC_TIME := 30


declare const $LATCH_TIME := 300
declare const $LATCH_TIME_TRANS := 1000
declare $repeat := 1
{if up/down: 1 = No Repeat, 2 = Repeat top, 3 = Repeat bottom, 5 = Repeat
both}
declare $latch_mode
make_persistent($latch_mode)
$latch_mode := 1
declare $Str_Vel := 100

declare !note_class[12]
!note_class[0] := "C"
!note_class[1] := "Db"
!note_class[2] := "D"
!note_class[3] := "Eb"
!note_class[4] := "E"
!note_class[5] := "F"
!note_class[6] := "Gb"
!note_class[7] := "G"
!note_class[8] := "Ab"
!note_class[9] := "A"
!note_class[10] := "Bb"
!note_class[11] := "B"
declare !note_names [128]
$count := 0
while ($count < 128)
!note_names[$count] := !note_class[$count mod 12] & (($count/12)-2)
inc ($count)
end while

declare $Dur := 100


declare ui_knob $Strike (1, 5, 1)
make_persistent($Strike)
$Strike := 1

declare $Swing := 0
declare ui_knob $Octave (-6,6,1)
make_persistent($Octave)
$Octave := 0
set_knob_defval($Octave,0)

declare ui_menu $note_order


add_menu_item ($note_order,"Select Note Order",99)
add_menu_item ($note_order, "--------------",99)
add_menu_item ($note_order, "As Played",1)
add_menu_item ($note_order, "--------------",99)
add_menu_item ($note_order, "Up",2)
add_menu_item ($note_order, "Down",3)
add_menu_item ($note_order, "Up & Down",4)
add_menu_item ($note_order, "Down & Up",5)
add_menu_item ($note_order, "--------------",99)
add_menu_item ($note_order, "Chord",16)
add_menu_item ($note_order, "--------------",99)
add_menu_item ($note_order, "Random",14)

set_control_par_str(get_ui_id($note_order),$CONTROL_PAR_PICTURE,"knob_mode")

declare $last_note_order := 2
$note_order := 2
make_persistent($note_order)
make_persistent($last_note_order)

declare ui_switch $Velo_button


set_control_par_str(get_ui_id($Velo_button),$CONTROL_PAR_TEXT,"Fix Velocity")
make_persistent($Velo_button)
{**** from retrigger script*********}

declare const $Tempo_knob_X := 4


declare const $Tempo_knob_Y := 3
declare @knob_name
@knob_name := "Rate"
declare ui_knob $Rate_knob (0,1000000,1)
set_text ($Rate_knob,"Rate")
make_persistent ($Rate_knob)

declare ui_knob $Sync_knob (0,17,1)


set_text ($Sync_knob,@knob_name)
$Sync_knob := 5
set_knob_defval ($Sync_knob,5)
set_knob_label ($Sync_knob,!tempo_names[$Sync_knob])
make_persistent ($Sync_knob)

declare ui_knob $Sync_knob2 (0,17,1)


set_text ($Sync_knob2,@knob_name)
$Sync_knob2 := 5
set_knob_defval ($Sync_knob2,5)
set_knob_label ($Sync_knob2,!tempo_names[$Sync_knob])
make_persistent ($Sync_knob2)

declare $fill_buffer := 11
make_persistent($fill_buffer)
{**** from retrigger script*********}
declare %pressed_id[128]
declare %note_buffer[512]
declare %ordered[128]
declare %velo[128]
declare $cursor
declare $old_latch_time
declare $a
declare $aa
declare $sema
declare $rand
declare $bb
declare $b
declare $loop_cursor
declare %loop_buffer[512]
declare $id
declare $check_id
declare $min
declare $min_note
declare $max_note
declare $helper
declare %help_buffer[512]
declare $step_length
declare $strike_count
declare $duration
declare $note
declare $velo
declare $act_step
declare $last_order
declare $oct_cursor
declare $swing_cursor

$a := 0

read_persistent_var($Sync_knob)
read_persistent_var($Sync_knob2)
set_knob_label ($Sync_knob,!tempo_names[$Sync_knob])
$Rate_knob := ($sync_knob *1000001) / 17
set_knob_defval ($Rate_knob,(5 *1000001) / 17)
set_knob_label ($Rate_knob,!tempo_names[$sync_knob])
set_knob_unit($Rate_knob,$KNOB_UNIT_NONE)

set_knob_label ($Sync_knob2,!tempo_names[$Sync_knob])
$Rate_knob := ($sync_knob2 *1000001) / 17

move_control($note_order,0,0)
move_control($strike,0,0)
move_control($Octave,0,0)

move_control($Velo_button,0,0)
move_control($Rate_knob,0,0)
move_control($Sync_knob,0,0)
move_control($Sync_knob2,0,0)

declare $Unison := 0
declare $Voices := 1
declare $Detune := 0

if ($Mono = 0)
pgs_set_key_val(MONOLEGATOv, 0, 0)
else
pgs_set_key_val(MONOLEGATOv, 0, 1+$Legato)
end if

pgs_set_key_val(MONOLEGATOv, 1, $Glide)
pgs_set_key_val(UNICHECK, 0, $Unison)
pgs_set_key_val(MONOLEGATOv, 2, $Voices)
pgs_set_key_val(MONOLEGATOv, 3, $Detune)

pgs_set_key_val(MONOLEGATOv, 4, 1)

pgs_set_key_val(INITa, 0, 1)

declare $cicciput := -5

end on

function closearp
select ($ActiveArpPage)
case 1
$count := 0
while ($count < 16)
set_control_par(%rhythm_sld_ids[$count],$CONTROL_PAR_HIDE,
$HIDE_WHOLE_CONTROL)
inc($count)
end while
$count := 0
while ($count < 16)
set_control_par(%duration_sld_ids[$count],$CONTROL_PAR_HIDE,
$HIDE_PART_NOTHING)
inc($count)
end while

set_control_par(%arp[0],$CONTROL_PAR_HIDE,$HIDE_PART_NOTHING)
set_control_par(%arp[2],$CONTROL_PAR_HIDE,$HIDE_PART_NOTHING)
set_control_par(%arp[1],$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL)
set_control_par(%arp[3],$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL)

case 2
$count := 0
while ($count < 16)
set_control_par(%rhythm_sld_ids[$count],$CONTROL_PAR_HIDE,
$HIDE_PART_NOTHING)
inc($count)
end while
$count := 0
while ($count < 16)
set_control_par(%duration_sld_ids[$count],$CONTROL_PAR_HIDE,
$HIDE_WHOLE_CONTROL)
inc($count)
end while

set_control_par(%arp[1],$CONTROL_PAR_HIDE,$HIDE_PART_NOTHING)
set_control_par(%arp[3],$CONTROL_PAR_HIDE,$HIDE_PART_NOTHING)
set_control_par(%arp[0],$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL)
set_control_par(%arp[2],$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL)
end select

end function

function closetabs

$Tab1 := 0
$Tab2 := 0
$Tab3 := 0
$Tab4 := 0

set_skin_offset($SkinOffset*($ActiveTab-1))

$count := 0
while ($count < 19)
set_control_par(%main[$count],$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL)
inc($count)
end while
$count := 0
while ($count < 19)
set_control_par(%main2[$count],$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL)
inc($count)
end while
$count := 0
while ($count < 7)
set_control_par(%tfx[$count],$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL)
inc($count)
end while
$count := 0
while ($count < 40)
set_control_par(%arp[$count],$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL)
inc($count)
end while
$count := 0
while ($count < 16)
set_control_par(%arp_pitch_ids[$count],$CONTROL_PAR_HIDE,
$HIDE_WHOLE_CONTROL)
inc($count)
end while

$count := 0
while ($count < 16)
set_control_par(%led_lbl_ids[$count],$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL)
inc($count)
end while

$count := 0
while ($count < 16)
set_control_par(%rhythm_sld_ids[$count],$CONTROL_PAR_HIDE,
$HIDE_WHOLE_CONTROL)
inc($count)
end while
$count := 0
while ($count < 16)
set_control_par(%duration_sld_ids[$count],$CONTROL_PAR_HIDE,
$HIDE_WHOLE_CONTROL)
inc($count)
end while

select ($ActiveTab)
case 1
$tab1 := 1
$count := 0
while ($count < 19)
set_control_par(%main[$count],$CONTROL_PAR_HIDE,$HIDE_PART_NOTHING)
inc($count)
end while
case 2
$tab2 := 1
$count := 0
while ($count < 19)
set_control_par(%main2[$count],$CONTROL_PAR_HIDE,
$HIDE_PART_NOTHING)
inc($count)
end while

case 3
$tab3 := 1
$count := 0
while ($count < 40)
set_control_par(%arp[$count],$CONTROL_PAR_HIDE,$HIDE_PART_NOTHING)
inc($count)
end while
$count := 0
while ($count < 16)
set_control_par(%arp_pitch_ids[$count],$CONTROL_PAR_HIDE,
$HIDE_PART_NOTHING)
inc($count)
end while
$count := 0
while ($count < 16)
set_control_par(%led_lbl_ids[$count],$CONTROL_PAR_HIDE,
$HIDE_PART_NOTHING)
inc($count)
end while
$count := 0
while ($count < 16)
set_control_par(%rhythm_sld_ids[$count],$CONTROL_PAR_HIDE,
$HIDE_PART_NOTHING)
inc($count)
end while
call closearp
case 4
$count := 0
while ($count < 7)
set_control_par(%tfx[$count],$CONTROL_PAR_HIDE,$HIDE_PART_NOTHING)
inc($count)
end while

end select
message ("")

end function

on ui_control($Tab1)
$ActiveTab := 1
call closetabs
end on

on ui_control($Tab2)
$ActiveTab := 2
call closetabs
end on

on ui_control($Tab3)
$ActiveTab := 3
call closetabs
end on

on ui_control($Tab4)
$ActiveTab := 4
call closetabs
end on

function ANIM
if ($ii > 64)
$ii := 0
end if
while ($ANIMplay > 0)
wait(25000)
set_control_par(get_ui_id($Anim),$CONTROL_PAR_PICTURE_STATE,$ii)
inc($ii)
if ($ii > 64)
$ii := 0
end if
message($ii)
end while

end function

function ANIM2
while ($cicciput < 80)
wait(25000)
set_control_par(get_ui_id($Anim2),$CONTROL_PAR_PICTURE_STATE,$cicciput)
inc($cicciput)
wait(1000000)
end while

end function

on note

if ($EVENT_NOTE < 35)


select ($EVENT_NOTE)
case 24
if ($tfx1 = 0)
$i := 0
while ($i < $NUM_GROUPS)

set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,1000000,$i,1,0)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,0,$i,2,0)
inc ($i)
end while
set_key_color(24,$KEY_COLOR_GREEN)
$tfx1 := 1
else
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,0,$i,1,0)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,$i,2,0)
inc ($i)
end while
set_key_color(24,$KEY_COLOR_RED)
$tfx1 := 0
end if

case 25
if ($tfx2 = 0)
$tfx2 := 1
else
$tfx2 := 0
end if

if ($tfx2 = 1)
$PitchSwitch := 0
set_key_color(25,$KEY_COLOR_GREEN)
else
$PitchSwitch := 1
set_key_color(25,$KEY_COLOR_RED)
end if

if ($PitchSwitch = 0)
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,0,$i,0,0)
inc ($i)
end while
else
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,1000000,$i,0,0)
inc ($i)
end while
end if
case 26
if ($tfx3 = 0)
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,0,$i,3,0)
inc ($i)
end while
set_key_color(26,$KEY_COLOR_GREEN)
$tfx3 := 1
else
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,$i,3,0)
inc ($i)
end while
set_key_color(26,$KEY_COLOR_RED)
$tfx3 := 0
end if
case 27
if ($tfx4 = 0)
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,0,$i,4,0)
inc ($i)
end while
set_key_color(27,$KEY_COLOR_GREEN)
$tfx4 := 1
else
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,$i,4,0)
inc ($i)
end while
set_key_color(27,$KEY_COLOR_RED)
$tfx4 := 0
end if
case 28
if ($tfx5 = 0)
$i := 0
while ($i < $NUM_GROUPS)

set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,1000000,$i,5,0)
inc ($i)
end while
set_key_color(28,$KEY_COLOR_GREEN)
$tfx5 := 1
else
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,0,$i,5,0)
inc ($i)
end while
set_key_color(28,$KEY_COLOR_RED)
$tfx5 := 0
end if
case 29
if ($tfx6 = 0)
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,0,$i,6,0)
inc ($i)
end while
set_key_color(30,$KEY_COLOR_GREEN)
$tfx6 := 1
else
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,$i,6,0)
inc ($i)
end while
set_key_color(30,$KEY_COLOR_RED)
$tfx6 := 0
end if
case 30
if ($tfx7 = 0)
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,0,$i,5,0)
inc ($i)
end while
set_key_color(29,$KEY_COLOR_GREEN)
$tfx7 := 1
else
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,$i,5,0)
inc ($i)
end while
set_key_color(29,$KEY_COLOR_RED)
$tfx7 := 0
end if
end select
exit
end if

if ($latch_mode = 0)
exit
end if
%velo[$EVENT_NOTE] := $EVENT_VELOCITY
{only one event per Note}
set_event_par($EVENT_ID,0,2)
ignore_event($EVENT_ID)
if (%pressed_id[$EVENT_NOTE] > 0)
exit
else
%pressed_id[$EVENT_NOTE] := $EVENT_ID
end if
{which notes should be in the buffer}
select ($latch_mode)
case 1
%note_buffer[$cursor] := $EVENT_NOTE
inc($cursor)
case 2
if ($ENGINE_UPTIME - $old_latch_time > $LATCH_TIME)
$a := 0
while($a < $cursor)
%note_buffer[$a] := 0
inc($a)
end while
$cursor := 0
end if
%note_buffer[$cursor] := $EVENT_NOTE
inc($cursor)
$old_latch_time := $ENGINE_UPTIME
end select
if ($cursor < 2 and $check_id = 0)
$check_id := $EVENT_ID
$aa := 0
$act_step := 0
$oct_cursor := 0
$last_order := -1
$swing_cursor := 0
wait($REC_TIME*1)
while($cursor > 0)

$played_pitch := %arp_pitch[$act_step]
{$duration := %duration[$act_step]*2000
if ($duration < 20000)
$duration := 20000
end if}
select ($Sync_knob2)
case 0
$duration:= $DURATION_SIXTEENTH/8
case 1
$duration:= $DURATION_SIXTEENTH/4
case 2
$duration:= $DURATION_SIXTEENTH/2
case 3
$duration:= $DURATION_QUARTER/6
case 4
$duration:= $DURATION_SIXTEENTH
case 5
$duration:= $DURATION_QUARTER/3
case 6
$duration:= $DURATION_EIGHTH
case 7
$duration:= $DURATION_QUARTER*2/3
case 8
$duration:= $DURATION_QUARTER
case 9
$duration:= $DURATION_QUARTER*4/3
case 10
$duration:= $DURATION_QUARTER*2
case 11
$duration:= $DURATION_QUARTER*3
case 12
$duration:= $DURATION_BAR
end select

if ($act_step = 0)
$i := $act_step
while ($i < 16)
set_control_par(%led_lbl_ids[$i],$CONTROL_PAR_PICTURE_STATE,0)
inc($i)
end while
set_control_par(%led_lbl_ids[$act_step],$CONTROL_PAR_PICTURE_STATE,1)
else
set_control_par(%led_lbl_ids[$act_step-1],$CONTROL_PAR_PICTURE_STATE,0)
set_control_par(%led_lbl_ids[$act_step],$CONTROL_PAR_PICTURE_STATE,1)
end if

$a := 0
while($a < 128)
if ($a < $cursor)
%ordered[$a] := %note_buffer[$a]
else
%ordered[$a] := 0
%note_buffer[$a] := 0
end if
inc($a)
end while
$min_note := %ordered[$cursor-1]
$max_note := %ordered[0]
sort(%ordered,1)
select ($note_order)
case 1
$loop_cursor := $cursor
$a := 0
while($a < $cursor)
%loop_buffer[$a] := %note_buffer[$a]
inc($a)
end while
case 2 {up }
$loop_cursor := $cursor
$a := 0
while($a < $cursor )
%loop_buffer[$a] := %ordered[$cursor - 1 - $a]
inc($a)
end while
case 3 {down }
$loop_cursor := $cursor
$a := 0
while($a < $cursor )
%loop_buffer[$a] := %ordered[$a]
inc($a)
end while
case 4 {up_down }
$loop_cursor := $cursor
$a := 0
while($a < $cursor )
%loop_buffer[$a] := %ordered[$cursor -1 - $a]
inc($a)
end while
if ($cursor > 2)
select ($repeat)
case 1
$loop_cursor := ($cursor*2)-2
$a := 0
while($a < $cursor-2 )
%loop_buffer[$a+$cursor] :=
%ordered[$a+1]
inc($a)
end while
case 2
$loop_cursor := ($cursor*2)-1
$a := 0
while($a < $cursor-1 )
%loop_buffer[$a+$cursor] :=
%ordered[$a]
inc($a)
end while
case 3
$loop_cursor := ($cursor*2)-1
$a := 0
while($a < $cursor-1 )
%loop_buffer[$a+$cursor] :=
%ordered[$a+1]
inc($a)
end while
case 5
$loop_cursor := ($cursor*2)
$a := 0
while($a < $cursor )
%loop_buffer[$a+$cursor] :=
%ordered[$a]
inc($a)
end while
end select
end if
case 5 {down_up }
$loop_cursor := $cursor
$a := 0
while($a < $cursor )
%loop_buffer[$a] := %ordered[$a]
inc($a)
end while
if ($cursor > 2)
select ($repeat)
case 1
$loop_cursor := ($cursor*2)-2
$a := 0
while($a < $cursor-2 )
%loop_buffer[$a+$cursor] :=
%ordered[$cursor -2- $a]
inc($a)
end while
case 3
$loop_cursor := ($cursor*2)-1
$a := 0
while($a < $cursor-1 )
%loop_buffer[$a+$cursor] :=
%ordered[$cursor -1 - $a]
inc($a)
end while
case 2
$loop_cursor := ($cursor*2)-1
$a := 0
while($a < $cursor-1 )
%loop_buffer[$a+$cursor] :=
%ordered[$cursor -2- $a]
inc($a)
end while
case 5
$loop_cursor := ($cursor*2)
$a := 0
while($a < $cursor )
%loop_buffer[$a+$cursor] :=
%ordered[$cursor -1- $a]
inc($a)
end while
end select
end if
case 14
$loop_cursor := 1
%loop_buffer[$aa+1] := %ordered[random(0,$cursor-1)]
%loop_buffer[0] := %ordered[random(0,$cursor-1)]
case 16
$loop_cursor := $cursor
$a := 0
while($a < $cursor )
%loop_buffer[$a] := %note_buffer[$a]
inc($a)
end while
end select
$last_order := $note_order
select ($Sync_knob)
case 0
$step_length := $DURATION_SIXTEENTH/8
case 1
$step_length := $DURATION_SIXTEENTH/4
case 2
$step_length := $DURATION_SIXTEENTH/2
case 3
$step_length := $DURATION_QUARTER/6
case 4
$step_length := $DURATION_SIXTEENTH
case 5
$step_length := $DURATION_QUARTER/3
case 6
$step_length := $DURATION_EIGHTH
case 7
$step_length := $DURATION_QUARTER*2/3
case 8
$step_length := $DURATION_QUARTER
case 9
$step_length := $DURATION_QUARTER*4/3
case 10
$step_length := $DURATION_QUARTER*2
case 11
$step_length := $DURATION_QUARTER*3
case 12
$step_length := $DURATION_BAR
end select
if ($swing_cursor mod 2 = 0)
$step_length := $step_length + ($step_length*$Swing)/100
else
$step_length := $step_length + ($step_length*(-$Swing))/100

end if
inc($swing_cursor)

if ($step_length < 5000)


$step_length := 5000
end if
$velo := 100
if (%rhythm[$act_step] # 0)
if ($loop_cursor # 0)
if ($note_order = 16)
$a := 0
while($a < $loop_cursor)
$note := %loop_buffer[$a] +
$oct_cursor*12
$velo := %velo[%loop_buffer[$a]]
if ($strike_count > 0)
$velo := ($velo * $Str_vel)/100
end if
if ($velo_button = 1)
$velo := 127
end if
$velo := ($velo * %rhythm[$act_step])/100
if ($velo > 127)
$velo := 127
end if
if ($velo < 1)
$velo := 1
end if
if ($note > 0 and $note < 128)
play_note($note+$played_pitch,
$velo,0,$duration)
end if
inc($a)
end while
if ($strike_count >= $strike-1)
$aa := $loop_cursor
end if
else
$note := %loop_buffer[$aa] + $oct_cursor*12
$velo := %velo[%loop_buffer[$aa]]
if ($strike_count > 0)
$velo := ($velo * $Str_vel)/100
end if
if ($velo_button = 1)
$velo := 127
end if
$velo := ($velo * %rhythm[$act_step])/100
if ($velo > 127)
$velo := 127
end if
if ($velo < 1)
$velo := 1
end if
if ($note > 0 and $note < 128)
play_note($note+$played_pitch,
$velo,0,$duration)
end if
end if
end if
if ($strike_count < $strike-1)
dec($aa)
dec($act_step)
inc($strike_count)
else
$strike_count := 0
end if
else
if ($strike_count < $strike-1)
dec($act_step)
inc($strike_count)
else
$strike_count := 0
end if
dec($aa)
end if
inc($aa)
if ($aa >= $loop_cursor)
$aa := 0
if ($octave > 0 )
inc($oct_cursor)
if ($oct_cursor > $Octave)
$oct_cursor := 0
end if
end if
if ($octave < 0 )
dec($oct_cursor)
if ($oct_cursor < $Octave)
$oct_cursor := 0
end if
end if
end if

inc($act_step)
if ($act_step >= $steps)
$act_step := 0
end if

wait($step_length)

end while
$check_id := 0

end if
end on

on release
if ($PLAYED_VOICES_INST = 0)
$ANIMplay := 0
end if
{only one event per Note}
if (%EVENT_PAR[0] = 2)
{ignore_event($EVENT_ID)}
if (%pressed_id[$EVENT_NOTE] = 0)
exit
else
%pressed_id[$EVENT_NOTE] := 0
end if
else
exit
end if
if ($latch_mode = 0)
exit
end if
{which notes should be in the buffer}
select ($latch_mode)
case 1
$a := 0
$b := $cursor
$cursor := 0
while($a < $b)
if ($EVENT_NOTE # %note_buffer[$a])
%note_buffer[$cursor] := %note_buffer[$a]
inc($cursor)
end if
inc($a)
end while
case 2 to 3
exit
end select
end on

on ui_control ($Sync_knob)
set_knob_label ($Sync_knob,!tempo_names[$Sync_knob])
end on

on ui_control ($note_order)
if ($note_order # 99)
$last_note_order := $note_order
else
$note_order:= $last_note_order
end if
end on

on ui_control ($rate_knob)
$sync_knob := ($Rate_knob * 18) /1000001
set_knob_label ($Rate_knob,!tempo_names[$sync_knob])
end on
{END OF SCRIPT}

on ui_control ($ClearVel)
$ii := 0
while ($ii < 16)
while (%rhythm[$ii] > 0)
dec(%rhythm[$ii])
set_control_par(%rhythm_sld_ids[$ii],$CONTROL_PAR_VALUE,%rhythm[$ii])
wait (100)
end while
inc ($ii)
end while
wait (100000)
$ClearVel := 0
message ("")
end on

on ui_control ($InitVel)
$ii := 0
while ($ii < 16)
while (%rhythm[$ii] < 127)
inc(%rhythm[$ii])
set_control_par(%rhythm_sld_ids[$ii],$CONTROL_PAR_VALUE,%rhythm[$ii])
wait (100)
end while
inc ($ii)
end while
wait (50000)
$InitVel := 0
message ("")
end on

on ui_control ($ClearPitch)
$i := 0
while ($i < 16)
while (%arp_pitch[$i] > 0)
dec(%arp_pitch[$i])
set_control_par(%arp_pitch_ids[$i],$CONTROL_PAR_VALUE,%arp_pitch[$i])
wait (1500)
end while
while (%arp_pitch[$i] < 0)
inc(%arp_pitch[$i])
set_control_par(%arp_pitch_ids[$i],$CONTROL_PAR_VALUE,%arp_pitch[$i])
wait (1500)
end while
set_control_par(%arp_pitch_ids[$i],$CONTROL_PAR_VALUE,0)
inc ($i)
end while

wait (200000)
$ClearPitch := 0
message ("")
end on

on ui_control ($ARPmode)

$latch_mode := $ARPmode

select ($latch_mode)
case 0
$a := 0
while($a < $cursor)
%note_buffer[$a] := 0
inc($a)
end while
$cursor := 0
case 1
$b := $cursor
$cursor := 0
$a := 0
while($a < $b)
if (%pressed_id[%note_buffer[$a]] > 0)
%note_buffer[$cursor] := %note_buffer[$a]
inc($cursor)
end if
inc($a)
end while
end select
end on

on ui_control ($ARPrate)
$Sync_knob := ($ARPrate * -1)

end on

on ui_control ($ARPorder)
if ($ARPorder = 99)
$ARPorder := 1
end if
$note_order := $ARPorder

$orderArpI := search(%orderArp,$ARPorder)
end on

on ui_control ($ARPoctave)
$Octave := $ARPoctave

end on

{------------------------}

on ui_control ($arp_rhythm_0_sld)
if (get_control_par(get_ui_id($arp_rhythm_0_sld),$CONTROL_PAR_KEY_ALT) = 1)
%rhythm[0] := 127
$arp_rhythm_0_sld := 127
else
%rhythm[0] := $arp_rhythm_0_sld
end if
end on

on ui_control ($arp_rhythm_1_sld)
if (get_control_par(get_ui_id($arp_rhythm_1_sld),$CONTROL_PAR_KEY_ALT) = 1)
%rhythm[1] := 127
$arp_rhythm_1_sld := 127
else
%rhythm[1] := $arp_rhythm_1_sld
end if
end on

on ui_control ($arp_rhythm_2_sld)
if (get_control_par(get_ui_id($arp_rhythm_2_sld),$CONTROL_PAR_KEY_ALT) = 1)
%rhythm[2] := 127
$arp_rhythm_2_sld := 127
else
%rhythm[2] := $arp_rhythm_2_sld
end if
end on

on ui_control ($arp_rhythm_3_sld)
if (get_control_par(get_ui_id($arp_rhythm_3_sld),$CONTROL_PAR_KEY_ALT) = 1)
%rhythm[3] := 127
$arp_rhythm_3_sld := 127
else
%rhythm[3] := $arp_rhythm_3_sld
end if
end on

on ui_control ($arp_rhythm_4_sld)
if (get_control_par(get_ui_id($arp_rhythm_4_sld),$CONTROL_PAR_KEY_ALT) = 1)
%rhythm[4] := 127
$arp_rhythm_4_sld := 127
else
%rhythm[4] := $arp_rhythm_4_sld
end if
end on

on ui_control ($arp_rhythm_5_sld)
if (get_control_par(get_ui_id($arp_rhythm_5_sld),$CONTROL_PAR_KEY_ALT) = 1)
%rhythm[5] := 127
$arp_rhythm_5_sld := 127
else
%rhythm[5] := $arp_rhythm_5_sld
end if
end on

on ui_control ($arp_rhythm_6_sld)
if (get_control_par(get_ui_id($arp_rhythm_6_sld),$CONTROL_PAR_KEY_ALT) = 1)
%rhythm[6] := 127
$arp_rhythm_6_sld := 127
else
%rhythm[6] := $arp_rhythm_6_sld
end if
end on

on ui_control ($arp_rhythm_7_sld)
if (get_control_par(get_ui_id($arp_rhythm_7_sld),$CONTROL_PAR_KEY_ALT) = 1)
%rhythm[7] := 127
$arp_rhythm_7_sld := 127
else
%rhythm[7] := $arp_rhythm_7_sld
end if
end on

on ui_control ($arp_rhythm_8_sld)
if (get_control_par(get_ui_id($arp_rhythm_8_sld),$CONTROL_PAR_KEY_ALT) = 1)
%rhythm[8] := 127
$arp_rhythm_8_sld := 127
else
%rhythm[8] := $arp_rhythm_8_sld
end if
end on

on ui_control ($arp_rhythm_9_sld)
if (get_control_par(get_ui_id($arp_rhythm_9_sld),$CONTROL_PAR_KEY_ALT) = 1)
%rhythm[9] := 127
$arp_rhythm_9_sld := 127
else
%rhythm[9] := $arp_rhythm_9_sld
end if
end on

on ui_control ($arp_rhythm_10_sld)
if (get_control_par(get_ui_id($arp_rhythm_10_sld),$CONTROL_PAR_KEY_ALT) = 1)
%rhythm[10] := 127
$arp_rhythm_10_sld := 127
else
%rhythm[10] := $arp_rhythm_10_sld
end if
end on

on ui_control ($arp_rhythm_11_sld)
if (get_control_par(get_ui_id($arp_rhythm_11_sld),$CONTROL_PAR_KEY_ALT) = 1)
%rhythm[11] := 127
$arp_rhythm_11_sld := 127
else
%rhythm[11] := $arp_rhythm_11_sld
end if
end on

on ui_control ($arp_rhythm_12_sld)
if (get_control_par(get_ui_id($arp_rhythm_12_sld),$CONTROL_PAR_KEY_ALT) = 1)
%rhythm[12] := 127
$arp_rhythm_12_sld := 127
else
%rhythm[12] := $arp_rhythm_12_sld
end if
end on

on ui_control ($arp_rhythm_13_sld)
if (get_control_par(get_ui_id($arp_rhythm_13_sld),$CONTROL_PAR_KEY_ALT) = 1)
%rhythm[13] := 127
$arp_rhythm_13_sld := 127
else
%rhythm[13] := $arp_rhythm_13_sld
end if
end on

on ui_control ($arp_rhythm_14_sld)
if (get_control_par(get_ui_id($arp_rhythm_14_sld),$CONTROL_PAR_KEY_ALT) = 1)
%rhythm[14] := 127
$arp_rhythm_14_sld := 127
else
%rhythm[14] := $arp_rhythm_14_sld
end if
end on

on ui_control ($arp_rhythm_15_sld)
if (get_control_par(get_ui_id($arp_rhythm_15_sld),$CONTROL_PAR_KEY_ALT) = 1)
%rhythm[15] := 127
$arp_rhythm_15_sld := 127
else
%rhythm[15] := $arp_rhythm_15_sld
end if
end on

on ui_control ($arp_duration_0_sld)
if (get_control_par(get_ui_id($arp_duration_0_sld),$CONTROL_PAR_KEY_ALT) = 1)
%duration[0] := 127
$arp_duration_0_sld := 127
else
%duration[0] := $arp_duration_0_sld
end if
end on

on ui_control ($arp_duration_1_sld)
if (get_control_par(get_ui_id($arp_duration_1_sld),$CONTROL_PAR_KEY_ALT) = 1)
%duration[1] := 127
$arp_duration_1_sld := 127
else
%duration[1] := $arp_duration_1_sld
end if
end on

on ui_control ($arp_duration_2_sld)
if (get_control_par(get_ui_id($arp_duration_2_sld),$CONTROL_PAR_KEY_ALT) = 1)
%duration[2] := 127
$arp_duration_2_sld := 127
else
%duration[2] := $arp_duration_2_sld
end if
end on

on ui_control ($arp_duration_3_sld)
if (get_control_par(get_ui_id($arp_duration_3_sld),$CONTROL_PAR_KEY_ALT) = 1)
%duration[3] := 127
$arp_duration_3_sld := 127
else
%duration[3] := $arp_duration_3_sld
end if
end on

on ui_control ($arp_duration_4_sld)
if (get_control_par(get_ui_id($arp_duration_4_sld),$CONTROL_PAR_KEY_ALT) = 1)
%duration[4] := 127
$arp_duration_4_sld := 127
else
%duration[4] := $arp_duration_4_sld
end if
end on

on ui_control ($arp_duration_5_sld)
if (get_control_par(get_ui_id($arp_duration_5_sld),$CONTROL_PAR_KEY_ALT) = 1)
%duration[5] := 127
$arp_duration_5_sld := 127
else
%duration[5] := $arp_duration_5_sld
end if
end on

on ui_control ($arp_duration_6_sld)
if (get_control_par(get_ui_id($arp_duration_6_sld),$CONTROL_PAR_KEY_ALT) = 1)
%duration[6] := 127
$arp_duration_6_sld := 127
else
%duration[6] := $arp_duration_6_sld
end if
end on

on ui_control ($arp_duration_7_sld)
if (get_control_par(get_ui_id($arp_duration_7_sld),$CONTROL_PAR_KEY_ALT) = 1)
%duration[7] := 127
$arp_duration_7_sld := 127
else
%duration[7] := $arp_duration_7_sld
end if
end on

on ui_control ($arp_duration_8_sld)
if (get_control_par(get_ui_id($arp_duration_8_sld),$CONTROL_PAR_KEY_ALT) = 1)
%duration[8] := 127
$arp_duration_8_sld := 127
else
%duration[8] := $arp_duration_8_sld
end if
end on

on ui_control ($arp_duration_9_sld)
if (get_control_par(get_ui_id($arp_duration_9_sld),$CONTROL_PAR_KEY_ALT) = 1)
%duration[9] := 127
$arp_duration_9_sld := 127
else
%duration[9] := $arp_duration_9_sld
end if
end on

on ui_control ($arp_duration_10_sld)
if (get_control_par(get_ui_id($arp_duration_10_sld),$CONTROL_PAR_KEY_ALT) =
1)
%duration[10] := 127
$arp_duration_10_sld := 127
else
%duration[10] := $arp_duration_10_sld
end if
end on

on ui_control ($arp_duration_11_sld)
if (get_control_par(get_ui_id($arp_duration_11_sld),$CONTROL_PAR_KEY_ALT) =
1)
%duration[11] := 127
$arp_duration_11_sld := 127
else
%duration[11] := $arp_duration_11_sld
end if
end on

on ui_control ($arp_duration_12_sld)
if (get_control_par(get_ui_id($arp_duration_12_sld),$CONTROL_PAR_KEY_ALT) =
1)
%duration[12] := 127
$arp_duration_12_sld := 127
else
%duration[12] := $arp_duration_12_sld
end if
end on

on ui_control ($arp_duration_13_sld)
if (get_control_par(get_ui_id($arp_duration_13_sld),$CONTROL_PAR_KEY_ALT) =
1)
%duration[13] := 127
$arp_duration_13_sld := 127
else
%duration[13] := $arp_duration_13_sld
end if
end on

on ui_control ($arp_duration_14_sld)
if (get_control_par(get_ui_id($arp_duration_14_sld),$CONTROL_PAR_KEY_ALT) =
1)
%duration[14] := 127
$arp_duration_14_sld := 127
else
%duration[14] := $arp_duration_14_sld
end if
end on

on ui_control ($arp_duration_15_sld)
if (get_control_par(get_ui_id($arp_duration_15_sld),$CONTROL_PAR_KEY_ALT) =
1)
%duration[15] := 127
$arp_duration_15_sld := 127
else
%duration[15] := $arp_duration_15_sld
end if
end on

on ui_control ($arp_pitch0)
%arp_pitch[0] := $arp_pitch0
end on
on ui_control ($arp_pitch1)
%arp_pitch[1] := $arp_pitch1
end on
on ui_control ($arp_pitch2)
%arp_pitch[2] := $arp_pitch2
end on
on ui_control ($arp_pitch3)
%arp_pitch[3] := $arp_pitch3
end on
on ui_control ($arp_pitch4)
%arp_pitch[4] := $arp_pitch4
end on
on ui_control ($arp_pitch5)
%arp_pitch[5] := $arp_pitch5
end on
on ui_control ($arp_pitch6)
%arp_pitch[6] := $arp_pitch6
end on
on ui_control ($arp_pitch7)
%arp_pitch[7] := $arp_pitch7
end on
on ui_control ($arp_pitch8)
%arp_pitch[8] := $arp_pitch8
end on
on ui_control ($arp_pitch9)
%arp_pitch[9] := $arp_pitch9
end on
on ui_control ($arp_pitch10)
%arp_pitch[10] := $arp_pitch10
end on
on ui_control ($arp_pitch11)
%arp_pitch[11] := $arp_pitch11
end on
on ui_control ($arp_pitch12)
%arp_pitch[12] := $arp_pitch12
end on
on ui_control ($arp_pitch13)
%arp_pitch[13] := $arp_pitch13
end on
on ui_control ($arp_pitch14)
%arp_pitch[14] := $arp_pitch14
end on
on ui_control ($arp_pitch15)
%arp_pitch[15] := $arp_pitch15
end on

on ui_control($ARPgateS)

$ARPgate := abs($ARPgateS - 12)


$Sync_knob2 := ($ARPgate)
set_text($status,!tempo_names[$ARPgate])
end on

on ui_control($ARPrateS)

$ARPrate := abs($ARPrateS - 12)


$Sync_knob := ($ARPrate)
set_text($status,!tempo_names[$ARPrate])
end on

on ui_control($ARPgate)

$ARPgateS := abs($ARPgate - 12)


$Sync_knob2 := ($ARPgate)

end on

on ui_control($ARPrate)

$ARPrateS := abs($ARPrate - 12)


$Sync_knob := ($ARPrate)

end on

on ui_control ($EQlo)
set_engine_par($ENGINE_PAR_SEQ_LF_GAIN,$EQlo,-1,5,-1)
set_text($status,$EQlo/10000&"%")
end on
on ui_control ($EQlomid)
set_engine_par($ENGINE_PAR_SEQ_LMF_GAIN,$EQlomid,-1,5,-1)
set_text($status,$EQlomid/10000&"%")
end on

on ui_control ($EQhimid)
set_engine_par($ENGINE_PAR_SEQ_HMF_GAIN,$EQhimid,-1,5,-1)
set_text($status,$EQhimid/10000&"%")
end on

on ui_control ($EQhi)
set_engine_par($ENGINE_PAR_SEQ_HF_GAIN,$EQhi,-1,5,-1)
set_text($status,$EQhi/10000&"%")
end on

on ui_control ($Mono)
if ($Mono = 0)
pgs_set_key_val(MONOLEGATOv, 0, 0)
else
pgs_set_key_val(MONOLEGATOv, 0, 1+$Legato)
end if
end on

on ui_control ($Legato)
if ($Mono = 1)
pgs_set_key_val(MONOLEGATOv, 0, 0)
else
pgs_set_key_val(MONOLEGATOv, 0, 1+$Legato)
end if
end on

on ui_control ($Glide)
pgs_set_key_val(MONOLEGATOv, 1, $Glide)
end on

on ui_control ($attack)
message ("")
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_ATTACK,$attack,$i,8,-1)
inc ($i)
end while
set_text($status,$attack/10000&"%")
end on

on ui_control ($decay)
message ("")
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_DECAY,$decay,$i,8,-1)
inc ($i)
end while
set_text($status,$decay/10000&"%")
end on

on ui_control ($sustain)
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_SUSTAIN,$sustain,$i,8,-1)
inc ($i)
end while
set_text($status,$sustain/10000&"%")
end on

on ui_control ($release)
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_RELEASE,$release,$i,8,-1)
inc ($i)
end while
set_text($status,$release/10000&"%")
end on

{FILTERS}

on ui_control($LPFilterCutoff)
set_engine_par($ENGINE_PAR_CUTOFF,$LPFilterCutoff,0,0,1)
set_text($status,$LPFilterCutoff/10000&"%")
end on

on ui_control($LPFilterResonance)
set_engine_par($ENGINE_PAR_RESONANCE,$LPFilterResonance,0,0,1)
set_text($status,$LPFilterResonance/10000&"%")
end on

on ui_control($HPFilterCutoff)
set_engine_par($ENGINE_PAR_CUTOFF,$HPFilterCutoff,0,1,1)
set_text($status,$HPFilterCutoff/10000&"%")
end on

on ui_control($HPFilterResonance)
set_engine_par($ENGINE_PAR_RESONANCE,$HPFilterResonance,0,1,1)
set_text($status,$HPFilterResonance/10000&"%")
end on

on ui_control ($Chorus)
select ($Chorus)
case 0
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,-1,2,-1)
case 1 to 1000000
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,0,-1,2,-1)
set_engine_par ($ENGINE_PAR_INSERT_EFFECT_OUTPUT_GAIN,$Chorus,-1,2,1)
end select
set_text($status,$Chorus/3970&"%")

end on

on ui_control ($Phaser)
select ($Phaser)
case 0
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,-1,0,-1)
case 1 to 1000000
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,0,-1,0,-1)
set_engine_par ($ENGINE_PAR_INSERT_EFFECT_OUTPUT_GAIN,$Phaser,-1,0,1)
end select
set_text($status,$Phaser/3970&"%")
end on

on ui_control ($Dist)
select ($Dist)
case 0
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,-1,1,-1)
case 1 to 1000000
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,0,-1,1,-1)
set_engine_par ($ENGINE_PAR_DRIVE,$Dist,-1,1,1)
end select
set_text($status,$Dist/3970&"%")
end on

on ui_control ($Reverb)
select ($Reverb)
case 0
set_engine_par($ENGINE_PAR_SEND_EFFECT_BYPASS,1,-1,0,0)
case 1 to 1000000
set_engine_par($ENGINE_PAR_SEND_EFFECT_BYPASS,0,-1,0,0)
set_engine_par($ENGINE_PAR_SENDLEVEL_0,$Reverb,-1,7,0)
end select
set_text($status,$Reverb/3970&"%")
end on

on ui_control ($Delay)
select ($Delay)
case 0
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,-1,3,-1)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,-1,4,-1)
case 1 to 1000000
select ($DelaySync)
case 0
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,0,-1,3,-1)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,-1,4,-1)
case 1
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,-1,3,-1)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,0,-1,4,-1)
end select
set_engine_par ($ENGINE_PAR_INSERT_EFFECT_OUTPUT_GAIN,$Delay,-1,3,1)
set_engine_par ($ENGINE_PAR_INSERT_EFFECT_OUTPUT_GAIN,$Delay,-1,4,1)
end select
set_text($status,$Delay/3970&"%")
end on

on ui_control ($DelaySync)
select ($DelaySync)
case 0
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,0,-1,3,-1)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,-1,4,-1)
case 1
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,-1,3,-1)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,0,-1,4,-1)
end select

end on

on ui_control ($Tremolo)
set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,$Tremolo,0,4,0)
set_text($status,$Tremolo/10000&"%")
end on

on ui_control ($PitchAttack)
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_ATTACK,$PitchAttack,$i,0,0)
inc ($i)
end while
if ($PitchRel = 0)
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_SUSTAIN,1000000,$i,0,0)
inc ($i)
end while
else
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_SUSTAIN,0,$i,0,0)
inc ($i)
end while
end if
set_text($status,$PitchAttack/10000&"%")
end on

on ui_control ($PitchRel)
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_DECAY,$PitchRel,$i,0,0)
inc ($i)
end while
if ($PitchRel = 0)
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_SUSTAIN,1000000,$i,0,0)
inc ($i)
end while
else
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_SUSTAIN,0,$i,0,0)
inc ($i)
end while
end if
set_text($status,$PitchRel/10000&"%")
end on

on ui_control($tfx1)
if ($tfx1 = 1)
$i := 0
while ($i < $NUM_GROUPS)

set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,1000000,$i,1,0)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,0,$i,2,0)
inc ($i)
end while
set_key_color(24,$KEY_COLOR_GREEN)
else
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,0,$i,1,0)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,$i,2,0)
inc ($i)
end while
set_key_color(24,$KEY_COLOR_RED)
end if
end on

on ui_control($tfx2)
if ($tfx2 = 1)
$PitchSwitch := 1
set_key_color(25,$KEY_COLOR_GREEN)
else
$PitchSwitch := 0
set_key_color(25,$KEY_COLOR_RED)
end if

if ($PitchSwitch = 0)
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,0,$i,0,0)
inc ($i)
end while
else
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,1000000,$i,0,0)
inc ($i)
end while
end if
end on

on ui_control($tfx3)
if ($tfx3 = 1)
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,0,$i,3,0)
inc ($i)
end while
set_key_color(26,$KEY_COLOR_GREEN)
else
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,$i,3,0)
inc ($i)
end while
set_key_color(26,$KEY_COLOR_RED)
end if
end on

on ui_control($tfx4)
if ($tfx4 = 1)
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,0,$i,4,0)
inc ($i)
end while
set_key_color(27,$KEY_COLOR_GREEN)
else
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,$i,4,0)
inc ($i)
end while
set_key_color(27,$KEY_COLOR_RED)
end if
end on

on ui_control($tfx5)
if ($tfx5 = 1)
$i := 0
while ($i < $NUM_GROUPS)

set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,1000000,$i,5,0)
inc ($i)
end while
set_key_color(28,$KEY_COLOR_GREEN)
else
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,0,$i,5,0)
inc ($i)
end while
set_key_color(28,$KEY_COLOR_RED)
end if
end on

on ui_control($tfx6)
if ($tfx6 = 1)
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,0,$i,6,0)
inc ($i)
end while
set_key_color(30,$KEY_COLOR_GREEN)
else
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,$i,6,0)
inc ($i)
end while
set_key_color(30,$KEY_COLOR_RED)
end if
end on

on ui_control($tfx7)
if ($tfx7 = 1)
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,0,$i,5,0)
inc ($i)
end while
set_key_color(29,$KEY_COLOR_GREEN)
else
$i := 0
while ($i < $NUM_GROUPS)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1,$i,5,0)
inc ($i)
end while
set_key_color(29,$KEY_COLOR_RED)
end if
end on

on pgs_changed
if (pgs_get_key_val(INITa,0) = 1)
pgs_set_key_val(INITa,0,0)
call closetabs

end if
end on

on listener
if ($cicciput < 80)
call ANIM2
else
if ($PLAYED_VOICES_INST = 0)
$ANIMplay := 0
while ($ii >= 0)
wait(25000)
set_control_par(get_ui_id($Anim),$CONTROL_PAR_PICTURE_STATE,$ii)
dec($ii)
end while
else
if ($ANIMplay = 0)
$ANIMplay := 1
call ANIM
end if
end if
end if
end on

{}

Anda mungkin juga menyukai