Documente Academic
Documente Profesional
Documente Cultură
declare $art_note
declare $duration_1
declare $duration_2
declare $duration_3
declare $duration_4
declare $new_id
declare $ornament
declare %note_ornaments[128]
$count := 0
while ($count < $NUM_OF_KEYSWITCHES)
%note_ornaments[$TRIG_SWITCH_MIN + $count] := $count + 1
inc ($count)
end while
declare %time_per_note[12]
$count := 0
while ($count < 12)
%time_per_note[$count] := 100
inc ($count)
end while
make_persistent (%time_per_note)
make_persistent (%note_ornaments)
read_persistent_var($note_articulate)
read_persistent_var($preset_articulate)
read_persistent_var($speed_articulate)
set_control_par_str(get_ui_id($note_articulate),$CONTROL_PAR_LABEL,!note
_names[$note_articulate])
set_control_par_str(get_ui_id($preset_articulate),$CONTROL_PAR_LABEL,!or
nament_names[$preset_articulate])
set_control_par_str(get_ui_id($speed_articulate),$CONTROL_PAR_LABEL,$spe
ed_articulate & " %")
declare $count_note
declare $a
declare $last_note
declare %pressed_arr[128]
declare %pressed_id[128]
declare $last_note_tune
declare $last_note_pan
declare $last_note_volume
declare polyphonic $blocker
declare $counter
declare polyphonic $blocker2
declare $counter2
{----------ARTICULATION CONTROLS END----------}
{----------MASTER REVERB FX START----------}
{POSITIONING OF CONTROL GROUP}
declare $x_grid_reverb := 2 {X Position of Control Group in grid}
declare $y_grid_reverb := 7 {Y Position of Control Group in grid}
declare $x_px_reverb := 0 {X Position Offset Control Group in pixel}
declare $y_px_reverb := 0 {Y Position Offset Control Group in pixel}
{DECLARATION AND UI_IDs}
declare const $NUM_REVERB := 13 {number of elements in this control grou
p}
declare ui_label $lb_wetdry_reverb (1,1)
declare ui_label $image_reverb (1,1)
declare ui_slider $wetdry_reverb (0, 500000)
declare ui_menu $category_reverb
declare ui_menu $hall_reverb
declare ui_menu $cathedral_reverb
declare ui_menu $club_reverb
declare ui_menu $room_reverb
declare ui_menu $l300_reverb
declare ui_menu $plate_reverb
declare ui_menu $quadstick_reverb
declare ui_menu $brt7_reverb
declare ui_menu $cabinet_reverb
declare %reverb_id[$NUM_REVERB]
%reverb_id[0] := get_ui_id($lb_wetdry_reverb)
%reverb_id[1] := get_ui_id($image_reverb)
%reverb_id[2] := get_ui_id($wetdry_reverb)
%reverb_id[3] := get_ui_id($category_reverb)
%reverb_id[4] := get_ui_id($hall_reverb)
%reverb_id[5] := get_ui_id($cathedral_reverb)
%reverb_id[6] := get_ui_id($club_reverb)
%reverb_id[7] := get_ui_id($room_reverb)
%reverb_id[8] := get_ui_id($l300_reverb)
%reverb_id[9] := get_ui_id($brt7_reverb)
%reverb_id[10] := get_ui_id($quadstick_reverb)
%reverb_id[11] := get_ui_id($plate_reverb)
%reverb_id[12] := get_ui_id($cabinet_reverb)
{VARIOUS ATTRIBUTES}
set_text($lb_wetdry_reverb,"DRY/WET")
set_text($image_reverb,"")
set_control_par(%reverb_id[0], $CONTROL_PAR_HIDE, $HIDE_PART_BG)
set_control_par(%reverb_id[0], $CONTROL_PAR_FONT_TYPE, $FONT_ID)
set_control_par_str(%reverb_id[1], $CONTROL_PAR_PICTURE, "pv_global_reve
rb_animation_small")
set_control_par_str(%reverb_id[2], $CONTROL_PAR_PICTURE, "pv_world_knob_
small")
set_control_par(%reverb_id[2], $CONTROL_PAR_MOUSE_BEHAVIOUR, -400)
$count := 3
while ($count < 13)
set_control_par_str(%reverb_id[$count], $CONTROL_PAR_TEXT, "")
set_control_par(%reverb_id[$count], $CONTROL_PAR_FONT_TYPE, $FON
T_ID_2)
set_control_par(%reverb_id[$count], $CONTROL_PAR_WIDTH, 92)
set_control_par_str(%reverb_id[$count], $CONTROL_PAR_PICTURE, "p
v_world_dropdown")
inc($count)
end while
{POSITIONING OF INDIVIDUAL CONTROLS}
move_control_px($lb_wetdry_reverb,($GRID_X * 4) - 7, 27)
move_control_px($image_reverb,($GRID_X * 3) - 25, 34)
move_control_px($wetdry_reverb,($GRID_X * 4) + 7, 43)
move_control_px($category_reverb,($GRID_X * 3) - 29, 18)
$count := 4
while ($count < 13)
set_control_par(%reverb_id[$count], $CONTROL_PAR_POS_X, ($GRID_X
* 3) - 29)
set_control_par(%reverb_id[$count], $CONTROL_PAR_POS_Y, ($GRID_Y
* 4) - 6)
inc($count)
end while
{Other}
$wetdry_reverb := _get_engine_par($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN, -
1,$reverb_slot,1)
declare %subcat_menu_id[9]
%subcat_menu_id[0] := get_ui_id($hall_reverb)
%subcat_menu_id[1] := get_ui_id($cathedral_reverb)
%subcat_menu_id[2] := get_ui_id($club_reverb)
%subcat_menu_id[3] := get_ui_id($room_reverb)
%subcat_menu_id[4] := get_ui_id($l300_reverb)
%subcat_menu_id[6] := get_ui_id($quadstick_reverb)
%subcat_menu_id[7] := get_ui_id($brt7_reverb)
%subcat_menu_id[5] := get_ui_id($plate_reverb)
%subcat_menu_id[8] := get_ui_id($cabinet_reverb)
{Fill the menus}
add_menu_item($category_reverb, "Concert Hall", 0)
add_menu_item($category_reverb, "Cathedral", 1)
add_menu_item($category_reverb, "Club", 2)
add_menu_item($category_reverb, "Room", 3)
add_menu_item($category_reverb, "L300", 4)
add_menu_item($category_reverb, "Quadstick", 6)
add_menu_item($category_reverb, "BRT 7", 7)
add_menu_item($category_reverb, "Plate", 5)
add_menu_item($category_reverb, "Cabinet", 8)
declare !ir_path[68]
!ir_path[0] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Samples
/Concert Hall A.wav"
!ir_path[1] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Samples
/Concert Hall B.wav"
!ir_path[2] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Samples
/Exhibition Hall.wav"
!ir_path[3] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Samples
/Cathedral A.wav"
!ir_path[4] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Samples
/Cathedral B.wav"
!ir_path[5] := "presets/effects/convolution/10 Big Rooms/IR Samples/ndb_
cathedral_ir_32bit.wav"
!ir_path[6] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Samples
/Club A.wav"
!ir_path[7] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Samples
/Club B.wav"
!ir_path[8] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Samples
/Tavern Close.wav"
!ir_path[9] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Samples
/Tavern Near.wav"
!ir_path[10] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Tavern Medium.wav"
!ir_path[11] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Tavern Far.wav"
!ir_path[12] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Auditorium A.wav"
!ir_path[13] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Auditorium B.wav"
!ir_path[14] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Chamber A.wav"
!ir_path[15] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Chamber B.wav"
!ir_path[16] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Rehearsal Room.wav"
!ir_path[17] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Hard Wood Room B.wav"
!ir_path[18] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Music Studio C.wav"
!ir_path[19] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Small Room A.wav"
!ir_path[20] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Small Room B.wav"
!ir_path[21] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/L300 Large Hall.wav"
!ir_path[22] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/L300 Gated Hall.wav"
!ir_path[23] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/L300 Large Room.wav"
!ir_path[24] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/L300 Large Chamber.wav"
!ir_path[25] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/L300 Studio C.wav"
!ir_path[26] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/L300 Contem-Plate.wav"
!ir_path[27] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/L300 Space & Echoes.wav"
!ir_path[28] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/L300 Medium Stop.wav"
!ir_path[29] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/L300 Drum Cave.wav"
!ir_path[30] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/L300 Large Ambience.wav"
!ir_path[31] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/L300 Smooth Ambience.wav"
!ir_path[32] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/L300 Ambience Wave.wav"
!ir_path[33] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/L300 Le Gate.wav"
!ir_path[34] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Quadstick Small - Basic.wav"
!ir_path[35] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Quadstick Small - Disco.wav"
!ir_path[36] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Quadstick Small - Funk.wav"
!ir_path[37] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Quadstick Small - Funky Club.wav"
!ir_path[38] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Quadstick Small - Hip Hop.wav"
!ir_path[39] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Quadstick Small - Reggae Modern.wav"
!ir_path[40] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Quadstick Small - RnB Neptunes.wav"
!ir_path[41] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/Quadstick Small - RnB Today 1.wav"
!ir_path[42] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/BRT 7 Ambience Large A.wav"
!ir_path[43] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/BRT 7 Ambience Small.wav"
!ir_path[44] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/BRT 7 Chamber Small.wav"
!ir_path[45] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/BRT 7 Chamber Vocal.wav"
!ir_path[46] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/BRT 7 Hall Dense.wav"
!ir_path[47] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/BRT 7 Location Chapel A.wav"
!ir_path[48] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/BRT 7 Plate Snare.wav"
!ir_path[49] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/BRT 7 Room Drum.wav"
!ir_path[50] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/BRT 7 Room Wood.wav"
!ir_path[51] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/BRT 7 Location Cineastic Room.wav"
!ir_path[52] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/E245 0.5s A.wav"
!ir_path[53] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/E245 1.0s A.wav"
!ir_path[54] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/E245 1.4s A.wav"
!ir_path[55] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/E245 2.1s A.wav"
!ir_path[56] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/E245 4.5s A.wav"
!ir_path[57] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/E252 0.6s.wav"
!ir_path[58] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/E252 1.0s.wav"
!ir_path[59] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/E252 1.8s.wav"
!ir_path[60] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/E252 3.0s.wav"
!ir_path[61] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR Sample
s/E252 4.5s.wav"
!ir_path[62] := "presets/effects/convolution/17 Cabinets/Brit 212/IR Sam
ples/Brit_212_Tube_Center.wav"
!ir_path[63] := "presets/effects/convolution/17 Cabinets/Tweed 112/IR Sa
mples/Tweed_112_Tube_Center.wav"
!ir_path[64] := "presets/effects/convolution/17 Cabinets/Tweed 212/IR Sa
mples/Tweed_212_Tube_Center.wav"
!ir_path[65] := "presets/effects/convolution/17 Cabinets/Tweed 410/IR Sa
mples/Tweed_410_Tube_Center.wav"
!ir_path[66] := "presets/effects/convolution/17 Cabinets/Rock 412/IR Sam
ples/Rock_412_Tube_Center.wav"
!ir_path[67] := "presets/effects/convolution/17 Cabinets/Modern 412/IR S
amples/Modern_412_Tube_Center.wav"
declare !ir_type[68]
!ir_type[0] := "Concert Hall A"
!ir_type[1] := "Concert Hall B"
!ir_type[2] := "Exhibition Hall"
!ir_type[3] := "Cathedral A"
!ir_type[4] := "Cathedral B"
!ir_type[5] := "NDB Cathedral"
!ir_type[6] := "Club A"
!ir_type[7] := "Club B"
!ir_type[8] := "Tavern Close"
!ir_type[9] := "Tavern Near"
!ir_type[10] := "Tavern Mid"
!ir_type[11] := "Tavern Far"
!ir_type[12] := "Auditorium A"
!ir_type[13] := "Auditorium B"
!ir_type[14] := "Chamber A"
!ir_type[15] := "Chamber B"
!ir_type[16] := "Rehearsal Room"
!ir_type[17] := "Hard Wood"
!ir_type[18] := "Music Studio"
!ir_type[19] := "Small Room A"
!ir_type[20] := "Small Room B"
!ir_type[21] := "Large Hall"
!ir_type[22] := "Gated Hall"
!ir_type[23] := "Large Room"
!ir_type[24] := "Large Chamber"
!ir_type[25] := "Studio C"
!ir_type[26] := "Contem-Plate"
!ir_type[27] := "Space & Echoes"
!ir_type[28] := "Medium Stop"
!ir_type[29] := "Drum Cave"
!ir_type[30] := "Large Ambi"
!ir_type[31] := "Smooth Ambi"
!ir_type[32] := "Ambience Wave"
!ir_type[33] := "Le Gate"
!ir_type[34] := "Basic"
!ir_type[35] := "Disco"
!ir_type[36] := "Funk"
!ir_type[37] := "Funky Club"
!ir_type[38] := "Hip Hop"
!ir_type[39] := "Reggae Modern"
!ir_type[40] := "RnB Neptunes"
!ir_type[41] := "RnB Today"
!ir_type[42] := "Large Ambience"
!ir_type[43] := "Small Ambience"
!ir_type[44] := "Small Chamber"
!ir_type[45] := "Vocal Chamber"
!ir_type[46] := "Dense Hall"
!ir_type[47] := "Chapel"
!ir_type[48] := "Snare Plate"
!ir_type[49] := "Drum Room"
!ir_type[50] := "Wood Room"
!ir_type[51] := "Cineastic Room"
!ir_type[52] := "E245 0.5s"
!ir_type[53] := "E245 1.0s"
!ir_type[54] := "E245 1.4s"
!ir_type[55] := "E245 2.1s"
!ir_type[56] := "E245 4.5s"
!ir_type[57] := "E252 0.6s"
!ir_type[58] := "E252 1.0s"
!ir_type[59] := "E252 1.8s"
!ir_type[60] := "E252 3.0s"
!ir_type[61] := "E252 4.5s"
!ir_type[62] := "Brit 2x12"
!ir_type[63] := "Tweed 1x12"
!ir_type[64] := "Tweed 2x12"
!ir_type[65] := "Tweed 4x10"
!ir_type[66] := "Rock 4x12"
!ir_type[67] := "Modern 4x12"
$count := 0
while ($count < 68)
if ($count < 3)
add_menu_item($hall_reverb,!ir_type[$count],$count)
else
if ($count < 6)
add_menu_item($cathedral_reverb,!ir_type[$count]
,$count)
else
if ($count < 14)
add_menu_item($club_reverb,!ir_type[$cou
nt],$count)
else
if ($count < 21)
add_menu_item($room_reverb,!ir_t
ype[$count],$count)
else
if ($count < 34)
add_menu_item($l300_reverb,!i
r_type[$count],$count)
else
if($count < 42)
add_menu_item($q
uadstick_reverb,!ir_type[$count],$count)
else
if ($count < 52)
add_menu
_item($brt7_reverb,!ir_type[$count],$count)
else
if ($cou
nt < 62)
add_menu_item($plate_reverb,!ir_type[$count],$count)
else
add_menu_item($cabinet_reverb,!ir_type[$count],$count)
end if
end if
end if
end if
end if
end if
end if
end if
inc ($count)
end while
make_persistent($category_reverb)
make_persistent($hall_reverb)
make_persistent($cathedral_reverb)
make_persistent($club_reverb)
make_persistent($room_reverb)
make_persistent($l300_reverb)
make_persistent($quadstick_reverb)
make_persistent($brt7_reverb)
make_persistent($plate_reverb)
make_persistent($cabinet_reverb)
_read_persistent_var($category_reverb)
_read_persistent_var($hall_reverb)
_read_persistent_var($cathedral_reverb)
_read_persistent_var($club_reverb)
_read_persistent_var($room_reverb)
_read_persistent_var($l300_reverb)
_read_persistent_var($quadstick_reverb)
_read_persistent_var($brt7_reverb)
_read_persistent_var($plate_reverb)
_read_persistent_var($cabinet_reverb)
$count := 0
while ($count < 9)
if ($count = $category_reverb)
set_control_par(%subcat_menu_id[$count],$CONTROL_PAR_HID
E,$HIDE_PART_NOTHING)
else
set_control_par(%subcat_menu_id[$count],$CONTROL_PAR_HID
E,$HIDE_WHOLE_CONTROL)
end if
inc ($count)
end while
set_control_par(get_ui_id($image_reverb),$CONTROL_PAR_PICTURE_STATE,$cat
egory_reverb)
declare %offset_reverb[9] := (0,3,6,14,21,52,34,42,62)
$count := 0
while ($count < $NUM_reverb)
set_control_par (%reverb_id[$count],$CONTROL_PAR_POS_X,get_contr
ol_par(%reverb_id[$count],...
$CONTROL_PAR_POS_X)+$ROOT_X + ($x_grid_reverb - 1)*$GRID_X + $x_
px_reverb)
set_control_par (%reverb_id[$count],$CONTROL_PAR_POS_Y,get_contr
ol_par(%reverb_id[$count],...
$CONTROL_PAR_POS_Y)+$ROOT_Y + ($y_grid_reverb - 1)*$GRID_Y + $y_
px_reverb)
inc($count)
end while
read_persistent_var($wetdry_reverb)
set_control_par_str(get_ui_id($wetdry_reverb),$CONTROL_PAR_AUTOMATION_NA
ME,"Rvb Mix")
set_control_par_str(get_ui_id($wetdry_reverb),$CONTROL_PAR_LABEL,$wetdry
_reverb*2/10000 & " %")
{----------MASTER REVERB FX END-----------}
{Control Help}
set_control_help($solo_instr,"Solo: Enables legato playback.")
set_control_help($sound_instr,"Sound: Morphs through a variety o
f EQ settings.")
set_control_help($rel_noise_instr,"Release Noise: Sets the level
of the release samples.")
set_control_help($attack_instr,"Attack: Controls the time the vo
lume envelope will take to fade to its maximum level.")
set_control_help($release_instr,"Release: Controls the time the
volume envelope will take to return to zero from the sustain level after the not
e trigger is released.")
set_control_help($onoff_articulate,"Articulation: Turns the dyna
mic key switches of the articulation engine on and off.")
set_control_help($note_articulate,"Note: Selects the dynamic key
switch of the articulation engine. For each key switch, you can select an artic
ulation and its speed.")
set_control_help($preset_articulate,"Type: Sets the articulation
for the selected dynamic key switch.")
set_control_help($speed_articulate,"Speed: Sets the speed of the
selected articulation.")
set_control_help($wetdry_reverb, "Dry/Wet: Controls the overall
dry/wet mix of the reverb effect.")
set_control_help($category_reverb, "Reverb IR Category: Select a
category from which you can choose a specific impulse response from the second
dropdown menu.")
set_control_help($hall_reverb, "Concert Hall: Impulse responses
in this category are capured from real spaces and represent a variety of large p
erformance spaces.")
set_control_help($cathedral_reverb, "Cathedral: A mix of real an
d modelled spaces that offer large and dense reverb tails.")
set_control_help($club_reverb, "Club: Impulse responses in this
category are capured from real spaces and represent a variety of small performan
ce spaces.")
set_control_help($room_reverb, "Room: Impulse responses in this
category are capured from real spaces and cover a variety of smaller rooms.")
set_control_help($l300_reverb, "L300: Impulse responses taken fr
om the classic studio digital reverb.")
set_control_help($plate_reverb, "Plate: Impulse responses from c
lassic plate reverb effect units.")
set_control_help($quadstick_reverb, "Quadstick: Impulse response
s taken from the classic studio digital reverb.")
set_control_help($brt7_reverb, "BRT 7: Impulse responses taken f
rom the classic studio digital reverb.")
set_control_help($cabinet_reverb, "Cabinet: Impulse responses of
several cabinet types.")
if ($CREATE_AUTOMATION_ID = 1)
set_control_par(get_ui_id($sound_instr),$CONTROL_PAR_AUTOMATION_
ID,0)
set_control_par(get_ui_id($rel_noise_instr),$CONTROL_PAR_AUTOMAT
ION_ID,1)
set_control_par(get_ui_id($attack_instr),$CONTROL_PAR_AUTOMATION
_ID,2)
set_control_par(get_ui_id($release_instr),$CONTROL_PAR_AUTOMATIO
N_ID,3)
set_control_par(get_ui_id($solo_instr),$CONTROL_PAR_AUTOMATION_I
D,8)
set_control_par(get_ui_id($note_articulate),$CONTROL_PAR_AUTOMAT
ION_ID,5)
set_control_par(get_ui_id($preset_articulate),$CONTROL_PAR_AUTOM
ATION_ID,6)
set_control_par(get_ui_id($speed_articulate),$CONTROL_PAR_AUTOMA
TION_ID,7)
set_control_par(get_ui_id($onoff_articulate),$CONTROL_PAR_AUTOMA
TION_ID,13)
set_control_par(get_ui_id($wetdry_reverb),$CONTROL_PAR_AUTOMATIO
N_ID,4)
end if
end on
on ui_control ($solo_instr)
if ($solo_instr = 1)
_pgs_set_key_val(SOLO_MODE,0,1)
else
_pgs_set_key_val(SOLO_MODE,0,0)
end if
end on
on ui_control ($sound_instr)
$index_1 := $sound_instr/10
$index_2 := $sound_instr/10 +1
$knob_eq := $sound_instr*10
if ($index_2 > 10)
$index_2 := 10
end if
set_control_par_str(get_ui_id($sound_instr),$CONTROL_PAR_LABEL,$sound_in
str & " %")
$a_eq := 0
while($a_eq < 9)
$helper_eq := ((%soundeqarr[($index_2*9) + $a_eq] - %soundeqarr[
($index_1*9) + $a_eq])...
* ($knob_eq mod 100))/100 + %soundeqarr[($index_1*9) + $a_eq]
_set_engine_par(%engine_par[$a_eq],$helper_eq,-1,$eq_slot,1)
inc($a_eq)
end while
end on
on ui_control ($rel_noise_instr)
set_engine_par($ENGINE_PAR_VOLUME,$rel_noise_instr,$release_grp_idx,-1,1
)
set_control_par_str(get_ui_id($rel_noise_instr),$CONTROL_PAR_LABEL,get_e
ngine_par_disp($ENGINE_PAR_VOLUME, $release_grp_idx, -1, 1) & " dB")
end on
on ui_control ($attack_instr)
set_engine_par ($ENGINE_PAR_ATTACK, $attack_instr, $main_grp_idx, $vol_e
nv_idx, -1)
set_control_par_str(get_ui_id($attack_instr),$CONTROL_PAR_LABEL,get_engi
ne_par_disp($ENGINE_PAR_ATTACK,$main_grp_idx,$vol_env_idx, 1) & " ms")
end on
on ui_control ($release_instr)
set_engine_par ($ENGINE_PAR_RELEASE, $release_instr, $main_grp_idx, $vol
_env_idx, -1)
set_engine_par ($ENGINE_PAR_RELEASE, $release_instr, $legato_grp_idx, $v
ol_env_idx, -1)
set_control_par_str(get_ui_id($release_instr),$CONTROL_PAR_LABEL,get_eng
ine_par_disp($ENGINE_PAR_RELEASE, $main_grp_idx, $vol_env_idx, 1) & " ms")
end on
{--REVERB UI CALL BACKS--}
on ui_control ($category_reverb)
$count := 0
while ($count < 9)
if ($count = $category_reverb)
set_control_par(%subcat_menu_id[$count],$CONTROL_PAR_HID
E,$HIDE_PART_NOTHING)
else
set_control_par(%subcat_menu_id[$count],$CONTROL_PAR_HID
E,$HIDE_WHOLE_CONTROL)
end if
inc ($count)
end while
set_control_par(get_ui_id($image_reverb),$CONTROL_PAR_PICTURE_STATE,$cat
egory_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[%offset_reverb[$category_reverb]+get_control_par(%subcat_menu
_id[$category_reverb]...
,$CONTROL_PAR_VALUE)], $reverb_slot, 1)
end on
on ui_control ($wetdry_reverb)
set_control_par_str(get_ui_id($wetdry_reverb),$CONTROL_PAR_LABEL,$wetdry
_reverb*2/10000 & " %")
if ($wetdry_reverb = 0)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_BYPASS, 1, -1, $reverb_
slot, 1)
else
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_BYPASS, 0, -1, $reverb_
slot, 1)
end if
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL, (500000-$wetdry_reve
rb), -1, $reverb_slot, 1)
_set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN, $wetdry_reverb, -1
, $reverb_slot, 1)
end on
on ui_control ($hall_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[$hall_reverb],$reverb_slot,1)
end on
on ui_control ($cathedral_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[$cathedral_reverb],$reverb_slot,1)
end on
on ui_control ($club_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[$club_reverb],$reverb_slot,1)
end on
on ui_control ($room_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[$room_reverb],$reverb_slot,1)
end on
on ui_control ($l300_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[$l300_reverb],$reverb_slot,1)
end on
on ui_control ($quadstick_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[$quadstick_reverb],$reverb_slot,1)
end on
on ui_control ($brt7_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[$brt7_reverb],$reverb_slot,1)
end on
on ui_control ($plate_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[$plate_reverb],$reverb_slot,1)
end on
on ui_control ($cabinet_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[$cabinet_reverb],$reverb_slot,1)
end on
{----------Articulation Callback Start----------}
on ui_control ($preset_articulate)
%note_ornaments[$note_articulate] := $preset_articulate
set_text ($lb_preset_articulate,!ornament_names[$preset_articulate])
set_control_par_str(get_ui_id($preset_articulate),$CONTROL_PAR_LABEL,!or
nament_names[$preset_articulate])
$speed_articulate := %time_per_note[$note_articulate-$TRIG_SWITCH_MIN]
$last_time_1 := $ENGINE_UPTIME
wait($wait_time * 1000)
if($ENGINE_UPTIME - $last_time_1 > $wait_time -5)
set_text ($lb_preset_articulate,"TYPE")
end if
end on
on ui_control ($note_articulate)
$preset_articulate := %note_ornaments[$note_articulate]
set_text ($lb_preset_articulate,!ornament_names[$preset_articulate])
set_text ($lb_note_articulate,!note_names[$note_articulate])
set_control_par_str(get_ui_id($preset_articulate),$CONTROL_PAR_LABEL,!or
nament_names[$preset_articulate])
set_control_par_str(get_ui_id($note_articulate),$CONTROL_PAR_LABEL,!note
_names[$note_articulate])
$speed_articulate := %time_per_note[$note_articulate-$TRIG_SWITCH_MIN]
$last_time_2 := $ENGINE_UPTIME
wait($wait_time * 1000)
if($ENGINE_UPTIME - $last_time_2 > $wait_time -5)
set_text ($lb_preset_articulate,"TYPE")
set_text ($lb_note_articulate,"NOTE")
end if
end on
on ui_control ($speed_articulate)
%time_per_note[$note_articulate-$TRIG_SWITCH_MIN] := $speed_articulate
set_control_par_str(get_ui_id($speed_articulate),$CONTROL_PAR_LABEL,$spe
ed_articulate & " %")
end on
{ **************************** note on ******************************}
on note
if ($onoff_articulate = 0)
exit
else
ignore_event($EVENT_ID)
if (in_range($EVENT_NOTE,$TRIG_SWITCH_MIN,$TRIG_SWITCH_MAX))
$note_articulate := $EVENT_NOTE
$preset_articulate := %note_ornaments[$note_articulate]
$speed_articulate := %time_per_note[$note_articulate-$TRIG_SWITC
H_MIN]
{if played note = active keyswitch}
if (%note_ornaments[$EVENT_NOTE] > 0)
$ornament := %note_ornaments[$EVENT_NOTE]
{get the number of held notes above the key switch area}
$count_note := 0
$a := $TRIG_SWITCH_MAX+1
while ($a < 128)
if (%pressed_id[$a] > 0)
inc ($count_note)
end if
inc($a)
end while
if ($count_note = 0) {if no note is held, it's a classic
key switch so stop}
exit
end if
else
exit
end if
fade_out(%pressed_arr[$last_note],20000,1)
{note_off (%pressed_arr[$last_note])}
wait(1)
inc($counter)
$blocker := $counter
$last_note_volume := get_event_par(%pressed_id[$last_note],$EVEN
T_PAR_VOLUME)
$last_note_tune := get_event_par(%pressed_id[$last_note],$EVENT_
PAR_TUNE)
$last_note_pan := get_event_par(%pressed_id[$last_note],$EVENT_P
AR_PAN)
select ($ornament)
case 1
$duration_1 := (($EVENT_VELOCITY-1)*(20000-40000)/(126))
+40000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$new_id := play_note($last_note - 1,$EVENT_VELOCITY,0,$d
uration_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
case 2
$duration_1 := (($EVENT_VELOCITY-1)*(20000-40000)/(126))
+40000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$new_id := play_note($last_note + 1,$EVENT_VELOCITY,0,$d
uration_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
case 3
$duration_1 := (($EVENT_VELOCITY-1)*(20000-40000)/(126))
+40000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$new_id := play_note($last_note - 2,$EVENT_VELOCITY,0,$d
uration_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
case 4
$duration_1 := (($EVENT_VELOCITY-1)*(20000-40000)/(126))
+40000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$new_id := play_note($last_note + 2,$EVENT_VELOCITY,0,$d
uration_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
case 5
$duration_1 := (($EVENT_VELOCITY-1)*(34000-70000)/(126))
+70000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$duration_2 := random($duration_1-2000,$duration_1+2000)
$new_id := play_note($last_note,$EVENT_VELOCITY,0,$durat
ion_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
$new_id := play_note($last_note - 1,$EVENT_VELOCITY,0,$d
uration_2+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_2)
case 6
$duration_1 := (($EVENT_VELOCITY-1)*(34000-70000)/(126))
+70000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$duration_2 := random($duration_1-2000,$duration_1+2000)
$new_id := play_note($last_note,$EVENT_VELOCITY,0,$durat
ion_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
$new_id := play_note($last_note - 2,$EVENT_VELOCITY,0,$d
uration_2+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_2)
case 7
$duration_1 := (($EVENT_VELOCITY-1)*(34000-70000)/(126))
+70000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$duration_2 := random($duration_1-2000,$duration_1+2000)
$new_id := play_note($last_note,$EVENT_VELOCITY,0,$durat
ion_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
$new_id := play_note($last_note + 2,$EVENT_VELOCITY,0,$d
uration_2+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_2)
case 8
$duration_1 := (($EVENT_VELOCITY-1)*(20000-40000)/(126))
+80000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$duration_2 := random($duration_1-2000,$duration_1+2000)
$new_id := play_note($last_note - 1,$EVENT_VELOCITY,0,$d
uration_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
$new_id := play_note($last_note + 1,$EVENT_VELOCITY,0,$d
uration_2+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_2)
case 9
$duration_1 := (($EVENT_VELOCITY-1)*(20000-40000)/(126))
+80000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$duration_2 := random($duration_1-2000,$duration_1+2000)
$new_id := play_note($last_note + 1,$EVENT_VELOCITY,0,$d
uration_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
$new_id := play_note($last_note - 1,$EVENT_VELOCITY,0,$d
uration_2+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_2)
case 10
$duration_1 := (($EVENT_VELOCITY-1)*(20000-40000)/(126))
+80000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$duration_2 := random($duration_1-2000,$duration_1+2000)
$duration_3 := random($duration_1-2000,$duration_1+2000)
$new_id := play_note($last_note - 1,$EVENT_VELOCITY,0,$d
uration_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
$new_id := play_note($last_note,$EVENT_VELOCITY,0,$durat
ion_2+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_2)
$new_id := play_note($last_note + 1,$EVENT_VELOCITY,0,$d
uration_3+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_3)
case 11
$duration_1 := (($EVENT_VELOCITY-1)*(20000-40000)/(126))
+80000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$duration_2 := random($duration_1-2000,$duration_1+2000)
$duration_3 := random($duration_1-2000,$duration_1+2000)
$new_id := play_note($last_note + 1,$EVENT_VELOCITY,0,$d
uration_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
$new_id := play_note($last_note,$EVENT_VELOCITY,0,$durat
ion_2+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_2)
$new_id := play_note($last_note - 1,$EVENT_VELOCITY,0,$d
uration_3+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_3)
case 12
$duration_1 := (($EVENT_VELOCITY-1)*(20000-40000)/(126))
+80000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$duration_2 := random($duration_1-2000,$duration_1+2000)
$duration_3 := random($duration_1-2000,$duration_1+2000)
$duration_4 := random($duration_1-2000,$duration_1+2000)
$new_id := play_note($last_note - 2,$EVENT_VELOCITY,0,$d
uration_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
$new_id := play_note($last_note,$EVENT_VELOCITY,0,$durat
ion_2+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_2)
$new_id := play_note($last_note - 1,$EVENT_VELOCITY,0,$d
uration_3+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_3)
$new_id := play_note($last_note + 1,$EVENT_VELOCITY,0,$d
uration_4+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_4)
end select
if(%pressed_id[$last_note] # 0 and $blocker = $counter)
%pressed_arr[$last_note] := play_note($last_note,$EVENT_
VELOCITY,0,0)
change_vol(%pressed_arr[$last_note],$last_note_volume,1)
change_tune(%pressed_arr[$last_note],$last_note_tune,1)
change_pan(%pressed_arr[$last_note],$last_note_pan,1)
end if
else
{***************************}
$last_note := $EVENT_NOTE
$last_note_volume := get_event_par($EVENT_ID,$EVENT_PAR_VOLUME)
$last_note_tune := get_event_par($EVENT_ID,$EVENT_PAR_TUNE)
$last_note_pan := get_event_par($EVENT_ID,$EVENT_PAR_PAN)
%pressed_id[$EVENT_NOTE] := $EVENT_ID
inc($counter2)
$blocker2 := $counter2
select ($ornament)
case 1
$duration_1 := (($EVENT_VELOCITY-1)*(20000-40000)/(126))
+40000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$new_id := play_note($EVENT_NOTE - 1,$EVENT_VELOCITY,0,$
duration_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
case 2
$duration_1 := (($EVENT_VELOCITY-1)*(20000-40000)/(126))
+40000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$new_id := play_note($EVENT_NOTE + 1,$EVENT_VELOCITY,0,$
duration_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
case 3
$duration_1 := (($EVENT_VELOCITY-1)*(20000-40000)/(126))
+40000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$new_id := play_note($EVENT_NOTE - 2,$EVENT_VELOCITY,0,$
duration_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
case 4
$duration_1 := (($EVENT_VELOCITY-1)*(20000-40000)/(126))
+40000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$new_id := play_note($EVENT_NOTE + 2,$EVENT_VELOCITY,0,$
duration_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
case 5
$duration_1 := (($EVENT_VELOCITY-1)*(34000-70000)/(126))
+70000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$duration_2 := random($duration_1-2000,$duration_1+2000)
$new_id := play_note($EVENT_NOTE,$EVENT_VELOCITY,0,$dura
tion_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
if($blocker2 = $counter2)
$new_id := play_note($EVENT_NOTE - 1,$EVENT_VELOCITY,0,$
duration_2+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_2)
end if
case 6
$duration_1 := (($EVENT_VELOCITY-1)*(34000-70000)/(126))
+70000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$duration_2 := random($duration_1-2000,$duration_1+2000)
$new_id := play_note($EVENT_NOTE,$EVENT_VELOCITY,0,$dura
tion_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
if($blocker2 = $counter2)
$new_id := play_note($EVENT_NOTE - 2,$EVENT_VELOCITY,0,$
duration_2+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_2)
end if
case 7
$duration_1 := (($EVENT_VELOCITY-1)*(34000-70000)/(126))
+70000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$duration_2 := random($duration_1-2000,$duration_1+2000)
$new_id := play_note($EVENT_NOTE,$EVENT_VELOCITY,0,$dura
tion_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
if($blocker2 = $counter2)
$new_id := play_note($EVENT_NOTE + 2,$EVENT_VELOCITY,0,$
duration_2+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_2)
end if
case 8
$duration_1 := (($EVENT_VELOCITY-1)*(20000-40000)/(126))
+80000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$duration_2 := random($duration_1-2000,$duration_1+2000)
$new_id := play_note($EVENT_NOTE - 1,$EVENT_VELOCITY,0,$
duration_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
if($blocker2 = $counter2)
$new_id := play_note($EVENT_NOTE + 1,$EVENT_VELOCITY,0,$
duration_2+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_2)
end if
case 9
$duration_1 := (($EVENT_VELOCITY-1)*(20000-40000)/(126))
+80000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$duration_2 := random($duration_1-2000,$duration_1+2000)
$new_id := play_note($EVENT_NOTE + 1,$EVENT_VELOCITY,0,$
duration_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
if($blocker2 = $counter2)
$new_id := play_note($EVENT_NOTE - 1,$EVENT_VELOCITY,0,$
duration_2+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_2)
end if
case 10
$duration_1 := (($EVENT_VELOCITY-1)*(20000-40000)/(126))
+80000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$duration_2 := random($duration_1-2000,$duration_1+2000)
$duration_3 := random($duration_1-2000,$duration_1+2000)
$new_id := play_note($EVENT_NOTE - 1,$EVENT_VELOCITY,0,$
duration_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
if($blocker2 = $counter2)
$new_id := play_note($EVENT_NOTE,$EVENT_VELOCITY,0,$dura
tion_2+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_2)
end if
if($blocker2 = $counter2)
$new_id := play_note($EVENT_NOTE + 1,$EVENT_VELOCITY,0,$
duration_3+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_3)
end if
case 11
$duration_1 := (($EVENT_VELOCITY-1)*(20000-40000)/(126))
+80000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$duration_2 := random($duration_1-2000,$duration_1+2000)
$duration_3 := random($duration_1-2000,$duration_1+2000)
if($blocker2 = $counter2)
$new_id := play_note($EVENT_NOTE + 1,$EVENT_VELOCITY,0,$
duration_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
end if
if($blocker2 = $counter2)
$new_id := play_note($EVENT_NOTE,$EVENT_VELOCITY,0,$dura
tion_2+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_2)
end if
if($blocker2 = $counter2)
$new_id := play_note($EVENT_NOTE - 1,$EVENT_VELOCITY,0,$
duration_3+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_3)
end if
case 12
$duration_1 := (($EVENT_VELOCITY-1)*(20000-40000)/(126))
+80000
$duration_1 := random($duration_1-5000,$duration_1+5000)
$duration_1 := $duration_1 * ($speed_articulate*100/100)
/100
$duration_2 := random($duration_1-2000,$duration_1+2000)
$duration_3 := random($duration_1-2000,$duration_1+2000)
$duration_4 := random($duration_1-2000,$duration_1+2000)
$new_id := play_note($EVENT_NOTE - 2,$EVENT_VELOCITY,0,$
duration_1+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_1)
if($blocker2 = $counter2)
$new_id := play_note($EVENT_NOTE,$EVENT_VELOCITY,0,$dura
tion_2+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_2)
end if
if($blocker2 = $counter2)
$new_id := play_note($EVENT_NOTE - 1,$EVENT_VELOCITY,0,$
duration_3+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_3)
end if
if($blocker2 = $counter2)
$new_id := play_note($EVENT_NOTE + 1,$EVENT_VELOCITY,0,$
duration_4+100)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
wait ($duration_4)
end if
end select
$new_id := play_note($EVENT_NOTE,$EVENT_VELOCITY,0,-1)
change_vol($new_id,$last_note_volume,1)
change_tune($new_id,$last_note_tune,1)
change_pan($new_id,$last_note_pan,1)
if($blocker2 = $counter2)
%pressed_arr[$last_note] := $new_id
end if
end if
end if
end on
on release
if ($onoff_articulate = 0)
exit
else
if (in_range($EVENT_NOTE,$TRIG_SWITCH_MIN,$TRIG_SWITCH_MAX))
if(%note_ornaments[$EVENT_NOTE] > 0)
$ornament := 0
end if
else
if($EVENT_ID = %pressed_id[$EVENT_NOTE] )
note_off(%pressed_arr[$EVENT_NOTE] )
%pressed_id[$EVENT_NOTE] := 0
end if
end if
end if
end on