Professional Documents
Culture Documents
{Sound }
$index_1 := $morph_knob/10
$index_2 := $morph_knob/10 +1
$knob := $morph_knob*10
if ($index_2 > 10)
$index_2 := 10
end if
$a := 0
while($a < 9)
$helper := ((%savearr[($index_2*9) + $a] - %savearr[($index_1*9)
+ $a]) * ($knob mod 100))/100 + %savearr[($index_1*9) + $a]
_set_engine_par(%engine_par[$a],$helper,-1,$eq_slot,1)
inc($a)
end while
{Convolution }
select ($convolution_knob)
case 0
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,39685
1,-1,$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,0,-
1,$convolution_slot,1)
case 1 to 4999
_set_engine_par($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,(($con
volution_knob - 1) * (314926 - 396851) / (4998)) + 396851,-1,$convolution_slot,1
)
_set_engine_par($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,(($c
onvolution_knob - 1) * (314926) / (4998)),-1,$convolution_slot,1)
case 5000
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,31492
6,-1,$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,314
926,-1,$convolution_slot,1)
case 5001 to 9999
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,(($co
nvolution_knob - 5001) * (-314926) / (4998)) + 314926,-1,$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,(($
convolution_knob - 5001) * (396851 - 314926) / (4998)) + 314926,-1,$convolution_
slot,1)
case 10000
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,0,-1,
$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,396
851,-1,$convolution_slot,1)
end select
{Cutoff }
select ($cutoff_knob)
case 0 to 1000000
_set_engine_par($ENGINE_PAR_CUTOFF,$cutoff_knob,-1,$filt
er_slot,1)
_set_engine_par($ENGINE_PAR_CUTOFF,0,-1,$filter_slot+1,1
)
case 1000001
_set_engine_par($ENGINE_PAR_CUTOFF,1000000,-1,$filter_sl
ot,1)
_set_engine_par($ENGINE_PAR_CUTOFF,0,-1,$filter_slot+1,1
)
case 1000002 to 2000002
_set_engine_par($ENGINE_PAR_CUTOFF,$cutoff_knob-1000002,
-1,$filter_slot+1,1)
_set_engine_par($ENGINE_PAR_CUTOFF,1000000,-1,$filter_sl
ot,1)
end select
{Reso }
_set_engine_par ($ENGINE_PAR_RESONANCE,$reso_knob,-1,$filter_slot,1)
_set_engine_par ($ENGINE_PAR_RESONANCE,$reso_knob,-1,$filter_slot+1,1)
{Reverb + Delay}
_set_engine_par ($ENGINE_PAR_SENDLEVEL_0,$reverb_knob,-1,7,1)
_set_engine_par ($ENGINE_PAR_SENDLEVEL_1,$delay_knob,-1,7,1)
{Gainer }
_set_engine_par ($ENGINE_PAR_GN_GAIN,$volume_knob,-1,6,1)
set_control_par_str(get_ui_id($preset_knob),$CONTROL_PAR_LABEL,!preset_n
ame[$preset_knob])
set_control_par_str(get_ui_id($volume_knob),$CONTROL_PAR_LABEL,get_engin
e_par_disp($ENGINE_PAR_GN_GAIN,-1,6,1) & " dB")
set_control_par_str(get_ui_id($sat_knob),$CONTROL_PAR_LABEL,get_engine_p
ar_disp($ENGINE_PAR_SHAPE,-1,$sat_slot,1) & " %")
set_control_par_str(get_ui_id($morph_knob),$CONTROL_PAR_LABEL,$morph_kno
b & " %")
set_control_par_str(get_ui_id($convolution_knob),$CONTROL_PAR_LABEL,$con
volution_knob/100 & " %")
set_control_par_str(get_ui_id($cutoff_knob),$CONTROL_PAR_LABEL,$cutoff_k
nob/20000 & " %")
set_control_par_str(get_ui_id($reso_knob),$CONTROL_PAR_LABEL,get_engine_
par_disp($ENGINE_PAR_RESONANCE,-1,$filter_slot,1) & " %")
set_control_par_str(get_ui_id($reverb_knob),$CONTROL_PAR_LABEL,get_engin
e_par_disp($ENGINE_PAR_SENDLEVEL_0,-1,7,1) & " dB")
set_control_par_str(get_ui_id($delay_knob),$CONTROL_PAR_LABEL,get_engine
_par_disp($ENGINE_PAR_SENDLEVEL_1,-1,7,1) & " dB")
{******************** SET CONTROL HELP *********************************
*******}
set_control_help ($delay_knob,"Delay: The wet amount of the delay send e
ffect. You can change the delay settings on the Reverb/Delay page.")
set_control_help ($reverb_knob,"Reverb: The wet amount of the reverb sen
d effect. You can change the reverb settings on the Reverb/Delay page.")
set_control_help ($ir_menu,"Timbre Impulse: Choose a timbre impulse for
the convolution effect. This convolution effect is independent from the convolut
ion effect used as the reverb send effect. The impulse sample is not changed whe
n recalling other presets.")
set_control_help ($convolution_knob,"Dry/Wet: Controls the dry/wet amoun
t of the convolution effect.")
set_control_help ($sat_knob,"Saturation: Sets the saturation amount.")
set_control_help ($reso_knob,"Master Filter Resonance: Sets the resonanc
e of both the low and high pass filter.")
set_control_help ($cutoff_knob,"Master Filter Cutoff: A combination of a
low pass and high pass filter. Moving the knob to the left sets the cutoff freq
uency of the low pass filter, moving it to the right sets the cutoff frequency o
f the high pass filter.")
set_control_help ($preset_knob,"Preset: Choose among twelve presets + on
e default preset. Each change made to any control of the master FX chain is imme
diately saved to the current preset. The presets are recalled by pressing a key
in the range of C5 to C6.")
set_control_help ($edit_preset,"Edit Preset: Commands for copying and pa
sting presets.")
set_control_help ($snap_to_default,"Snap to Default: When enabled, relea
sing a key in the range of C#5 to C6 will always snap back to the default preset
which is triggered by C5.")
set_control_help ($morph_knob,"Sound: Changes the EQ setting.")
set_control_help ($volume_knob,"Volume: Sets the master volume at the en
d of the effect chain. Use this to smooth out volume changes between the presets
.")
{******************** SET CONTROL HELP *********************************
*******}
if ($CREATE_AUTOMATION_ID = 1)
set_control_par(get_ui_id($preset_knob),$CONTROL_PAR_AUTOMATION_
ID,77)
set_control_par(get_ui_id($volume_knob),$CONTROL_PAR_AUTOMATION_
ID,78)
set_control_par(get_ui_id($sat_knob),$CONTROL_PAR_AUTOMATION_ID,
79)
set_control_par(get_ui_id($morph_knob),$CONTROL_PAR_AUTOMATION_I
D,80)
set_control_par(get_ui_id($convolution_knob),$CONTROL_PAR_AUTOMA
TION_ID,81)
set_control_par(get_ui_id($cutoff_knob),$CONTROL_PAR_AUTOMATION_
ID,82)
set_control_par(get_ui_id($reso_knob),$CONTROL_PAR_AUTOMATION_ID
,83)
set_control_par(get_ui_id($reverb_knob),$CONTROL_PAR_AUTOMATION_
ID,84)
set_control_par(get_ui_id($delay_knob),$CONTROL_PAR_AUTOMATION_I
D,85)
end if
end on
on note
if ($EVENT_NOTE >= $START_FX_NOTE and $EVENT_NOTE <= $START_FX_NOTE+12)
$preset_knob := $EVENT_NOTE - $START_FX_NOTE
%pressed_id[$preset_knob] := $EVENT_ID
set_text($preset_label,!preset_name[$preset_knob] )
$sat_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 0]
$morph_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 1]
$convolution_knob := %preset_arr[($preset_knob * $NUM_PRESET) +
2]
$cutoff_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 3]
$reso_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 4]
$reverb_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 5]
$delay_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 6]
$volume_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 7]
{ Saturation }
_set_engine_par ($ENGINE_PAR_SHAPE,$sat_knob,-1,$sat_slot,1)
{Sound }
$index_1 := $morph_knob/10
$index_2 := $morph_knob/10 +1
$knob := $morph_knob*10
if ($index_2 > 10)
$index_2 := 10
end if
$a := 0
while($a < 9)
$helper := ((%savearr[($index_2*9) + $a] - %savearr[($in
dex_1*9) + $a]) * ($knob mod 100))/100 + %savearr[($index_1*9) + $a]
_set_engine_par(%engine_par[$a],$helper,-1,$eq_slot,1)
inc($a)
end while
{Convolution }
select ($convolution_knob)
case 0
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEV
EL,396851,-1,$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_
GAIN,0,-1,$convolution_slot,1)
case 1 to 4999
_set_engine_par($ENGINE_PAR_SEND_EFFECT_DRY_LEVE
L,(($convolution_knob - 1) * (314926 - 396851) / (4998)) + 396851,-1,$convolutio
n_slot,1)
_set_engine_par($ENGINE_PAR_SEND_EFFECT_OUTPUT_G
AIN,(($convolution_knob - 1) * (314926) / (4998)),-1,$convolution_slot,1)
case 5000
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEV
EL,314926,-1,$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_
GAIN,314926,-1,$convolution_slot,1)
case 5001 to 9999
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEV
EL,(($convolution_knob - 5001) * (-314926) / (4998)) + 314926,-1,$convolution_sl
ot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_
GAIN,(($convolution_knob - 5001) * (396851 - 314926) / (4998)) + 314926,-1,$conv
olution_slot,1)
case 10000
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEV
EL,0,-1,$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_
GAIN,396851,-1,$convolution_slot,1)
end select
{Reso }
_set_engine_par ($ENGINE_PAR_RESONANCE,$reso_knob,-1,$filter_slo
t,1)
_set_engine_par ($ENGINE_PAR_RESONANCE,$reso_knob,-1,$filter_slo
t+1,1)
{Reverb + Delay }
_set_engine_par ($ENGINE_PAR_SENDLEVEL_0,$reverb_knob,-1,7,1)
_set_engine_par ($ENGINE_PAR_SENDLEVEL_1,$delay_knob,-1,7,1)
{Gainer }
_set_engine_par ($ENGINE_PAR_GN_GAIN,$volume_knob,-1,6,1)
{Cutoff }
select ($cutoff_knob)
case 0 to 1000000
_set_engine_par($ENGINE_PAR_CUTOFF,$cutoff_knob,
-1,$filter_slot,1)
_set_engine_par($ENGINE_PAR_CUTOFF,0,-1,$filter_
slot+1,1)
case 1000001
_set_engine_par($ENGINE_PAR_CUTOFF,1000000,-1,$f
ilter_slot,1)
_set_engine_par($ENGINE_PAR_CUTOFF,0,-1,$filter_
slot+1,1)
case 1000002 to 2000002
_set_engine_par($ENGINE_PAR_CUTOFF,$cutoff_knob-
1000002,-1,$filter_slot+1,1)
_set_engine_par($ENGINE_PAR_CUTOFF,1000000,-1,$f
ilter_slot,1)
end select
end if
end on
on release
if ($EVENT_NOTE >= $START_FX_NOTE and $EVENT_NOTE <= $START_FX_NOTE+12)
%pressed_id[$EVENT_NOTE - $START_FX_NOTE] := 0
if ($snap_to_default = 1)
$a := 0
$max := 0
while($a < 13)
if (%pressed_id[$a] > $max)
$max := %pressed_id[$a]
$preset_knob := $a
end if
inc($a)
end while
if ($max = 0)
$preset_knob := 0
end if
set_text($preset_label,!preset_name[$preset_knob] )
$sat_knob := %preset_arr[($preset_knob * $NUM_PRESET) +
0]
$morph_knob := %preset_arr[($preset_knob * $NUM_PRESET)
+ 1]
$convolution_knob := %preset_arr[($preset_knob * $NUM_PR
ESET) + 2]
$cutoff_knob := %preset_arr[($preset_knob * $NUM_PRESET)
+ 3]
$reso_knob := %preset_arr[($preset_knob * $NUM_PRESET) +
4]
$reverb_knob := %preset_arr[($preset_knob * $NUM_PRESET)
+ 5]
$delay_knob := %preset_arr[($preset_knob * $NUM_PRESET)
+ 6]
$volume_knob := %preset_arr[($preset_knob * $NUM_PRESET)
+ 7]
{ Saturation}
_set_engine_par ($ENGINE_PAR_SHAPE,$sat_knob,-1,$sat_slo
t,1)
{Sound }
$index_1 := $morph_knob/10
$index_2 := $morph_knob/10 +1
$knob := $morph_knob*10
if ($index_2 > 10)
$index_2 := 10
end if
$a := 0
while($a < 9)
$helper := ((%savearr[($index_2*9) + $a] - %save
arr[($index_1*9) + $a]) * ($knob mod 100))/100 + %savearr[($index_1*9) + $a]
_set_engine_par(%engine_par[$a],$helper,-1,$eq_s
lot,1)
inc($a)
end while
{Convolution }
select ($convolution_knob)
case 0
_set_engine_par ($ENGINE_PAR_SEND_EFFECT
_DRY_LEVEL,396851,-1,$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT
_OUTPUT_GAIN,0,-1,$convolution_slot,1)
case 1 to 4999
_set_engine_par($ENGINE_PAR_SEND_EFFECT_
DRY_LEVEL,(($convolution_knob - 1) * (314926 - 396851) / (4998)) + 396851,-1,$co
nvolution_slot,1)
_set_engine_par($ENGINE_PAR_SEND_EFFECT_
OUTPUT_GAIN,(($convolution_knob - 1) * (314926) / (4998)),-1,$convolution_slot,1
)
case 5000
_set_engine_par ($ENGINE_PAR_SEND_EFFECT
_DRY_LEVEL,314926,-1,$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT
_OUTPUT_GAIN,314926,-1,$convolution_slot,1)
case 5001 to 9999
_set_engine_par ($ENGINE_PAR_SEND_EFFECT
_DRY_LEVEL,(($convolution_knob - 5001) * (-314926) / (4998)) + 314926,-1,$convol
ution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT
_OUTPUT_GAIN,(($convolution_knob - 5001) * (396851 - 314926) / (4998)) + 314926,
-1,$convolution_slot,1)
case 10000
_set_engine_par ($ENGINE_PAR_SEND_EFFECT
_DRY_LEVEL,0,-1,$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT
_OUTPUT_GAIN,396851,-1,$convolution_slot,1)
end select
{Reso }
_set_engine_par ($ENGINE_PAR_RESONANCE,$reso_knob,-1,$fi
lter_slot,1)
_set_engine_par ($ENGINE_PAR_RESONANCE,$reso_knob,-1,$fi
lter_slot+1,1)
{Reverb + Delay}
_set_engine_par ($ENGINE_PAR_SENDLEVEL_0,$reverb_knob,-1
,7,1)
_set_engine_par ($ENGINE_PAR_SENDLEVEL_1,$delay_knob,-1,
7,1)
{Gainer }
_set_engine_par ($ENGINE_PAR_GN_GAIN,$volume_knob,-1,6,1
)
{Cutoff }
select ($cutoff_knob)
case 0 to 1000000
_set_engine_par($ENGINE_PAR_CUTOFF,$cuto
ff_knob,-1,$filter_slot,1)
_set_engine_par($ENGINE_PAR_CUTOFF,0,-1,
$filter_slot+1,1)
case 1000001
_set_engine_par($ENGINE_PAR_CUTOFF,10000
00,-1,$filter_slot,1)
_set_engine_par($ENGINE_PAR_CUTOFF,0,-1,
$filter_slot+1,1)
case 1000002 to 2000002
_set_engine_par($ENGINE_PAR_CUTOFF,$cuto
ff_knob-1000002,-1,$filter_slot+1,1)
_set_engine_par($ENGINE_PAR_CUTOFF,10000
00,-1,$filter_slot,1)
end select
end if
end if
end on
on ui_control ($morph_knob)
%preset_arr[($preset_knob * $NUM_PRESET) + 1] := $morph_knob
$index_1 := $morph_knob/10
$index_2 := $morph_knob/10 +1
$knob := $morph_knob*10
if ($index_2 > 10)
$index_2 := 10
end if
set_control_par_str(get_ui_id($morph_knob),$CONTROL_PAR_LABEL,$morph_kno
b & " %")
$a := 0
while($a < 9)
$helper := ((%savearr[($index_2*9) + $a] - %savearr[($index_1*9)
+ $a]) * ($knob mod 100))/100 + %savearr[($index_1*9) + $a]
_set_engine_par(%engine_par[$a],$helper,-1,$eq_slot,1)
inc($a)
end while
end on
on ui_control ($ir_menu)
if ($ir_menu = -1)
_set_engine_par($ENGINE_PAR_SEND_EFFECT_BYPASS,1,-1,$convolution
_slot,1)
else
_set_engine_par($ENGINE_PAR_SEND_EFFECT_BYPASS,0,-1,$convolution
_slot,1)
_load_ir_sample(_get_folder($GET_FOLDER_LIBRARY_DIR)...
& "Urban Beats/Z - Samples/IR Samples/" & !ir_filenames[$ir_menu
] & ".wav",$convolution_slot,1)
end if
end on
on ui_control ($reverb_knob)
%preset_arr[($preset_knob * $NUM_PRESET) + 5] := $reverb_knob
_set_engine_par ($ENGINE_PAR_SENDLEVEL_0,$reverb_knob,-1,7,1)
set_control_par_str(get_ui_id($reverb_knob),$CONTROL_PAR_LABEL,get_engin
e_par_disp($ENGINE_PAR_SENDLEVEL_0,-1,7,1) & " dB")
end on
on ui_control ($delay_knob)
%preset_arr[($preset_knob * $NUM_PRESET) + 6] := $delay_knob
_set_engine_par ($ENGINE_PAR_SENDLEVEL_1,$delay_knob,-1,7,1)
set_control_par_str(get_ui_id($delay_knob),$CONTROL_PAR_LABEL,get_engine
_par_disp($ENGINE_PAR_SENDLEVEL_1,-1,7,1) & " dB")
end on
on ui_control ($volume_knob)
%preset_arr[($preset_knob * $NUM_PRESET) + 7] := $volume_knob
_set_engine_par ($ENGINE_PAR_GN_GAIN,$volume_knob,-1,6,1)
set_control_par_str(get_ui_id($volume_knob),$CONTROL_PAR_LABEL,get_engin
e_par_disp($ENGINE_PAR_GN_GAIN,-1,6,1) & " dB")
end on
on ui_control ($cutoff_knob)
%preset_arr[($preset_knob * $NUM_PRESET) + 3] := $cutoff_knob
select ($cutoff_knob)
case 0 to 1000000
_set_engine_par($ENGINE_PAR_CUTOFF,$cutoff_knob,-1,$filt
er_slot,1)
_set_engine_par($ENGINE_PAR_CUTOFF,0,-1,$filter_slot+1,1
)
case 1000001
_set_engine_par($ENGINE_PAR_CUTOFF,1000000,-1,$filter_sl
ot,1)
_set_engine_par($ENGINE_PAR_CUTOFF,0,-1,$filter_slot+1,1
)
case 1000002 to 2000002
_set_engine_par($ENGINE_PAR_CUTOFF,$cutoff_knob-1000002,
-1,$filter_slot+1,1)
_set_engine_par($ENGINE_PAR_CUTOFF,1000000,-1,$filter_sl
ot,1)
end select
set_control_par_str(get_ui_id($cutoff_knob),$CONTROL_PAR_LABEL,$cutoff_k
nob/20000 & " %")
end on
on ui_control ($reso_knob)
%preset_arr[($preset_knob * $NUM_PRESET) + 4] := $reso_knob
_set_engine_par ($ENGINE_PAR_RESONANCE,$reso_knob,-1,$filter_slot,1)
_set_engine_par ($ENGINE_PAR_RESONANCE,$reso_knob,-1,$filter_slot+1,1)
set_control_par_str(get_ui_id($reso_knob),$CONTROL_PAR_LABEL,get_engine_
par_disp($ENGINE_PAR_RESONANCE,-1,$filter_slot,1) & " %")
end on
on ui_control ($sat_knob)
%preset_arr[($preset_knob * $NUM_PRESET) + 0] := $sat_knob
_set_engine_par ($ENGINE_PAR_SHAPE,$sat_knob,-1,$sat_slot,1)
set_control_par_str(get_ui_id($sat_knob),$CONTROL_PAR_LABEL,get_engine_p
ar_disp($ENGINE_PAR_SHAPE,-1,$sat_slot,1) & " %")
end on
on ui_control ($convolution_knob)
%preset_arr[($preset_knob * $NUM_PRESET) + 2] := $convolution_knob
select ($convolution_knob)
case 0
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,39685
1,-1,$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,0,-
1,$convolution_slot,1)
case 1 to 4999
_set_engine_par($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,(($con
volution_knob - 1) * (314926 - 396851) / (4998)) + 396851,-1,$convolution_slot,1
)
_set_engine_par($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,(($c
onvolution_knob - 1) * (314926) / (4998)),-1,$convolution_slot,1)
case 5000
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,31492
6,-1,$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,314
926,-1,$convolution_slot,1)
case 5001 to 9999
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,(($co
nvolution_knob - 5001) * (-314926) / (4998)) + 314926,-1,$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,(($
convolution_knob - 5001) * (396851 - 314926) / (4998)) + 314926,-1,$convolution_
slot,1)
case 10000
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,0,-1,
$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,396
851,-1,$convolution_slot,1)
end select
set_control_par_str(get_ui_id($convolution_knob),$CONTROL_PAR_LABEL,$con
volution_knob/100 & " %")
end on
on ui_control ($preset_knob)
set_text($preset_label,!preset_name[$preset_knob] )
set_control_par_str(get_ui_id($preset_knob),$CONTROL_PAR_LABEL,!preset_n
ame[$preset_knob])
$sat_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 0]
$morph_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 1]
$convolution_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 2]
$cutoff_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 3]
$reso_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 4]
$reverb_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 5]
$delay_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 6]
$volume_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 7]
{ Saturation}
_set_engine_par ($ENGINE_PAR_SHAPE,$sat_knob,-1,$sat_slot,1)
{Sound }
$index_1 := $morph_knob/10
$index_2 := $morph_knob/10 +1
$knob := $morph_knob*10
if ($index_2 > 10)
$index_2 := 10
end if
$a := 0
while($a < 9)
$helper := ((%savearr[($index_2*9) + $a] - %savearr[($index_1*9)
+ $a]) * ($knob mod 100))/100 + %savearr[($index_1*9) + $a]
_set_engine_par(%engine_par[$a],$helper,-1,$eq_slot,1)
inc($a)
end while
{Convolution }
select ($convolution_knob)
case 0
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,39685
1,-1,$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,0,-
1,$convolution_slot,1)
case 1 to 4999
_set_engine_par($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,(($con
volution_knob - 1) * (314926 - 396851) / (4998)) + 396851,-1,$convolution_slot,1
)
_set_engine_par($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,(($c
onvolution_knob - 1) * (314926) / (4998)),-1,$convolution_slot,1)
case 5000
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,31492
6,-1,$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,314
926,-1,$convolution_slot,1)
case 5001 to 9999
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,(($co
nvolution_knob - 5001) * (-314926) / (4998)) + 314926,-1,$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,(($
convolution_knob - 5001) * (396851 - 314926) / (4998)) + 314926,-1,$convolution_
slot,1)
case 10000
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,0,-1,
$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,396
851,-1,$convolution_slot,1)
end select
{Reso }
_set_engine_par ($ENGINE_PAR_RESONANCE,$reso_knob,-1,$filter_slot,1)
_set_engine_par ($ENGINE_PAR_RESONANCE,$reso_knob,-1,$filter_slot+1,1)
{Reverb + Delay}
_set_engine_par ($ENGINE_PAR_SENDLEVEL_0,$reverb_knob,-1,7,1)
_set_engine_par ($ENGINE_PAR_SENDLEVEL_1,$delay_knob,-1,7,1)
{Gainer }
_set_engine_par ($ENGINE_PAR_GN_GAIN,$volume_knob,-1,6,1)
{Cutoff }
select ($cutoff_knob)
case 0 to 1000000
_set_engine_par($ENGINE_PAR_CUTOFF,$cutoff_knob,-1,$filt
er_slot,1)
_set_engine_par($ENGINE_PAR_CUTOFF,0,-1,$filter_slot+1,1
)
case 1000001
_set_engine_par($ENGINE_PAR_CUTOFF,1000000,-1,$filter_sl
ot,1)
_set_engine_par($ENGINE_PAR_CUTOFF,0,-1,$filter_slot+1,1
)
case 1000002 to 2000002
_set_engine_par($ENGINE_PAR_CUTOFF,$cutoff_knob-1000002,
-1,$filter_slot+1,1)
_set_engine_par($ENGINE_PAR_CUTOFF,1000000,-1,$filter_sl
ot,1)
end select
end on
on ui_control ($edit_preset)
if ($edit_Preset < 99)
select($edit_preset)
case 0
$a := 0
while($a < $NUM_PRESET)
%helper_arr[$a] := %preset_arr[($preset_
knob*$NUM_PRESET)+$a ]
inc($a)
end while
case 1
if ($preset_knob > 0)
$a := 0
while($a < $NUM_PRESET)
%preset_arr[($preset_knob*$NUM_P
RESET)+$a ] := %helper_arr[$a]
inc($a)
end while
end if
case 2
$a := 0
while($a < $NUM_PRESET)
%preset_arr[($preset_knob*$NUM_PRESET)+$
a ] := %default_arr[$a]
inc($a)
end while
case 3
$a := $NUM_PRESET
while($a < $NUM_PRESET*12)
%preset_arr[$a] := %preset_arr[($preset_
knob*$NUM_PRESET)+($a mod $NUM_PRESET)]
inc($a)
end while
end select
end if
$edit_preset := 100
$sat_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 0]
$morph_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 1]
$convolution_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 2]
$cutoff_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 3]
$reso_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 4]
$reverb_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 5]
$delay_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 6]
$volume_knob := %preset_arr[($preset_knob * $NUM_PRESET) + 7]
{ Saturation}
_set_engine_par ($ENGINE_PAR_SHAPE,$sat_knob,-1,$sat_slot,1)
{Sound }
$index_1 := $morph_knob/10
$index_2 := $morph_knob/10 +1
$knob := $morph_knob*10
if ($index_2 > 10)
$index_2 := 10
end if
$a := 0
while($a < 9)
$helper := ((%savearr[($index_2*9) + $a] - %savearr[($index_1*9)
+ $a]) * ($knob mod 100))/100 + %savearr[($index_1*9) + $a]
_set_engine_par(%engine_par[$a],$helper,-1,$eq_slot,1)
inc($a)
end while
{Convolution }
select ($convolution_knob)
case 0
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,39685
1,-1,$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,0,-
1,$convolution_slot,1)
case 1 to 4999
_set_engine_par($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,(($con
volution_knob - 1) * (314926 - 396851) / (4998)) + 396851,-1,$convolution_slot,1
)
_set_engine_par($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,(($c
onvolution_knob - 1) * (314926) / (4998)),-1,$convolution_slot,1)
case 5000
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,31492
6,-1,$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,314
926,-1,$convolution_slot,1)
case 5001 to 9999
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,(($co
nvolution_knob - 5001) * (-314926) / (4998)) + 314926,-1,$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,(($
convolution_knob - 5001) * (396851 - 314926) / (4998)) + 314926,-1,$convolution_
slot,1)
case 10000
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,0,-1,
$convolution_slot,1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,396
851,-1,$convolution_slot,1)
end select
{Reso }
_set_engine_par ($ENGINE_PAR_RESONANCE,$reso_knob,-1,$filter_slot,1)
_set_engine_par ($ENGINE_PAR_RESONANCE,$reso_knob,-1,$filter_slot+1,1)
{Reverb + Delay}
_set_engine_par ($ENGINE_PAR_SENDLEVEL_0,$reverb_knob,-1,7,1)
_set_engine_par ($ENGINE_PAR_SENDLEVEL_1,$delay_knob,-1,7,1)
{Gainer }
_set_engine_par ($ENGINE_PAR_GN_GAIN,$volume_knob,-1,6,1)
{Cutoff }
select ($cutoff_knob)
case 0 to 1000000
_set_engine_par($ENGINE_PAR_CUTOFF,$cutoff_knob,-1,$filt
er_slot,1)
_set_engine_par($ENGINE_PAR_CUTOFF,0,-1,$filter_slot+1,1
)
case 1000001
_set_engine_par($ENGINE_PAR_CUTOFF,1000000,-1,$filter_sl
ot,1)
_set_engine_par($ENGINE_PAR_CUTOFF,0,-1,$filter_slot+1,1
)
case 1000002 to 2000002
_set_engine_par($ENGINE_PAR_CUTOFF,$cutoff_knob-1000002,
-1,$filter_slot+1,1)
_set_engine_par($ENGINE_PAR_CUTOFF,1000000,-1,$filter_sl
ot,1)
end select
end on
on ui_control ($snap_to_default)
if ($snap_to_default = 1)
set_control_par(%ui_id[11], $CONTROL_PAR_FONT_TYPE, $FONT_ID_3)
else
set_control_par(%ui_id[11], $CONTROL_PAR_FONT_TYPE, $FONT_ID_2)
end if
end on