on init
declare %fxzsz[3] := (0)
declare $suqfo
declare $azeya
declare $fg4rw
declare %shcdf[3] := (0, 3, 6)
declare $1oynl := 3
make_perfview
set_script_title("ACME Drum Kit II")
set_ui_height_px(216)
set_control_par_str($INST_WALLPAPER_ID,$CONTROL_PAR_PICTURE,"skin")
set_control_par($INST_ICON_ID,$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL)
declare %24kub[32768]
declare $2j2se := 78
declare $w215g := 78
declare $tldxu
declare %3sxc3[935] := (0)
declare %trwd2[935]
$tldxu := 0
while ($tldxu<935)
%trwd2[$tldxu] := 43+($tldxu*35)
inc($tldxu)
end while
$tldxu := 0
%3sxc3[0] := -1
pgs_create_key(TCM_EXCEPTION,5)
pgs_set_key_val(TCM_EXCEPTION,$CURRENT_SCRIPT_SLOT,0)
declare %acolf[10] := (-1)
declare %d0uit[10] := (-1)
declare %zpwoq[3] := (-1)
declare %2aodb[3] := (-1)
declare ui_switch $4whnv
set_control_par_str(get_ui_id($4whnv),$CONTROL_PAR_TEXT,"MIXER")
set_control_par(get_ui_id($4whnv),$CONTROL_PAR_POS_X,385)
set_control_par(get_ui_id($4whnv),$CONTROL_PAR_POS_Y,96)
set_control_par_str(get_ui_id($4whnv),$CONTROL_PAR_PICTURE,"")
$4whnv := 0
set_control_par(get_ui_id($4whnv),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($4whnv),$CONTROL_PAR_HEIGHT,25)
make_persistent($4whnv)
read_persistent_var($4whnv)
declare ui_switch $3dfmg
set_control_par_str(get_ui_id($3dfmg),$CONTROL_PAR_TEXT,"EQ")
set_control_par(get_ui_id($3dfmg),$CONTROL_PAR_POS_X,445)
set_control_par(get_ui_id($3dfmg),$CONTROL_PAR_POS_Y,96)
set_control_par_str(get_ui_id($3dfmg),$CONTROL_PAR_PICTURE,"")
$3dfmg := 0
set_control_par(get_ui_id($3dfmg),$CONTROL_PAR_WIDTH,55)
set_control_par(get_ui_id($3dfmg),$CONTROL_PAR_HEIGHT,25)
make_persistent($3dfmg)
read_persistent_var($3dfmg)
declare ui_label $a0nxx(1, 1) 
set_control_par_str(get_ui_id($a0nxx),$CONTROL_PAR_PICTURE,"mixer_labels")
set_control_par(get_ui_id($a0nxx),$CONTROL_PAR_POS_X,3)
set_control_par(get_ui_id($a0nxx),$CONTROL_PAR_POS_Y,4)
set_control_par(get_ui_id($a0nxx),$CONTROL_PAR_WIDTH,100)
set_control_par(get_ui_id($a0nxx),$CONTROL_PAR_HEIGHT,20)
set_control_par_str(get_ui_id($a0nxx),$CONTROL_PAR_TEXT,"")
set_control_par(get_ui_id($a0nxx),$CONTROL_PAR_FONT_TYPE,-1)
set_control_par(get_ui_id($a0nxx),$CONTROL_PAR_TEXT_ALIGNMENT,-1)
set_control_par(get_ui_id($a0nxx),$CONTROL_PAR_WIDTH,266)
set_control_par(get_ui_id($a0nxx),$CONTROL_PAR_HEIGHT,41)
%acolf[9] := get_ui_id($a0nxx)
$fg4rw := 0
declare ui_slider $0po5b(0, 1000000) 
set_control_par_str(get_ui_id($0po5b),$CONTROL_PAR_PICTURE,"fader")
set_control_par(get_ui_id($0po5b),$CONTROL_PAR_POS_X,31+$fg4rw)
set_control_par(get_ui_id($0po5b),$CONTROL_PAR_POS_Y,39)
set_control_par(get_ui_id($0po5b),$CONTROL_PAR_DEFAULT_VALUE,500000)
$0po5b := 500000
if (1=1)
set_control_par(get_ui_id($0po5b),$CONTROL_PAR_MOUSE_BEHAVIOUR,-2500)
end if
make_persistent($0po5b)
read_persistent_var($0po5b)
%acolf[0] := get_ui_id($0po5b)
declare ui_switch $dknid
set_control_par_str(get_ui_id($dknid),$CONTROL_PAR_TEXT,"M")
set_control_par(get_ui_id($dknid),$CONTROL_PAR_POS_X,19+$fg4rw)
set_control_par(get_ui_id($dknid),$CONTROL_PAR_POS_Y,178)
set_control_par_str(get_ui_id($dknid),$CONTROL_PAR_PICTURE,"")
$dknid := 0
set_control_par(get_ui_id($dknid),$CONTROL_PAR_WIDTH,24)
set_control_par(get_ui_id($dknid),$CONTROL_PAR_HEIGHT,24)
make_persistent($dknid)
read_persistent_var($dknid)
set_control_par(get_ui_id($dknid),$CONTROL_PAR_TEXT_ALIGNMENT,1)
%acolf[1] := get_ui_id($dknid)
%zpwoq[0] := get_ui_id($dknid)
declare ui_switch $3iyr4
set_control_par_str(get_ui_id($3iyr4),$CONTROL_PAR_TEXT,"S")
set_control_par(get_ui_id($3iyr4),$CONTROL_PAR_POS_X,51+$fg4rw)
set_control_par(get_ui_id($3iyr4),$CONTROL_PAR_POS_Y,178)
set_control_par_str(get_ui_id($3iyr4),$CONTROL_PAR_PICTURE,"")
$3iyr4 := 0
set_control_par(get_ui_id($3iyr4),$CONTROL_PAR_WIDTH,24)
set_control_par(get_ui_id($3iyr4),$CONTROL_PAR_HEIGHT,24)
make_persistent($3iyr4)
read_persistent_var($3iyr4)
set_control_par(get_ui_id($3iyr4),$CONTROL_PAR_TEXT_ALIGNMENT,1)
%acolf[2] := get_ui_id($3iyr4)
%2aodb[0] := get_ui_id($3iyr4)
$fg4rw := 90
declare ui_slider $35hkk(0, 1000000) 
set_control_par_str(get_ui_id($35hkk),$CONTROL_PAR_PICTURE,"fader")
set_control_par(get_ui_id($35hkk),$CONTROL_PAR_POS_X,31+$fg4rw)
set_control_par(get_ui_id($35hkk),$CONTROL_PAR_POS_Y,39)
set_control_par(get_ui_id($35hkk),$CONTROL_PAR_DEFAULT_VALUE,500000)
$35hkk := 500000
if (1=1)
set_control_par(get_ui_id($35hkk),$CONTROL_PAR_MOUSE_BEHAVIOUR,-2500)
end if
make_persistent($35hkk)
read_persistent_var($35hkk)
%acolf[3] := get_ui_id($35hkk)
declare ui_switch $hj3zf
set_control_par_str(get_ui_id($hj3zf),$CONTROL_PAR_TEXT,"M")
set_control_par(get_ui_id($hj3zf),$CONTROL_PAR_POS_X,19+$fg4rw)
set_control_par(get_ui_id($hj3zf),$CONTROL_PAR_POS_Y,178)
set_control_par_str(get_ui_id($hj3zf),$CONTROL_PAR_PICTURE,"")
$hj3zf := 0
set_control_par(get_ui_id($hj3zf),$CONTROL_PAR_WIDTH,24)
set_control_par(get_ui_id($hj3zf),$CONTROL_PAR_HEIGHT,24)
make_persistent($hj3zf)
read_persistent_var($hj3zf)
set_control_par(get_ui_id($hj3zf),$CONTROL_PAR_TEXT_ALIGNMENT,1)
%acolf[4] := get_ui_id($hj3zf)
%zpwoq[1] := get_ui_id($hj3zf)
declare ui_switch $lxi0x
set_control_par_str(get_ui_id($lxi0x),$CONTROL_PAR_TEXT,"S")
set_control_par(get_ui_id($lxi0x),$CONTROL_PAR_POS_X,51+$fg4rw)
set_control_par(get_ui_id($lxi0x),$CONTROL_PAR_POS_Y,178)
set_control_par_str(get_ui_id($lxi0x),$CONTROL_PAR_PICTURE,"")
$lxi0x := 0
set_control_par(get_ui_id($lxi0x),$CONTROL_PAR_WIDTH,24)
set_control_par(get_ui_id($lxi0x),$CONTROL_PAR_HEIGHT,24)
make_persistent($lxi0x)
read_persistent_var($lxi0x)
set_control_par(get_ui_id($lxi0x),$CONTROL_PAR_TEXT_ALIGNMENT,1)
%acolf[5] := get_ui_id($lxi0x)
%2aodb[1] := get_ui_id($lxi0x)
$fg4rw := 180
declare ui_slider $zbjcb(0, 1000000) 
set_control_par_str(get_ui_id($zbjcb),$CONTROL_PAR_PICTURE,"fader")
set_control_par(get_ui_id($zbjcb),$CONTROL_PAR_POS_X,31+$fg4rw)
set_control_par(get_ui_id($zbjcb),$CONTROL_PAR_POS_Y,39)
set_control_par(get_ui_id($zbjcb),$CONTROL_PAR_DEFAULT_VALUE,500000)
$zbjcb := 500000
if (1=1)
set_control_par(get_ui_id($zbjcb),$CONTROL_PAR_MOUSE_BEHAVIOUR,-2500)
end if
make_persistent($zbjcb)
read_persistent_var($zbjcb)
%acolf[6] := get_ui_id($zbjcb)
declare ui_switch $e5z2v
set_control_par_str(get_ui_id($e5z2v),$CONTROL_PAR_TEXT,"M")
set_control_par(get_ui_id($e5z2v),$CONTROL_PAR_POS_X,19+$fg4rw)
set_control_par(get_ui_id($e5z2v),$CONTROL_PAR_POS_Y,178)
set_control_par_str(get_ui_id($e5z2v),$CONTROL_PAR_PICTURE,"")
$e5z2v := 0
set_control_par(get_ui_id($e5z2v),$CONTROL_PAR_WIDTH,24)
set_control_par(get_ui_id($e5z2v),$CONTROL_PAR_HEIGHT,24)
make_persistent($e5z2v)
read_persistent_var($e5z2v)
set_control_par(get_ui_id($e5z2v),$CONTROL_PAR_TEXT_ALIGNMENT,1)
%acolf[7] := get_ui_id($e5z2v)
%zpwoq[2] := get_ui_id($e5z2v)
declare ui_switch $3ghgn
set_control_par_str(get_ui_id($3ghgn),$CONTROL_PAR_TEXT,"S")
set_control_par(get_ui_id($3ghgn),$CONTROL_PAR_POS_X,51+$fg4rw)
set_control_par(get_ui_id($3ghgn),$CONTROL_PAR_POS_Y,178)
set_control_par_str(get_ui_id($3ghgn),$CONTROL_PAR_PICTURE,"")
$3ghgn := 0
set_control_par(get_ui_id($3ghgn),$CONTROL_PAR_WIDTH,24)
set_control_par(get_ui_id($3ghgn),$CONTROL_PAR_HEIGHT,24)
make_persistent($3ghgn)
read_persistent_var($3ghgn)
set_control_par(get_ui_id($3ghgn),$CONTROL_PAR_TEXT_ALIGNMENT,1)
%acolf[8] := get_ui_id($3ghgn)
%2aodb[2] := get_ui_id($3ghgn)
declare ui_label $kdr5u(1, 1) 
set_control_par_str(get_ui_id($kdr5u),$CONTROL_PAR_PICTURE,"eq_labels")
set_control_par(get_ui_id($kdr5u),$CONTROL_PAR_POS_X,15)
set_control_par(get_ui_id($kdr5u),$CONTROL_PAR_POS_Y,4)
set_control_par(get_ui_id($kdr5u),$CONTROL_PAR_WIDTH,100)
set_control_par(get_ui_id($kdr5u),$CONTROL_PAR_HEIGHT,20)
set_control_par_str(get_ui_id($kdr5u),$CONTROL_PAR_TEXT,"")
set_control_par(get_ui_id($kdr5u),$CONTROL_PAR_FONT_TYPE,-1)
set_control_par(get_ui_id($kdr5u),$CONTROL_PAR_TEXT_ALIGNMENT,-1)
set_control_par(get_ui_id($kdr5u),$CONTROL_PAR_WIDTH,266)
set_control_par(get_ui_id($kdr5u),$CONTROL_PAR_HEIGHT,41)
%d0uit[0] := get_ui_id($kdr5u)
declare ui_menu $gmqnk
set_control_par_str(get_ui_id($gmqnk),$CONTROL_PAR_PICTURE,"")
set_control_par(get_ui_id($gmqnk),$CONTROL_PAR_POS_X,151)
set_control_par(get_ui_id($gmqnk),$CONTROL_PAR_POS_Y,24)
set_control_par(get_ui_id($gmqnk),$CONTROL_PAR_FONT_TYPE,-1)
set_control_par(get_ui_id($gmqnk),$CONTROL_PAR_TEXT_ALIGNMENT,0)
make_persistent($gmqnk)
read_persistent_var($gmqnk)
add_menu_item($gmqnk,"Preset 1",0)
add_menu_item($gmqnk,"Preset 2",1)
add_menu_item($gmqnk,"Preset 3",2)
add_menu_item($gmqnk,"Preset 4",3)
%d0uit[1] := get_ui_id($gmqnk)
declare ui_knob $xvvmf(0, 1000000, 1) 
set_control_par_str(get_ui_id($xvvmf),$CONTROL_PAR_TEXT,"Freq")
set_control_par(get_ui_id($xvvmf),$CONTROL_PAR_POS_X,152)
set_control_par(get_ui_id($xvvmf),$CONTROL_PAR_POS_Y,65)
set_control_par(get_ui_id($xvvmf),$CONTROL_PAR_FONT_TYPE,-1)
set_control_par(get_ui_id($xvvmf),$CONTROL_PAR_TEXT_ALIGNMENT,0)
set_control_par(get_ui_id($xvvmf),$CONTROL_PAR_DEFAULT_VALUE,450000)
$xvvmf := 450000
make_persistent($xvvmf)
read_persistent_var($xvvmf)
%d0uit[2] := get_ui_id($xvvmf)
declare ui_knob $xiwto(0, 1000000, 1) 
set_control_par_str(get_ui_id($xiwto),$CONTROL_PAR_TEXT,"BW")
set_control_par(get_ui_id($xiwto),$CONTROL_PAR_POS_X,152)
set_control_par(get_ui_id($xiwto),$CONTROL_PAR_POS_Y,113)
set_control_par(get_ui_id($xiwto),$CONTROL_PAR_FONT_TYPE,-1)
set_control_par(get_ui_id($xiwto),$CONTROL_PAR_TEXT_ALIGNMENT,0)
set_control_par(get_ui_id($xiwto),$CONTROL_PAR_DEFAULT_VALUE,0)
$xiwto := 0
make_persistent($xiwto)
read_persistent_var($xiwto)
%d0uit[3] := get_ui_id($xiwto)
declare ui_knob $1y4hw(0, 1000000, 1) 
set_control_par_str(get_ui_id($1y4hw),$CONTROL_PAR_TEXT,"Gain")
set_control_par(get_ui_id($1y4hw),$CONTROL_PAR_POS_X,152)
set_control_par(get_ui_id($1y4hw),$CONTROL_PAR_POS_Y,163)
set_control_par(get_ui_id($1y4hw),$CONTROL_PAR_FONT_TYPE,-1)
set_control_par(get_ui_id($1y4hw),$CONTROL_PAR_TEXT_ALIGNMENT,0)
set_control_par(get_ui_id($1y4hw),$CONTROL_PAR_DEFAULT_VALUE,500000)
$1y4hw := 500000
make_persistent($1y4hw)
read_persistent_var($1y4hw)
%d0uit[4] := get_ui_id($1y4hw)
declare ui_switch $5kpxa
set_control_par_str(get_ui_id($5kpxa),$CONTROL_PAR_TEXT,"")
set_control_par(get_ui_id($5kpxa),$CONTROL_PAR_POS_X,0)
set_control_par(get_ui_id($5kpxa),$CONTROL_PAR_POS_Y,195)
set_control_par_str(get_ui_id($5kpxa),$CONTROL_PAR_PICTURE,"blank")
$5kpxa := 0
set_control_par(get_ui_id($5kpxa),$CONTROL_PAR_WIDTH,64)
make_persistent($5kpxa)
read_persistent_var($5kpxa)
declare %faaao[12] := (-1)
%faaao[0] := 50000
%faaao[3] := 300000
%faaao[6] := 700000
%faaao[1] := 800000
%faaao[4] := 350000
%faaao[7] := 650000
%faaao[2] := 100000
%faaao[5] := 60000
%faaao[8] := 800000
%faaao[3] := 800000
%faaao[6] := 0
%faaao[9] := 0
$fg4rw := 0
while ($fg4rw<num_elements(%acolf))
set_control_par(%d0uit[$fg4rw],$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL)
set_control_par(%acolf[$fg4rw],$CONTROL_PAR_HIDE,$HIDE_PART_NOTHING)
inc($fg4rw)
end while
$4whnv := 1
$3dfmg := 0
message("")
message("")
declare $xp202
end on
function mdl__show_mixer
$fg4rw := 0
while ($fg4rw<num_elements(%acolf))
set_control_par(%d0uit[$fg4rw],$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL)
set_control_par(%acolf[$fg4rw],$CONTROL_PAR_HIDE,$HIDE_PART_NOTHING)
inc($fg4rw)
end while
$4whnv := 1
$3dfmg := 0
message("")
end function
function mdl__show_eq
$fg4rw := 0
while ($fg4rw<num_elements(%d0uit))
set_control_par(%acolf[$fg4rw],$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL)
set_control_par(%d0uit[$fg4rw],$CONTROL_PAR_HIDE,$HIDE_PART_NOTHING)
inc($fg4rw)
end while
$3dfmg := 1
$4whnv := 0
message("")
end function
function mdl__change_vol
%24kub[$2j2se-4] := $w215g
$w215g := $2j2se-4
$2j2se := $w215g
%24kub[$w215g+1] := 0
while (%24kub[$w215g+1]<$1oynl)
set_engine_par($ENGINE_PAR_VOLUME,%24kub[$w215g+2],%shcdf[%24kub[$w215g+3]]+%24kub[$w215g+1],-1,-1)
inc(%24kub[$w215g+1])
end while
$2j2se := $w215g
$w215g := %24kub[$w215g]
$2j2se := $2j2se+4
end function
function mdl__toggle_switches
%24kub[$2j2se-3] := $w215g
$w215g := $2j2se-3
$2j2se := $w215g
if (get_control_par(%24kub[$w215g+1],$CONTROL_PAR_VALUE)=1)
set_control_par(%24kub[$w215g+2],$CONTROL_PAR_VALUE,0)
end if
$2j2se := $w215g
$w215g := %24kub[$w215g]
$2j2se := $2j2se+3
end function
function mdl__set_eq
%24kub[$2j2se-4] := $w215g
$w215g := $2j2se-4
$2j2se := $w215g
set_engine_par($ENGINE_PAR_FREQ1,%24kub[$w215g+1],-1,0,1)
set_engine_par($ENGINE_PAR_BW1,%24kub[$w215g+2],-1,0,1)
set_engine_par($ENGINE_PAR_GAIN1,%24kub[$w215g+3],-1,0,1)
$xvvmf := %24kub[$w215g+1]
$xiwto := %24kub[$w215g+2]
$1y4hw := %24kub[$w215g+3]
$2j2se := $w215g
$w215g := %24kub[$w215g]
$2j2se := $2j2se+4
end function
on note
$azeya := 0
$fg4rw := 0
while ($fg4rw<num_elements(%2aodb))
if (get_control_par(%2aodb[$fg4rw],$CONTROL_PAR_VALUE)=1)
$azeya := 1
end if
inc($fg4rw)
end while
disallow_group($ALL_GROUPS)
$fg4rw := 0
while ($fg4rw<num_elements(%shcdf))
if (get_control_par(%zpwoq[$fg4rw],$CONTROL_PAR_VALUE)=0)
$xp202 := %fxzsz[$fg4rw]
while (%fxzsz[$fg4rw]=$xp202)
%fxzsz[$fg4rw] := random(0,$1oynl-1)
end while
$suqfo := %fxzsz[$fg4rw]
if ($azeya=0)
allow_group(%shcdf[$fg4rw]+$suqfo)
else
if (get_control_par(%2aodb[$fg4rw],$CONTROL_PAR_VALUE)=1)
allow_group(%shcdf[$fg4rw]+$suqfo)
end if
end if
end if
inc($fg4rw)
end while
end on
on ui_control($4whnv)
call mdl__show_mixer
end on
on ui_control($3dfmg)
call mdl__show_eq
end on
on ui_control($0po5b)
%24kub[$2j2se-2] := $0po5b
%24kub[$2j2se-1] := 0
call mdl__change_vol
end on
on ui_control($dknid)
%24kub[$2j2se-2] := get_ui_id($dknid)
%24kub[$2j2se-1] := get_ui_id($3iyr4)
call mdl__toggle_switches
end on
on ui_control($3iyr4)
%24kub[$2j2se-2] := get_ui_id($3iyr4)
%24kub[$2j2se-1] := get_ui_id($dknid)
call mdl__toggle_switches
end on
on ui_control($35hkk)
%24kub[$2j2se-2] := $35hkk
%24kub[$2j2se-1] := 1
call mdl__change_vol
end on
on ui_control($hj3zf)
%24kub[$2j2se-2] := get_ui_id($hj3zf)
%24kub[$2j2se-1] := get_ui_id($lxi0x)
call mdl__toggle_switches
end on
on ui_control($lxi0x)
%24kub[$2j2se-2] := get_ui_id($lxi0x)
%24kub[$2j2se-1] := get_ui_id($hj3zf)
call mdl__toggle_switches
end on
on ui_control($zbjcb)
%24kub[$2j2se-2] := $zbjcb
%24kub[$2j2se-1] := 2
call mdl__change_vol
end on
on ui_control($e5z2v)
%24kub[$2j2se-2] := get_ui_id($e5z2v)
%24kub[$2j2se-1] := get_ui_id($3ghgn)
call mdl__toggle_switches
end on
on ui_control($3ghgn)
%24kub[$2j2se-2] := get_ui_id($3ghgn)
%24kub[$2j2se-1] := get_ui_id($e5z2v)
call mdl__toggle_switches
end on
on ui_control($gmqnk)
%24kub[$2j2se-3] := %faaao[0+$gmqnk]
%24kub[$2j2se-2] := %faaao[3+$gmqnk]
%24kub[$2j2se-1] := %faaao[6+$gmqnk]
call mdl__set_eq
end on
on ui_control($xvvmf)
%24kub[$2j2se-3] := $xvvmf
%24kub[$2j2se-2] := $xiwto
%24kub[$2j2se-1] := $1y4hw
call mdl__set_eq
end on
on ui_control($xiwto)
%24kub[$2j2se-3] := $xvvmf
%24kub[$2j2se-2] := $xiwto
%24kub[$2j2se-1] := $1y4hw
call mdl__set_eq
end on
on ui_control($1y4hw)
%24kub[$2j2se-3] := $xvvmf
%24kub[$2j2se-2] := $xiwto
%24kub[$2j2se-1] := $1y4hw
call mdl__set_eq
end on
