{*********************************************** World Main (Variation 10 - Uilleann Pipes) Author: Native Instruments Written by: Adam Hanley, Nicki Marinic, Josef Natterer & Dinos Vallianatos Modified: August 9, 2009 *************************************************} on init make_perfview set_script_title("Instrument") set_ui_height_px(256) message("") declare $count declare $wait_time := 800 {Enter control label wait time} declare $last_time declare $last_time_1 declare $last_time_2 declare const $ROOT_X := 66 declare const $ROOT_Y := 2 declare const $GRID_X := 92 declare const $GRID_Y := 21 declare const $FONT_ID := 7 declare const $FONT_ID_2 := 6 declare const $CREATE_AUTOMATION_ID := 0 declare const $chanter_grp_idx := 0 declare const $release_grp_idx := 1 declare const $drones_grp_idx := 2 declare const $eq_slot := 2 declare const $reverb_slot := 3 declare $vol_env_idx $vol_env_idx := find_mod (0,"ENV_AHDSR") {----------INSTRUMENT CONTROLS START----------} {SET BACKGROUND} declare ui_label $inst_bg (1,1) set_control_par_str(get_ui_id($inst_bg),$CONTROL_PAR_PICTURE,... "pv_world_inst_control_animation") move_control_px($inst_bg, 30, 25) set_text($inst_bg,"") set_control_par(get_ui_id($inst_bg),$CONTROL_PAR_PICTURE_STATE,1) {POSITIONING OF CONTROL GROUP} declare $x_grid_instr := 3/2 {X Position of Control Group in grid} declare $y_grid_instr := 1 {Y Position of Control Group in grid} declare $x_px_instr := 35 {X Position Offset Control Group in pixel} declare $y_px_instr := 0 {Y Position Offset Control Group in pixel} {DECLARATION AND UI_IDs} declare const $NUM_INSTR := 10 {number of elements in this control group} declare ui_label $lb_solo_instr (1,1) declare ui_label $lb_sound_instr (1,1) declare ui_label $lb_rel_noise_instr (1,1) declare ui_label $lb_drone_instr (1,1) declare ui_label $lb_latch_instr (1,1) declare ui_slider $sound_instr (0, 100) declare ui_slider $rel_noise_instr (0, 1000000) declare ui_slider $drone_instr (0, 1000000) declare ui_switch $latch_instr declare ui_switch $solo_instr declare %instr_id[$NUM_INSTR] %instr_id[0] := get_ui_id($lb_solo_instr) %instr_id[1] := get_ui_id($lb_sound_instr) %instr_id[2] := get_ui_id($lb_rel_noise_instr) %instr_id[3] := get_ui_id($lb_drone_instr) %instr_id[4] := get_ui_id($lb_latch_instr) %instr_id[5] := get_ui_id($solo_instr) %instr_id[6] := get_ui_id($sound_instr) %instr_id[7] := get_ui_id($rel_noise_instr) %instr_id[8] := get_ui_id($drone_instr) %instr_id[9] := get_ui_id($latch_instr) {POSITIONING OF INDIVIDUAL CONTROLS} move_control_px($sound_instr, ($GRID_X * 2) + 38, ($GRID_Y * 4) + 0) move_control_px($rel_noise_instr, ($GRID_X * 3) + 28, ($GRID_Y * 4) + 0) move_control_px($drone_instr, ($GRID_X * 4) + 20, ($GRID_Y * 4) + 0) move_control_px($latch_instr, ($GRID_X * 5) + 17, ($GRID_Y * 4) - 4) move_control_px($solo_instr, ($GRID_X * 1) + 49, ($GRID_Y * 4) - 4) $count := 0 while ($count < 5) set_control_par(%instr_id[$count],$CONTROL_PAR_WIDTH, 100) set_control_par(%instr_id[$count],$CONTROL_PAR_HIDE, $HIDE_PART_BG) set_control_par(%instr_id[$count],$CONTROL_PAR_TEXT_ALIGNMENT, 1) set_control_par(%instr_id[$count],$CONTROL_PAR_FONT_TYPE, $FONT_ID) if ($count > 0 and $count < 4) set_control_par(%instr_id[$count],$CONTROL_PAR_POS_X,get_control_par(... %instr_id[$count+5],$CONTROL_PAR_POS_X)-29) set_control_par(%instr_id[$count],$CONTROL_PAR_POS_Y,get_control_par(... %instr_id[$count+5],$CONTROL_PAR_POS_Y)-21) else set_control_par(%instr_id[$count],$CONTROL_PAR_POS_X,get_control_par(... %instr_id[$count+5],$CONTROL_PAR_POS_X)-34) set_control_par(%instr_id[$count],$CONTROL_PAR_POS_Y,get_control_par(... %instr_id[$count+5],$CONTROL_PAR_POS_Y)-17) end if inc($count) end while {VARIOUS ATTRIBUTES} make_persistent($sound_instr) make_persistent($solo_instr) make_persistent($latch_instr) _read_persistent_var($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 $drone_instr := get_engine_par($ENGINE_PAR_VOLUME, $drones_grp_idx, -1, -1) $rel_noise_instr := get_engine_par($ENGINE_PAR_VOLUME, $release_grp_idx, -1, -1) set_text($lb_solo_instr,"SOLO") set_text($lb_sound_instr,"SOUND") set_text($lb_rel_noise_instr,"RELEASE NOISE") set_text($lb_drone_instr,"DRONE VOL") set_text($lb_latch_instr,"DRONE LATCH") $count := 6 while ($count < 9) set_control_par_str(%instr_id[$count], $CONTROL_PAR_PICTURE, "pv_world_knob_big") set_control_par(%instr_id[$count], $CONTROL_PAR_MOUSE_BEHAVIOUR, -400) inc($count) end while set_control_par_str(%instr_id[5], $CONTROL_PAR_PICTURE, "pv_world_switch_on_off") set_control_par(%instr_id[5], $CONTROL_PAR_HEIGHT, 50) set_control_par(%instr_id[5], $CONTROL_PAR_WIDTH, 32) set_control_par_str(%instr_id[5], $CONTROL_PAR_TEXT, "") set_control_par_str(%instr_id[5], $CONTROL_PAR_AUTOMATION_NAME, "Solo") set_control_par_str(%instr_id[9], $CONTROL_PAR_PICTURE, "pv_world_switch_on_off") set_control_par(%instr_id[9], $CONTROL_PAR_HEIGHT, 50) set_control_par(%instr_id[9], $CONTROL_PAR_WIDTH, 32) set_control_par_str(%instr_id[9], $CONTROL_PAR_TEXT, "") set_control_par_str(%instr_id[9], $CONTROL_PAR_AUTOMATION_NAME, "Drone") {Other} $count := 0 while ($count < $NUM_INSTR) set_control_par (%instr_id[$count],$CONTROL_PAR_POS_X,get_control_par(%instr_id[$count],$CONTROL_PAR_POS_X)... +$ROOT_X + ($x_grid_instr - 2)*$GRID_X + $x_px_instr) set_control_par (%instr_id[$count],$CONTROL_PAR_POS_Y,get_control_par(%instr_id[$count],$CONTROL_PAR_POS_Y)... +$ROOT_Y + ($y_grid_instr - 2)*$GRID_Y + $y_px_instr) inc($count) end while declare %soundeqarr[10*10] := (... {0} 183159,487305,500000, 476877,448242,500000, 942772,817383,500000,... {10} 183159,460938,500000, 476877,430664,500000, 942772,793945,333008,... {20} 183159,467773,333008, 476877,433594,500000, 942772,815430,181641,... {30} 183159,467773,333008, 476877,571289,591797, 942772,808594,194336,... {40} 183159,484375,500000, 476877,432617,417939, 942772,827148,500000,... {50} 183159,462891,600586, 476877,433594,332031, 942772,805664,569336,... {60} 183159,458008,586914, 708968,450195,332031, 942772,801758,583008,... {70} 214908,488281,171875, 693759,471680,500000, 942772,804688,500000,... {80} 45267,660156,500000, 408316, 6836,632813, 676028, 0,629688,... {90} 117792,219727,500000, 461200, 0,664063, 592848, 0,619922,... {100}211261,357422,177344, 425598, 31250,686523, 552339, 0,619922) declare %engine_par[9] := (... $ENGINE_PAR_FREQ1,$ENGINE_PAR_BW1,$ENGINE_PAR_GAIN1,... $ENGINE_PAR_FREQ2,$ENGINE_PAR_BW2,$ENGINE_PAR_GAIN2,... $ENGINE_PAR_FREQ3,$ENGINE_PAR_BW3,$ENGINE_PAR_GAIN3) declare $helper_eq declare $a_eq declare $knob_eq read_persistent_var($sound_instr) $knob_eq := ($sound_instr+10)*10 declare $index_1 declare $index_2 declare const $Mono := 0 declare %note_play[128] declare %note_id[128] declare $last_note_2 set_control_par_str(get_ui_id($sound_instr),$CONTROL_PAR_AUTOMATION_NAME,"Sound") set_control_par_str(get_ui_id($rel_noise_instr),$CONTROL_PAR_AUTOMATION_NAME,"Rel Vol") set_control_par_str(get_ui_id($drone_instr),$CONTROL_PAR_AUTOMATION_NAME,"Drone Vol") set_control_par_str(get_ui_id($sound_instr),$CONTROL_PAR_LABEL,$sound_instr & " %") set_control_par_str(get_ui_id($rel_noise_instr),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_VOLUME, $release_grp_idx, -1, -1) & " dB") set_control_par_str(get_ui_id($drone_instr),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_VOLUME, $drones_grp_idx, -1, -1) & " dB") {----------INSTRUMENT CONTROLS END----------} {----------ARTICULATION CONTROLS START----------} {POSITIONING OF CONTROL GROUP} declare $x_grid_articulate := 1 {X Position of Control Group in grid} declare $y_grid_articulate := 6 {Y Position of Control Group in grid} declare $x_px_articulate := -20 {X Position Offset Control Group in pixel} declare $y_px_articulate := 0 {Y Position Offset Control Group in pixel} {DECLARATION AND UI_IDs} declare const $NUM_OF_KEYSWITCHES := 12 {number of keyswitches} declare const $TRIG_SWITCH_MIN := 24 {MIDI note of first key switch} declare const $TRIG_SWITCH_MAX := $TRIG_SWITCH_MIN + $NUM_OF_KEYSWITCHES - 1 declare const $NUM_ART := 7 {number of elements in this control group} declare ui_label $lb_preset_articulate (1,1) declare ui_label $lb_note_articulate (1,1) declare ui_label $lb_speed_articulate (1,1) declare ui_switch $onoff_articulate declare ui_slider $preset_articulate (0,12) declare ui_slider $note_articulate ($TRIG_SWITCH_MIN,$TRIG_SWITCH_MAX) declare ui_slider $speed_articulate (1,200) declare %articulate_id[$NUM_ART] %articulate_id[0] := get_ui_id($lb_preset_articulate) %articulate_id[1] := get_ui_id($lb_note_articulate) %articulate_id[2] := get_ui_id($lb_speed_articulate) %articulate_id[3] := get_ui_id($onoff_articulate) %articulate_id[4] := get_ui_id($preset_articulate) %articulate_id[5] := get_ui_id($note_articulate) %articulate_id[6] := get_ui_id($speed_articulate) {change text} set_text($lb_preset_articulate,"TYPE") set_text($lb_note_articulate,"NOTE") set_text($lb_speed_articulate,"SPEED") {Positioning} move_control_px($onoff_articulate,($GRID_X)+21,(4*$GRID_Y)-7) move_control_px($note_articulate,($GRID_X*2)+9,84) move_control_px($preset_articulate,($GRID_X*3)+3,84) move_control_px($speed_articulate,($GRID_X*4)-6,84) $count := 0 while ($count < 3) set_control_par(%articulate_id[$count],$CONTROL_PAR_WIDTH,110) set_control_par(%articulate_id[$count],$CONTROL_PAR_HIDE,$HIDE_PART_BG) set_control_par(%articulate_id[$count],$CONTROL_PAR_TEXT_ALIGNMENT,1) set_control_par(%articulate_id[$count],$CONTROL_PAR_FONT_TYPE,$FONT_ID) set_control_par(%articulate_id[$count],$CONTROL_PAR_POS_X, get_control_par... (%articulate_id[$count+4],$CONTROL_PAR_POS_X) - 38) set_control_par(%articulate_id[$count],$CONTROL_PAR_POS_Y, get_control_par... (%articulate_id[$count+4],$CONTROL_PAR_POS_Y) - 16) inc($count) end while {Skinning and resizing} $count := 4 while ($count < 7) set_control_par_str(%articulate_id[$count],$CONTROL_PAR_PICTURE,"pv_world_knob_small") set_control_par(%articulate_id[$count],$CONTROL_PAR_MOUSE_BEHAVIOUR,-400) inc($count) end while set_control_par_str(%articulate_id[3],$CONTROL_PAR_PICTURE,"pv_world_switch_on_off") set_control_par(%articulate_id[3],$CONTROL_PAR_HEIGHT,50) set_control_par(%articulate_id[3],$CONTROL_PAR_WIDTH,32) set_control_par_str(%articulate_id[3],$CONTROL_PAR_TEXT,"") set_control_par_str(%articulate_id[3],$CONTROL_PAR_AUTOMATION_NAME,"Articulation") set_control_par_str(get_ui_id($note_articulate),$CONTROL_PAR_AUTOMATION_NAME,"Note") set_control_par_str(get_ui_id($preset_articulate),$CONTROL_PAR_AUTOMATION_NAME,"Type") set_control_par_str(get_ui_id($speed_articulate),$CONTROL_PAR_AUTOMATION_NAME,"Speed") $count := 0 while ($count < $NUM_ART) set_control_par (%articulate_id[$count],$CONTROL_PAR_POS_X,... get_control_par(%articulate_id[$count],$CONTROL_PAR_POS_X)... +$ROOT_X + ($x_grid_articulate - 2)*$GRID_X + $x_px_articulate) set_control_par (%articulate_id[$count],$CONTROL_PAR_POS_Y,... get_control_par(%articulate_id[$count],$CONTROL_PAR_POS_Y)... +$ROOT_Y + ($y_grid_articulate - 2)*$GRID_Y + $y_px_articulate) inc($count) end while {Functionality} make_persistent($onoff_articulate) 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 !ornament_names[13] !ornament_names[0] := "Off" !ornament_names[1] := "Lower Grace 1" !ornament_names[2] := "Upper Grace 1" !ornament_names[3] := "Lower Grace 2" !ornament_names[4] := "Upper Grace 2" !ornament_names[5] := "Lower Mordent 1" !ornament_names[6] := "Lower Mordent 2" !ornament_names[7] := "Upper Mordent" !ornament_names[8] := "Lower Flip" !ornament_names[9] := "Upper Flip" !ornament_names[10] := "Lower Turn" !ornament_names[11] := "Upper Turn" !ornament_names[12] := "Group" declare !note_names [128] $count := 0 while ($count < 128) !note_names[$count] := !note_class[$count mod 12] & (($count/12)-2) inc ($count) end while $note_articulate := $TRIG_SWITCH_MIN make_persistent ($note_articulate) $preset_articulate := 1 make_persistent ($preset_articulate) set_control_par(get_ui_id($speed_articulate), $CONTROL_PAR_DEFAULT_VALUE, 100) $speed_articulate := 100 make_persistent ($speed_articulate) 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,!ornament_names[$preset_articulate]) set_control_par_str(get_ui_id($speed_articulate),$CONTROL_PAR_LABEL,$speed_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 group} 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_reverb_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, $FONT_ID_2) set_control_par(%reverb_id[$count], $CONTROL_PAR_WIDTH, 92) set_control_par_str(%reverb_id[$count], $CONTROL_PAR_PICTURE, "pv_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/<<>>/K4 IR Samples/Concert Hall A.wav" !ir_path[1] := "presets/effects/convolution/<<>>/K4 IR Samples/Concert Hall B.wav" !ir_path[2] := "presets/effects/convolution/<<>>/K4 IR Samples/Exhibition Hall.wav" !ir_path[3] := "presets/effects/convolution/<<>>/K4 IR Samples/Cathedral A.wav" !ir_path[4] := "presets/effects/convolution/<<>>/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/<<>>/K4 IR Samples/Club A.wav" !ir_path[7] := "presets/effects/convolution/<<>>/K4 IR Samples/Club B.wav" !ir_path[8] := "presets/effects/convolution/<<>>/K4 IR Samples/Tavern Close.wav" !ir_path[9] := "presets/effects/convolution/<<>>/K4 IR Samples/Tavern Near.wav" !ir_path[10] := "presets/effects/convolution/<<>>/K4 IR Samples/Tavern Medium.wav" !ir_path[11] := "presets/effects/convolution/<<>>/K4 IR Samples/Tavern Far.wav" !ir_path[12] := "presets/effects/convolution/<<>>/K4 IR Samples/Auditorium A.wav" !ir_path[13] := "presets/effects/convolution/<<>>/K4 IR Samples/Auditorium B.wav" !ir_path[14] := "presets/effects/convolution/<<>>/K4 IR Samples/Chamber A.wav" !ir_path[15] := "presets/effects/convolution/<<>>/K4 IR Samples/Chamber B.wav" !ir_path[16] := "presets/effects/convolution/<<>>/K4 IR Samples/Rehearsal Room.wav" !ir_path[17] := "presets/effects/convolution/<<>>/K4 IR Samples/Hard Wood Room B.wav" !ir_path[18] := "presets/effects/convolution/<<>>/K4 IR Samples/Music Studio C.wav" !ir_path[19] := "presets/effects/convolution/<<>>/K4 IR Samples/Small Room A.wav" !ir_path[20] := "presets/effects/convolution/<<>>/K4 IR Samples/Small Room B.wav" !ir_path[21] := "presets/effects/convolution/<<>>/K4 IR Samples/L300 Large Hall.wav" !ir_path[22] := "presets/effects/convolution/<<>>/K4 IR Samples/L300 Gated Hall.wav" !ir_path[23] := "presets/effects/convolution/<<>>/K4 IR Samples/L300 Large Room.wav" !ir_path[24] := "presets/effects/convolution/<<>>/K4 IR Samples/L300 Large Chamber.wav" !ir_path[25] := "presets/effects/convolution/<<>>/K4 IR Samples/L300 Studio C.wav" !ir_path[26] := "presets/effects/convolution/<<>>/K4 IR Samples/L300 Contem-Plate.wav" !ir_path[27] := "presets/effects/convolution/<<>>/K4 IR Samples/L300 Space & Echoes.wav" !ir_path[28] := "presets/effects/convolution/<<>>/K4 IR Samples/L300 Medium Stop.wav" !ir_path[29] := "presets/effects/convolution/<<>>/K4 IR Samples/L300 Drum Cave.wav" !ir_path[30] := "presets/effects/convolution/<<>>/K4 IR Samples/L300 Large Ambience.wav" !ir_path[31] := "presets/effects/convolution/<<>>/K4 IR Samples/L300 Smooth Ambience.wav" !ir_path[32] := "presets/effects/convolution/<<>>/K4 IR Samples/L300 Ambience Wave.wav" !ir_path[33] := "presets/effects/convolution/<<>>/K4 IR Samples/L300 Le Gate.wav" !ir_path[34] := "presets/effects/convolution/<<>>/K4 IR Samples/Quadstick Small - Basic.wav" !ir_path[35] := "presets/effects/convolution/<<>>/K4 IR Samples/Quadstick Small - Disco.wav" !ir_path[36] := "presets/effects/convolution/<<>>/K4 IR Samples/Quadstick Small - Funk.wav" !ir_path[37] := "presets/effects/convolution/<<>>/K4 IR Samples/Quadstick Small - Funky Club.wav" !ir_path[38] := "presets/effects/convolution/<<>>/K4 IR Samples/Quadstick Small - Hip Hop.wav" !ir_path[39] := "presets/effects/convolution/<<>>/K4 IR Samples/Quadstick Small - Reggae Modern.wav" !ir_path[40] := "presets/effects/convolution/<<>>/K4 IR Samples/Quadstick Small - RnB Neptunes.wav" !ir_path[41] := "presets/effects/convolution/<<>>/K4 IR Samples/Quadstick Small - RnB Today 1.wav" !ir_path[42] := "presets/effects/convolution/<<>>/K4 IR Samples/BRT 7 Ambience Large A.wav" !ir_path[43] := "presets/effects/convolution/<<>>/K4 IR Samples/BRT 7 Ambience Small.wav" !ir_path[44] := "presets/effects/convolution/<<>>/K4 IR Samples/BRT 7 Chamber Small.wav" !ir_path[45] := "presets/effects/convolution/<<>>/K4 IR Samples/BRT 7 Chamber Vocal.wav" !ir_path[46] := "presets/effects/convolution/<<>>/K4 IR Samples/BRT 7 Hall Dense.wav" !ir_path[47] := "presets/effects/convolution/<<>>/K4 IR Samples/BRT 7 Location Chapel A.wav" !ir_path[48] := "presets/effects/convolution/<<>>/K4 IR Samples/BRT 7 Plate Snare.wav" !ir_path[49] := "presets/effects/convolution/<<>>/K4 IR Samples/BRT 7 Room Drum.wav" !ir_path[50] := "presets/effects/convolution/<<>>/K4 IR Samples/BRT 7 Room Wood.wav" !ir_path[51] := "presets/effects/convolution/<<>>/K4 IR Samples/BRT 7 Location Cineastic Room.wav" !ir_path[52] := "presets/effects/convolution/<<>>/K4 IR Samples/E245 0.5s A.wav" !ir_path[53] := "presets/effects/convolution/<<>>/K4 IR Samples/E245 1.0s A.wav" !ir_path[54] := "presets/effects/convolution/<<>>/K4 IR Samples/E245 1.4s A.wav" !ir_path[55] := "presets/effects/convolution/<<>>/K4 IR Samples/E245 2.1s A.wav" !ir_path[56] := "presets/effects/convolution/<<>>/K4 IR Samples/E245 4.5s A.wav" !ir_path[57] := "presets/effects/convolution/<<>>/K4 IR Samples/E252 0.6s.wav" !ir_path[58] := "presets/effects/convolution/<<>>/K4 IR Samples/E252 1.0s.wav" !ir_path[59] := "presets/effects/convolution/<<>>/K4 IR Samples/E252 1.8s.wav" !ir_path[60] := "presets/effects/convolution/<<>>/K4 IR Samples/E252 3.0s.wav" !ir_path[61] := "presets/effects/convolution/<<>>/K4 IR Samples/E252 4.5s.wav" !ir_path[62] := "presets/effects/convolution/17 Cabinets/Brit 212/IR Samples/Brit_212_Tube_Center.wav" !ir_path[63] := "presets/effects/convolution/17 Cabinets/Tweed 112/IR Samples/Tweed_112_Tube_Center.wav" !ir_path[64] := "presets/effects/convolution/17 Cabinets/Tweed 212/IR Samples/Tweed_212_Tube_Center.wav" !ir_path[65] := "presets/effects/convolution/17 Cabinets/Tweed 410/IR Samples/Tweed_410_Tube_Center.wav" !ir_path[66] := "presets/effects/convolution/17 Cabinets/Rock 412/IR Samples/Rock_412_Tube_Center.wav" !ir_path[67] := "presets/effects/convolution/17 Cabinets/Modern 412/IR Samples/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 Room" !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 Ambience" !ir_type[31] := "Smooth Ambience" !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[$count],$count) else if ($count < 21) add_menu_item($room_reverb,!ir_type[$count],$count) else if ($count < 34) add_menu_item($l300_reverb,!ir_type[$count],$count) else if($count < 42) add_menu_item($quadstick_reverb,!ir_type[$count],$count) else if ($count < 52) add_menu_item($brt7_reverb,!ir_type[$count],$count) else if ($count < 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_HIDE,$HIDE_PART_NOTHING) else set_control_par(%subcat_menu_id[$count],$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL) end if inc ($count) end while set_control_par(get_ui_id($image_reverb),$CONTROL_PAR_PICTURE_STATE,$category_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_control_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_control_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_NAME,"Rv 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 of EQ settings.") set_control_help($rel_noise_instr,"Release Noise: Sets the level of the release samples.") set_control_help($drone_instr,"Noise: Sets the level of th drones (C1 - C3).") set_control_help($latch_instr,"Drone Latch: If activated, notes played in the drone range (C1 - C3) will contrinue playing after the key is released.") set_control_help($onoff_articulate,"Articulation: Turns the dynamic 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 articulation 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 performance spaces.") set_control_help($cathedral_reverb, "Cathedral: A mix of real and 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 performance 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 from the classic studio digital reverb.") set_control_help($plate_reverb, "Plate: Impulse responses from classic plate reverb effect units.") set_control_help($quadstick_reverb, "Quadstick: Impulse responses taken from the classic studio digital reverb.") set_control_help($brt7_reverb, "BRT 7: Impulse responses taken from 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_AUTOMATION_ID,1) set_control_par(get_ui_id($drone_instr),$CONTROL_PAR_AUTOMATION_ID,2) set_control_par(get_ui_id($latch_instr),$CONTROL_PAR_AUTOMATION_ID,9) set_control_par(get_ui_id($solo_instr),$CONTROL_PAR_AUTOMATION_ID,8) set_control_par(get_ui_id($note_articulate),$CONTROL_PAR_AUTOMATION_ID,5) set_control_par(get_ui_id($preset_articulate),$CONTROL_PAR_AUTOMATION_ID,6) set_control_par(get_ui_id($speed_articulate),$CONTROL_PAR_AUTOMATION_ID,7) set_control_par(get_ui_id($onoff_articulate),$CONTROL_PAR_AUTOMATION_ID,13) set_control_par(get_ui_id($wetdry_reverb),$CONTROL_PAR_AUTOMATION_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_instr & " %") $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_engine_par_disp($ENGINE_PAR_VOLUME, $release_grp_idx, -1, -1) & " dB") end on on ui_control ($drone_instr) set_engine_par($ENGINE_PAR_VOLUME,$drone_instr,$drones_grp_idx,-1,-1) set_control_par_str(get_ui_id($drone_instr),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_VOLUME, $drones_grp_idx, -1, -1) & " dB") end on on ui_control ($latch_instr) if ($latch_instr = 0) note_off ($ALL_EVENTS) $count := 0 while ($count < 128) %note_play[$count] := 0 inc ($count) end while end if 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_HIDE,$HIDE_PART_NOTHING) else set_control_par(%subcat_menu_id[$count],$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL) end if inc ($count) end while set_control_par(get_ui_id($image_reverb),$CONTROL_PAR_PICTURE_STATE,$category_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_reverb), -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,!ornament_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,!ornament_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,$speed_articulate & " %") end on { **************************** note on ******************************} on note if (in_range($EVENT_NOTE,36,60) and $latch_instr = 1) ignore_event($EVENT_ID) if ($Mono = 1) if(%note_play[$EVENT_NOTE] = 1 and $EVENT_NOTE = $last_note_2) note_off(%note_id[$EVENT_NOTE]) %note_play[$EVENT_NOTE] := 0 else if (%note_play[$last_note_2] = 1 and $EVENT_NOTE # $last_note_2) note_off(%note_id[$last_note_2]) %note_play[$last_note_2] := 0 end if %note_id[$EVENT_NOTE] := play_note($EVENT_NOTE,$EVENT_VELOCITY,0,0) %note_play[$EVENT_NOTE] := 1 $last_note_2 := $EVENT_NOTE end if else if(%note_play[$EVENT_NOTE] = 1) {is the note still playing?} note_off(%note_id[$EVENT_NOTE]) %note_play[$EVENT_NOTE] := 0 else %note_id[$EVENT_NOTE] := play_note($EVENT_NOTE,$EVENT_VELOCITY,0,0) %note_play[$EVENT_NOTE] := 1 end if end if end if if ($onoff_articulate = 0) exit else if (in_range($EVENT_NOTE,$TRIG_SWITCH_MIN,$TRIG_SWITCH_MAX)) ignore_event($EVENT_ID) $note_articulate := $EVENT_NOTE $preset_articulate := %note_ornaments[$note_articulate] $speed_articulate := %time_per_note[$note_articulate-$TRIG_SWITCH_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],$EVENT_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_PAR_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,$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($last_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($last_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($last_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($last_note,$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) $new_id := play_note($last_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) 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,$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) $new_id := play_note($last_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) 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,$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) $new_id := play_note($last_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) 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,$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) $new_id := play_note($last_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) 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,$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) $new_id := play_note($last_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) 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,$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) $new_id := play_note($last_note,$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) $new_id := play_note($last_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) 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,$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) $new_id := play_note($last_note,$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) $new_id := play_note($last_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) 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,$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) $new_id := play_note($last_note,$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) $new_id := play_note($last_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) $new_id := play_note($last_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 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 {***************************} if ($EVENT_NOTE>60) ignore_event($EVENT_ID) $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,$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 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,$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 - 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,$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 + 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,$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 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,$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 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,$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 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 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