{*********************************************** Kontakt 4 Factory Library - Instrument Synth Drums Author: Native Instruments Written by: Adam Hanley, Dinos Vallianatos Modified: August 9th, 2009 *************************************************} on init message("") make_perfview set_ui_height_px(296) declare const $ROOT_X := 66 declare const $ROOT_Y := 2 declare const $GRID_X := 92 declare const $GRID_Y := 21 declare const $FONT_ID := 2 {the font id for all visible labels} declare const $FONT_ID_2 := 3 {the font id for all the menus} declare const $CREATE_AUTOMATION_ID := 0 declare $wait_time := 800 {Enter control label wait time} declare $last_time declare const $meq_slot := 6 declare const $send_slot := 7 declare const $delay_slot := 1 declare const $reverb_slot := 0 declare const $lp_slot := 1 declare const $sound_eq_slot := 4 declare const $DRUM_INSTR := 25 {Enter number of drum instruments} declare $count declare !note_class[12] !note_class[0] := "C" !note_class[1] := "Db" !note_class[2] := "D" !note_class[3] := "Eb" !note_class[4] := "E" !note_class[5] := "F" !note_class[6] := "Gb" !note_class[7] := "G" !note_class[8] := "Ab" !note_class[9] := "A" !note_class[10] := "Bb" !note_class[11] := "B" declare !note_names [128] $count := 0 while ($count < 128) !note_names[$count] := !note_class[$count mod 12] & (($count/12)-2) inc ($count) end while declare $selected_group {----------VOICING START----------} declare const $NUM_VOICING := 14 declare ui_switch $sel_by_midi declare ui_menu $instr_menu_voicing declare ui_slider $note_voicing (35, 35 + $DRUM_INSTR - 1) declare ui_slider $level_voicing (0,1000000) declare ui_slider $pan_voicing (0,1000000) declare ui_slider $tune_voicing (0,1000000) declare ui_slider $sound_voicing (0,100) declare ui_label $lb_sel_by_midi (1,1) declare ui_label $lb_instr_menu_voicing (1,1) declare ui_label $lb_note_voicing (1,1) declare ui_label $lb_level_voicing (1,1) declare ui_label $lb_pan_voicing (1,1) declare ui_label $lb_tune_voicing (1,1) declare ui_label $lb_sound_voicing (1,1) declare %voicing_id[$NUM_VOICING] %voicing_id[0] := get_ui_id($sel_by_midi) %voicing_id[1] := get_ui_id($instr_menu_voicing) %voicing_id[2] := get_ui_id($note_voicing) %voicing_id[3] := get_ui_id($level_voicing) %voicing_id[4] := get_ui_id($pan_voicing) %voicing_id[5] := get_ui_id($tune_voicing) %voicing_id[6] := get_ui_id($sound_voicing) %voicing_id[7] := get_ui_id($lb_sel_by_midi) %voicing_id[8] := get_ui_id($lb_instr_menu_voicing) %voicing_id[9] := get_ui_id($lb_note_voicing) %voicing_id[10] := get_ui_id($lb_level_voicing) %voicing_id[11] := get_ui_id($lb_pan_voicing) %voicing_id[12] := get_ui_id($lb_tune_voicing) %voicing_id[13] := get_ui_id($lb_sound_voicing) {Set Text} set_text($lb_sel_by_midi,"SEL BY MIDI") set_text($lb_note_voicing,"NOTE") set_text($lb_instr_menu_voicing,"SELECTED INSTRUMENT") set_control_par(%voicing_id[8], $CONTROL_PAR_WIDTH, 160) set_text($lb_level_voicing,"LEVEL") set_text($lb_pan_voicing,"PAN") set_text($lb_tune_voicing,"TUNE") set_text($lb_sound_voicing,"SOUND") set_control_par_str(%voicing_id[0],$CONTROL_PAR_TEXT," ") $count := 0 while ($count < $DRUM_INSTR) add_menu_item($instr_menu_voicing,group_name($count),$count) inc($count) end while {Add Help} set_control_help ($instr_menu_voicing,... "Instrument Display: Displays the name of the selected drum instrument.") set_control_help ($level_voicing,"Level: Sets the volume of the selected drum instrument.") set_control_help ($pan_voicing,"Pan: Sets the pan position of the selected drum instrument.") set_control_help ($tune_voicing,"Tune: Sets the tuning of the selected drum instrument.") set_control_help ($sound_voicing,"Sound: Morphs through EQ settings for the selected drum instrument.") set_control_help ($sel_by_midi,... "Select by MIDI: Selects the displayed drum instrument's settings by incoming notes") set_control_help ($note_voicing,"Note: Displays the note number of the selected drum instrument.") {Place and Skin Controls} move_control_px ($note_voicing,($GRID_X*3)+90,($GRID_Y * 2)+15) move_control_px ($sel_by_midi,($GRID_X*4)+70,($GRID_Y * 2)+15) move_control_px ($instr_menu_voicing,($GRID_X*2)+47,($GRID_Y * 3)+3) move_control_px ($level_voicing,($GRID_X*2)+43,($GRID_Y * 5)+14) move_control_px ($pan_voicing,($GRID_X*3)+21,($GRID_Y * 5)+14) move_control_px ($tune_voicing,($GRID_X*3)+90,($GRID_Y * 5)+14) move_control_px ($sound_voicing,($GRID_X*4)+68,($GRID_Y * 5)+14) $count := 2 while ($count < 7) set_control_par_str (%voicing_id[$count],$CONTROL_PAR_PICTURE,"pv_synth_knob_red") set_control_par (%voicing_id[$count],$CONTROL_PAR_MOUSE_BEHAVIOUR,-500) inc($count) end while set_control_par_str (%voicing_id[0],$CONTROL_PAR_PICTURE,"pv_synth_button_big") set_control_par (%voicing_id[0],$CONTROL_PAR_HEIGHT, 31) set_control_par (%voicing_id[0],$CONTROL_PAR_WIDTH, 31) set_control_par_str(%voicing_id[1],$CONTROL_PAR_PICTURE,"pv_synth_dropdown") $count := 7 while ($count < 14) set_control_par(%voicing_id[$count],$CONTROL_PAR_POS_X,... get_control_par(%voicing_id[$count-7],$CONTROL_PAR_POS_X)-25) set_control_par(%voicing_id[$count],$CONTROL_PAR_POS_Y,... get_control_par(%voicing_id[$count-7],$CONTROL_PAR_POS_Y)+31) set_control_par(%voicing_id[$count],$CONTROL_PAR_HIDE,$HIDE_PART_BG) set_control_par(%voicing_id[$count], $CONTROL_PAR_TEXT_ALIGNMENT, 1) set_control_par(%voicing_id[$count], $CONTROL_PAR_FONT_TYPE, $FONT_ID) inc($count) end while set_control_par(%voicing_id[8],$CONTROL_PAR_POS_Y,... get_control_par(%voicing_id[8],$CONTROL_PAR_POS_Y)-9) {Set Controls} set_control_par(%voicing_id[3], $CONTROL_PAR_DEFAULT_VALUE, 631000) set_control_par(%voicing_id[4], $CONTROL_PAR_DEFAULT_VALUE, 500000) set_control_par(%voicing_id[5], $CONTROL_PAR_DEFAULT_VALUE, 500000) $note_voicing := 35 $sel_by_midi := 1 $instr_menu_voicing := $note_voicing - 35 $selected_group := $note_voicing - 35 $level_voicing := _get_engine_par($ENGINE_PAR_VOLUME,$selected_group,-1,-1) $tune_voicing := _get_engine_par($ENGINE_PAR_TUNE,$selected_group,-1,-1) $pan_voicing := _get_engine_par($ENGINE_PAR_PAN,$selected_group,-1,-1) {Sound Control Elements} declare %soundeqarr[10*10] := (... {0 } 500000,500000,500000, 500000,500000,500000, 500000, 500000,500000,... {1 } 365637, 62500,700000, 620113, 62500,500000, 1000000,1000000, 0,... {2 } 83984,326172,200195, 405273,128906,589844, 1000000,1000000,181641,... {3 } 245117,416016,266602, 632813,207031,625977, 862305, 173828,661133,... {4 } 515625, 0,704102, 447266, 0,169922, 706055, 0,714844,... {5 } 870117,586914,715820, 333008,360352,272461, 856445, 0,192383,... {6 } 648438,586914,757813, 266602,360352,165039, 670898, 0,132813,... {7 } 376953, 0, 39062, 555664, 0,578125, 796875, 144531,623047,... {8 } 172852,660156, 0, 699219, 6836,692383, 407227, 0,778320,... {9 } 233398,219727,583984, 533203,250000,355469, 633789, 639648,601563,... {10} 137695,357422,362305, 491211,250000,571289, 832031, 417969,463867) make_persistent(%soundeqarr) 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 declare %sound_group[$DRUM_INSTR] make_persistent(%sound_group) _read_persistent_var(%sound_group) $sound_voicing := %sound_group[$selected_group] $knob_eq := ($sound_voicing+10)*10 declare $index_1 declare $index_2 set_control_par_str(get_ui_id($note_voicing),$CONTROL_PAR_AUTOMATION_NAME,"Note") set_control_par_str(get_ui_id($sel_by_midi),$CONTROL_PAR_AUTOMATION_NAME,"Midi") set_control_par_str(get_ui_id($level_voicing),$CONTROL_PAR_AUTOMATION_NAME,"Volume") set_control_par_str(get_ui_id($pan_voicing),$CONTROL_PAR_AUTOMATION_NAME,"Pan") set_control_par_str(get_ui_id($tune_voicing),$CONTROL_PAR_AUTOMATION_NAME,"Tune") set_control_par_str(get_ui_id($sound_voicing),$CONTROL_PAR_AUTOMATION_NAME,"Sound") if (($note_voicing > 24) and ($note_voicing < 36)) set_control_par_str(get_ui_id($note_voicing),$CONTROL_PAR_LABEL,"C0 - B0") else set_control_par_str(get_ui_id($note_voicing),$CONTROL_PAR_LABEL,!note_names[$note_voicing]) end if set_control_par_str(get_ui_id($level_voicing),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_VOLUME,$selected_group,-1,-1) & " dB") set_control_par_str(get_ui_id($pan_voicing),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_PAN,$selected_group,-1,-1)) set_control_par_str(get_ui_id($tune_voicing),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_TUNE,$selected_group,-1,-1) & " st") set_control_par_str(get_ui_id($sound_voicing),$CONTROL_PAR_LABEL,$sound_voicing & " %") {----------VOICING END----------} {----------VOL ENV START----------} declare const $NUM_ENV := 6 declare $env_idx $env_idx := find_mod(0,"VOL_ENV") declare ui_slider $attack_env (0,1000000) declare ui_slider $hold_env (0,1000000) declare ui_slider $decay_env (0,1000000) declare ui_label $lb_attack_env (1,1) declare ui_label $lb_hold_env (1,1) declare ui_label $lb_decay_env (1,1) declare %env_id[$NUM_ENV] %env_id[0] := get_ui_id($attack_env) %env_id[1] := get_ui_id($hold_env) %env_id[2] := get_ui_id($decay_env) %env_id[3] := get_ui_id($lb_attack_env) %env_id[4] := get_ui_id($lb_hold_env) %env_id[5] := get_ui_id($lb_decay_env) move_control_px($attack_env,$GRID_X-44,($GRID_Y*10)+15) move_control_px($hold_env,($GRID_X*1)+46,($GRID_Y*10)+15) move_control_px($decay_env,($GRID_X*2)+43,($GRID_Y*10)+15) set_text($lb_attack_env,"ATTACK") set_text($lb_hold_env,"HOLD") set_text($lb_decay_env,"DECAY") $count := 0 while($count<3) set_control_par(%env_id[$count],$CONTROL_PAR_MOUSE_BEHAVIOUR,-500) set_control_par_str(%env_id[$count],$CONTROL_PAR_PICTURE,"pv_synth_knob_white") inc($count) end while set_control_par(get_ui_id($attack_env),$CONTROL_PAR_DEFAULT_VALUE,0) set_control_par(get_ui_id($hold_env),$CONTROL_PAR_DEFAULT_VALUE,500000) set_control_par(get_ui_id($decay_env),$CONTROL_PAR_DEFAULT_VALUE,1000000) $count := 3 while($count< 6) set_control_par(%env_id[$count], $CONTROL_PAR_HIDE, $HIDE_PART_BG) set_control_par(%env_id[$count], $CONTROL_PAR_POS_X,... get_control_par(%env_id[$count-3],$CONTROL_PAR_POS_X)-25) set_control_par(%env_id[$count], $CONTROL_PAR_POS_Y,... get_control_par(%env_id[$count-3],$CONTROL_PAR_POS_Y)+31) set_control_par(%env_id[$count], $CONTROL_PAR_TEXT_ALIGNMENT, 1) set_control_par(%env_id[$count], $CONTROL_PAR_FONT_TYPE, $FONT_ID) inc($count) end while $attack_env := _get_engine_par($ENGINE_PAR_ATTACK,$selected_group,$env_idx,-1) $hold_env := _get_engine_par($ENGINE_PAR_HOLD,$selected_group,$env_idx,-1) $decay_env := _get_engine_par($ENGINE_PAR_DECAY,$selected_group,$env_idx,-1) set_control_par_str(get_ui_id($attack_env),$CONTROL_PAR_AUTOMATION_NAME,"Attack") set_control_par_str(get_ui_id($hold_env),$CONTROL_PAR_AUTOMATION_NAME,"Hold") set_control_par_str(get_ui_id($decay_env),$CONTROL_PAR_AUTOMATION_NAME,"Decay") set_control_par_str(get_ui_id($attack_env),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_ATTACK,$selected_group,$env_idx,-1) & " ms") set_control_par_str(get_ui_id($hold_env),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_HOLD,$selected_group,$env_idx,-1) & " ms") set_control_par_str(get_ui_id($decay_env),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_DECAY,$selected_group,$env_idx,-1) & " ms") {----------VOL ENV END----------} {----------FLT START-----------} declare const $NUM_FLT := 8 declare ui_label $lb_cutoff_flt (1,1) declare ui_label $lb_reso_flt (1,1) declare ui_label $lb_vel_flt (1,1) declare ui_label $lb_onoff_flt (1,1) declare ui_slider $cutoff_flt (0, 1000000) declare ui_slider $reso_flt (0, 1000000) declare ui_slider $vel_flt (0, 1000000) declare ui_switch $onoff_flt declare %flt_id[$NUM_FLT] %flt_id[0] := get_ui_id($lb_cutoff_flt) %flt_id[1] := get_ui_id($lb_reso_flt) %flt_id[2] := get_ui_id($lb_vel_flt) %flt_id[3] := get_ui_id($lb_onoff_flt) %flt_id[4] := get_ui_id($cutoff_flt) %flt_id[5] := get_ui_id($reso_flt) %flt_id[6] := get_ui_id($vel_flt) %flt_id[7] := get_ui_id($onoff_flt) move_control_px($cutoff_flt, $GRID_X-44, ($GRID_Y * 3)-6) move_control_px($reso_flt, $GRID_X+25, ($GRID_Y * 3)-6) move_control_px($vel_flt, $GRID_X-44, ($GRID_Y * 6)-7) move_control_px($onoff_flt, $GRID_X+28, ($GRID_Y * 5)+15) set_text($lb_cutoff_flt, "CUTOFF") set_text($lb_reso_flt, "RESO") set_text($lb_vel_flt, "VEL SENS") set_text($lb_onoff_flt, "ON/OFF") set_control_par(%flt_id[4], $CONTROL_PAR_DEFAULT_VALUE, 1000000) $count := 0 while ($count < 4) set_control_par(%flt_id[$count], $CONTROL_PAR_HIDE, $HIDE_PART_BG) set_control_par(%flt_id[$count], $CONTROL_PAR_POS_X,... get_control_par(%flt_id[$count+4],$CONTROL_PAR_POS_X)-25) set_control_par(%flt_id[$count], $CONTROL_PAR_POS_Y,... get_control_par(%flt_id[$count+4],$CONTROL_PAR_POS_Y)+31) set_control_par(%flt_id[$count], $CONTROL_PAR_TEXT_ALIGNMENT, 1) set_control_par(%flt_id[$count], $CONTROL_PAR_FONT_TYPE, $FONT_ID) inc($count) end while $count := 4 while ($count < 7) set_control_par(%flt_id[$count], $CONTROL_PAR_MOUSE_BEHAVIOUR, -500) set_control_par_str(%flt_id[$count], $CONTROL_PAR_PICTURE, "pv_synth_knob_red") inc($count) end while set_control_par_str(%flt_id[6], $CONTROL_PAR_PICTURE, "pv_synth_knob_orange") set_control_par_str(%flt_id[7], $CONTROL_PAR_PICTURE, "pv_synth_button_big") set_control_par(%flt_id[7], $CONTROL_PAR_HEIGHT, 31) set_control_par(%flt_id[7], $CONTROL_PAR_WIDTH, 31) set_control_par_str(%flt_id[7], $CONTROL_PAR_TEXT, "") $cutoff_flt := _get_engine_par($ENGINE_PAR_CUTOFF,$selected_group, $lp_slot,-1) $reso_flt := _get_engine_par($ENGINE_PAR_RESONANCE,$selected_group, $lp_slot,-1) $vel_flt := _get_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY, $selected_group,... find_mod($selected_group, "VEL_CUTOFF"), -1) $onoff_flt := (_get_engine_par($ENGINE_PAR_EFFECT_BYPASS,$selected_group, $lp_slot,-1) + 1) mod 2 set_control_par_str(get_ui_id($cutoff_flt),$CONTROL_PAR_AUTOMATION_NAME,"Cutoff") set_control_par_str(get_ui_id($reso_flt),$CONTROL_PAR_AUTOMATION_NAME,"Reso") set_control_par_str(get_ui_id($vel_flt),$CONTROL_PAR_AUTOMATION_NAME,"Vel Sens") set_control_par_str(get_ui_id($onoff_flt),$CONTROL_PAR_AUTOMATION_NAME,"Filter On/Off") set_control_par_str(get_ui_id($cutoff_flt),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_CUTOFF,$selected_group, $lp_slot,-1) & " Hz") set_control_par_str(get_ui_id($reso_flt),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_RESONANCE,$selected_group, $lp_slot,-1) & " %") set_control_par_str(get_ui_id($vel_flt),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_MOD_TARGET_INTENSITY, $selected_group,... find_mod($selected_group, "VEL_CUTOFF"), -1) & " %") {----------FLT END-----------} {----------SENDS START----------} declare const $NUM_SEND := 4 declare ui_slider $reverb_send (0,1000000) declare ui_slider $delay_send (0,1000000) declare ui_label $lb_reverb_send (1,1) declare ui_label $lb_delay_send (1,1) declare %send_id[$NUM_SEND] %send_id[0] := get_ui_id($reverb_send) %send_id[1] := get_ui_id($delay_send) %send_id[2] := get_ui_id($lb_reverb_send) %send_id[3] := get_ui_id($lb_delay_send) set_text($lb_reverb_send, "REVERB") set_text($lb_delay_send, "DELAY") move_control_px($reverb_send,($GRID_X*6)-6,($GRID_Y * 3)-6) move_control_px($delay_send,($GRID_X*6)-6,($GRID_Y * 6)-7) $count := 0 while($count<2) set_control_par_str(%send_id[$count],$CONTROL_PAR_PICTURE,"pv_synth_knob_red") set_control_par(%send_id[$count],$CONTROL_PAR_MOUSE_BEHAVIOUR,-500) inc($count) end while set_control_par_str(%send_id[1],$CONTROL_PAR_PICTURE,"pv_synth_knob_orange") $count := 2 while($count<4) set_control_par(%send_id[$count],$CONTROL_PAR_HIDE,$HIDE_PART_BG) set_control_par(%send_id[$count],$CONTROL_PAR_POS_X,get_control_par... (%send_id[$count-2],$CONTROL_PAR_POS_X)-25) set_control_par(%send_id[$count],$CONTROL_PAR_POS_Y,get_control_par... (%send_id[$count-2],$CONTROL_PAR_POS_Y)+31) set_control_par(%send_id[$count], $CONTROL_PAR_TEXT_ALIGNMENT, 1) set_control_par(%send_id[$count], $CONTROL_PAR_FONT_TYPE, $FONT_ID) inc($count) end while $reverb_send := _get_engine_par($ENGINE_PAR_SENDLEVEL_0,$selected_group,$send_slot,1) $delay_send := _get_engine_par($ENGINE_PAR_SENDLEVEL_1,$selected_group,$send_slot,1) set_control_par_str(get_ui_id($reverb_send),$CONTROL_PAR_AUTOMATION_NAME,"Rvb Sd") set_control_par_str(get_ui_id($delay_send),$CONTROL_PAR_AUTOMATION_NAME,"Del Sd") set_control_par_str(get_ui_id($reverb_send),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_SENDLEVEL_0,$selected_group,$send_slot,1) & " dB") set_control_par_str(get_ui_id($delay_send),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_SENDLEVEL_1,$selected_group,$send_slot,1)& " dB") {----------SENDS END----------} {*** CONTROL GROUP "MASTERFX"} {POSITIONING OF CONTROL GROUP} declare $x_grid_masterfx := 3 {X Position of Control Group in grid} declare $y_grid_masterfx := 9 {Y Position of Control Group in grid} declare $x_px_masterfx := 0 {X Position Offset Control Group in pixel} declare $y_px_masterfx := 0 {Y Position Offset Control Group in pixel} {DECLARATION AND UI_IDs} declare const $num_ir_samples := 10 {the number of ir samples used in this instrument group} declare const $NUM_MASTERFX := 48 {number of elements in this control group} declare ui_label $backgr_masterfx (1,1) declare ui_label $title_masterfx (1,1) declare ui_label $lb_rev_masterfx (1,1) declare ui_label $lb_delay_masterfx(1,1) declare ui_label $lb_eq_masterfx(1,1) declare ui_label $lb_rev_onoff_masterfx (1,1) declare ui_label $lb_rev_room_masterfx (1,1) declare ui_label $lb_rev_mix_masterfx (1,1) declare ui_label $image_reverb (1,1) declare ui_label $lb_delay_onoff_masterfx (1,1) declare ui_label $lb_delay_feedback_masterfx (1,1) declare ui_label $lb_delay_time_masterfx (1,1) declare ui_label $lb_delay_amount_masterfx (1,1) declare ui_label $lb_eq_onoff_masterfx (1,1) declare ui_label $lb_eq_lo_masterfx (1,1) declare ui_label $lb_eq_mid_masterfx (1,1) declare ui_label $lb_eq_hi_masterfx (1,1) declare ui_slider $rev_amount_masterfx (0, 1000000) declare ui_slider $delay_feedback_masterfx (0, 1000000) declare ui_slider $delay_time_masterfx (0, 1000000) declare ui_slider $delay_amount_masterfx (0, 1000000) declare ui_slider $eq_lo_masterfx (166666,833333) declare ui_slider $eq_mid_masterfx (166666,833333) declare ui_slider $eq_hi_masterfx (166666,833333) declare ui_button $rev_masterfx declare ui_button $delay_masterfx declare ui_button $eq_masterfx declare ui_switch $rev_onoff_masterfx declare ui_switch $delay_onoff_masterfx declare ui_switch $eq_onoff_masterfx declare ui_menu $category_reverb declare ui_label $amount_ring_masterfx (1,1) declare ui_label $first_ring_masterfx (1,1) declare ui_label $second_ring_masterfx (1,1) declare ui_label $eq_background_masterfx (1,1) declare ui_label $reverb_button_bg_masterfx (1,1) declare ui_label $delay_button_bg_masterfx (1,1) declare ui_label $eq_button_bg_masterfx (1,1) {reverb functionality} 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 $quadstick_reverb declare ui_menu $brt7_reverb declare ui_menu $plate_reverb declare ui_menu $cabinet_reverb 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) declare %offset_reverb[9] := (0,3,6,14,21,52,34,42,62) {Skin the subcategory menus} $count := 0 while($count < 9) set_control_par_str(%subcat_menu_id[$count],$CONTROL_PAR_PICTURE,"pv_synth_master_fx_reverb_dropdown_bottom") set_control_par(%subcat_menu_id[$count], $CONTROL_PAR_POS_X, ($GRID_X * 2) + 84) set_control_par(%subcat_menu_id[$count], $CONTROL_PAR_POS_Y, ($GRID_Y * 5) + 9) set_control_par(%subcat_menu_id[$count], $CONTROL_PAR_FONT_TYPE, $FONT_ID_2) inc($count) end while set_control_par_str(get_ui_id($image_reverb),$CONTROL_PAR_PICTURE,"pv_global_reverb_animation_small") {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] := "HALL A" !ir_type[1] := "HALL B" !ir_type[2] := "EXHIBIT HALL" !ir_type[3] := "CATHEDRAL A" !ir_type[4] := "CATHEDRAL B" !ir_type[5] := "NDB" !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" !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] := "LRG CHAMBER" !ir_type[25] := "STUDIO C" !ir_type[26] := "PLATE" !ir_type[27] := "ECHOES" !ir_type[28] := "MEDIUM STOP" !ir_type[29] := "DRUM CAVE" !ir_type[30] := "LARGE AMBI" !ir_type[31] := "SMOOTH AMBI" !ir_type[32] := "AMBI 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 MOD" !ir_type[40] := "RNB NEPTUNE" !ir_type[41] := "RNB TODAY" !ir_type[42] := "LARGE AMBI" !ir_type[43] := "SMALL AMBI" !ir_type[44] := "SML CHAMBER" !ir_type[45] := "VOC 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" !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) {/reverb functionality} declare %masterfx_id[$NUM_MASTERFX] %masterfx_id[0] := get_ui_id($backgr_masterfx) %masterfx_id[1] := get_ui_id($title_masterfx) %masterfx_id[2] := get_ui_id($lb_rev_masterfx) %masterfx_id[3] := get_ui_id($lb_delay_masterfx) %masterfx_id[4] := get_ui_id($lb_eq_masterfx) %masterfx_id[5] := get_ui_id($lb_rev_onoff_masterfx) %masterfx_id[6] := get_ui_id($lb_rev_room_masterfx) %masterfx_id[7] := get_ui_id($lb_rev_mix_masterfx) %masterfx_id[8] := get_ui_id($image_reverb) %masterfx_id[9] := get_ui_id($lb_delay_onoff_masterfx) %masterfx_id[10] := get_ui_id($lb_delay_feedback_masterfx) %masterfx_id[11] := get_ui_id($lb_delay_time_masterfx) %masterfx_id[12] := get_ui_id($lb_delay_amount_masterfx) %masterfx_id[13] := get_ui_id($lb_eq_onoff_masterfx) %masterfx_id[14] := get_ui_id($lb_eq_lo_masterfx) %masterfx_id[15] := get_ui_id($lb_eq_mid_masterfx) %masterfx_id[16] := get_ui_id($lb_eq_hi_masterfx) %masterfx_id[17] := get_ui_id($rev_amount_masterfx) %masterfx_id[18] := get_ui_id($delay_feedback_masterfx) %masterfx_id[19] := get_ui_id($delay_time_masterfx) %masterfx_id[20] := get_ui_id($delay_amount_masterfx) %masterfx_id[21] := get_ui_id($eq_lo_masterfx) %masterfx_id[22] := get_ui_id($eq_mid_masterfx) %masterfx_id[23] := get_ui_id($eq_hi_masterfx) %masterfx_id[24] := get_ui_id($rev_masterfx) %masterfx_id[25] := get_ui_id($delay_masterfx) %masterfx_id[26] := get_ui_id($eq_masterfx) %masterfx_id[27] := get_ui_id($rev_onoff_masterfx) %masterfx_id[28] := get_ui_id($delay_onoff_masterfx) %masterfx_id[29] := get_ui_id($eq_onoff_masterfx) %masterfx_id[30] := get_ui_id($category_reverb) %masterfx_id[32] := get_ui_id($amount_ring_masterfx) %masterfx_id[33] := get_ui_id($first_ring_masterfx) %masterfx_id[34] := get_ui_id($second_ring_masterfx) %masterfx_id[35] := get_ui_id($eq_background_masterfx) %masterfx_id[36] := get_ui_id($hall_reverb) %masterfx_id[37] := get_ui_id($cathedral_reverb) %masterfx_id[38] := get_ui_id($club_reverb) %masterfx_id[39] := get_ui_id($room_reverb) %masterfx_id[40] := get_ui_id($l300_reverb) %masterfx_id[41] := get_ui_id($quadstick_reverb) %masterfx_id[42] := get_ui_id($brt7_reverb) %masterfx_id[43] := get_ui_id($plate_reverb) %masterfx_id[44] := get_ui_id($cabinet_reverb) %masterfx_id[45] := get_ui_id($reverb_button_bg_masterfx) %masterfx_id[46] := get_ui_id($delay_button_bg_masterfx) %masterfx_id[47] := get_ui_id($eq_button_bg_masterfx) {POSITIONING OF INDIVIDUAL CONTROLS} move_control_px($backgr_masterfx,($GRID_X * 1) + 0, ($GRID_Y * 1) + 0) {possible to offset control in pixels} move_control_px($title_masterfx, ($GRID_X * 1) + 0, ($GRID_Y * 1) + 0) move_control_px($lb_rev_masterfx, ($GRID_X * 1) + 0, ($GRID_Y * 2) + 0) move_control_px($lb_delay_masterfx, ($GRID_X * 1) + 46, ($GRID_Y * 2) + 0) move_control_px($lb_eq_masterfx, ($GRID_X * 2) + 0, ($GRID_Y * 2) + 0) move_control_px($lb_rev_onoff_masterfx, ($GRID_X * 2) + 46, ($GRID_Y * 2) + 0) move_control_px($lb_rev_room_masterfx, ($GRID_X * 2) + 46, ($GRID_Y * 4) + 0) move_control_px($lb_rev_mix_masterfx, ($GRID_X * 3) + 85, ($GRID_Y * 4) + 28) move_control_px($image_reverb, ($GRID_X * 2) + 85, ($GRID_Y * 3) + 6) move_control_px($lb_delay_onoff_masterfx, ($GRID_X * 2) + 46, ($GRID_Y * 2) + 0) move_control_px($lb_delay_feedback_masterfx, ($GRID_X * 2) + 61, ($GRID_Y * 4) + 18) move_control_px($lb_delay_time_masterfx, ($GRID_X * 3) + 27, ($GRID_Y * 4) + 18) move_control_px($lb_delay_amount_masterfx, ($GRID_X * 3) + 85, ($GRID_Y * 4) + 18) move_control_px($lb_eq_onoff_masterfx, ($GRID_X * 2) + 46, ($GRID_Y * 2) + 0) move_control_px($lb_eq_lo_masterfx, ($GRID_X * 2) + 75, ($GRID_Y * 5) + 7) move_control_px($lb_eq_mid_masterfx, ($GRID_X * 3) + 28, ($GRID_Y * 5) + 7) move_control_px($lb_eq_hi_masterfx, ($GRID_X * 3) + 74, ($GRID_Y * 5) + 7) move_control_px($rev_amount_masterfx, ($GRID_X * 4) + 21, ($GRID_Y * 3) + 8) move_control_px($delay_feedback_masterfx, ($GRID_X * 2) + 89, ($GRID_Y * 3) + 8) move_control_px($delay_time_masterfx, ($GRID_X * 3) + 55, ($GRID_Y * 3) + 8) move_control_px($delay_amount_masterfx, ($GRID_X * 4) + 21, ($GRID_Y * 3) + 8) move_control_px($eq_lo_masterfx, ($GRID_X * 3) + 23, ($GRID_Y * 2) + 19) move_control_px($eq_mid_masterfx, ($GRID_X * 3) + 68, ($GRID_Y * 2) + 19) move_control_px($eq_hi_masterfx, ($GRID_X * 4) + 21, ($GRID_Y * 2) + 19) move_control_px($rev_masterfx, ($GRID_X * 1) + 85, ($GRID_Y * 2) + 9) move_control_px($delay_masterfx, ($GRID_X * 1) + 85, ($GRID_Y * 3) + 16) move_control_px($eq_masterfx, ($GRID_X * 1) + 85, ($GRID_Y * 4) + 23) move_control_px($rev_onoff_masterfx, ($GRID_X * 1) + 61, ($GRID_Y * 2) + 9) move_control_px($delay_onoff_masterfx, ($GRID_X * 1) + 61, ($GRID_Y * 3) + 16) move_control_px($eq_onoff_masterfx, ($GRID_X * 1) + 61, ($GRID_Y * 4) + 23) move_control_px($category_reverb, ($GRID_X * 2) + 84, ($GRID_Y * 2) + 11) move_control_px($amount_ring_masterfx, ($GRID_X * 4) + 18, ($GRID_Y * 3) + 5) move_control_px($first_ring_masterfx, ($GRID_X * 2) + 86, ($GRID_Y * 3) + 5) move_control_px($second_ring_masterfx, ($GRID_X * 3) + 52, ($GRID_Y * 3) + 5) move_control_px($eq_background_masterfx, ($GRID_X * 2) + 67, ($GRID_Y * 2) + 9) move_control_px($reverb_button_bg_masterfx, ($GRID_X * 1) + 57, ($GRID_Y * 2) + 8) move_control_px($delay_button_bg_masterfx, ($GRID_X * 1) + 57, ($GRID_Y * 3) + 15) move_control_px($eq_button_bg_masterfx, ($GRID_X * 1) + 57, ($GRID_Y * 4) + 22) {VARIOUS ATTRIBUTES} set_control_par(%masterfx_id[21], $CONTROL_PAR_DEFAULT_VALUE, 500000) set_control_par(%masterfx_id[22], $CONTROL_PAR_DEFAULT_VALUE, 500000) set_control_par(%masterfx_id[23], $CONTROL_PAR_DEFAULT_VALUE, 500000) $rev_amount_masterfx := _get_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN, -1, $reverb_slot, 0) $delay_feedback_masterfx := _get_engine_par ($ENGINE_PAR_DL_FEEDBACK, -1, $delay_slot, 0) $delay_time_masterfx := _get_engine_par ($ENGINE_PAR_DL_TIME, -1, $delay_slot, 0) $delay_amount_masterfx := _get_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN, -1, $delay_slot, 0) $eq_lo_masterfx := _get_engine_par($ENGINE_PAR_GAIN1, -1, $meq_slot, 1) $eq_mid_masterfx := _get_engine_par($ENGINE_PAR_GAIN2, -1, $meq_slot, 1) $eq_hi_masterfx := _get_engine_par($ENGINE_PAR_GAIN3, -1, $meq_slot, 1) $rev_onoff_masterfx := (_get_engine_par($ENGINE_PAR_SEND_EFFECT_BYPASS, -1, $reverb_slot, 0) + 1) mod 2 $delay_onoff_masterfx := (_get_engine_par($ENGINE_PAR_SEND_EFFECT_BYPASS, -1, $delay_slot, 0) + 1) mod 2 $eq_onoff_masterfx := (_get_engine_par($ENGINE_PAR_SEND_EFFECT_BYPASS, -1, $meq_slot, 1) + 1) mod 2 $rev_masterfx := 1 set_control_par_str(%masterfx_id[0], $CONTROL_PAR_TEXT, "") set_control_par_str(%masterfx_id[1], $CONTROL_PAR_TEXT, "") set_control_par_str(%masterfx_id[2], $CONTROL_PAR_TEXT, "") set_control_par_str(%masterfx_id[3], $CONTROL_PAR_TEXT, "") set_control_par_str(%masterfx_id[4], $CONTROL_PAR_TEXT, "") set_control_par_str(%masterfx_id[5], $CONTROL_PAR_TEXT, "") set_control_par_str(%masterfx_id[6], $CONTROL_PAR_TEXT, "") set_control_par_str(%masterfx_id[7], $CONTROL_PAR_TEXT, "AMOUNT") set_control_par_str(%masterfx_id[8], $CONTROL_PAR_TEXT, "") set_control_par_str(%masterfx_id[9], $CONTROL_PAR_TEXT, "") set_control_par_str(%masterfx_id[10], $CONTROL_PAR_TEXT, "FEEDBACK") set_control_par_str(%masterfx_id[11], $CONTROL_PAR_TEXT, "TIME") set_control_par_str(%masterfx_id[12], $CONTROL_PAR_TEXT, "AMOUNT") set_control_par_str(%masterfx_id[13], $CONTROL_PAR_TEXT, "") set_control_par_str(%masterfx_id[14], $CONTROL_PAR_TEXT, "BASS") set_control_par_str(%masterfx_id[15], $CONTROL_PAR_TEXT, "MID") set_control_par_str(%masterfx_id[16], $CONTROL_PAR_TEXT, "TREBLE") set_control_par_str(%masterfx_id[32], $CONTROL_PAR_TEXT, "") set_control_par_str(%masterfx_id[33], $CONTROL_PAR_TEXT, "") set_control_par_str(%masterfx_id[34], $CONTROL_PAR_TEXT, "") set_control_par_str(%masterfx_id[35], $CONTROL_PAR_TEXT, "") set_control_par_str(%masterfx_id[45], $CONTROL_PAR_TEXT, "") set_control_par_str(%masterfx_id[46], $CONTROL_PAR_TEXT, "") set_control_par_str(%masterfx_id[47], $CONTROL_PAR_TEXT, "") set_control_help ($rev_amount_masterfx, "Reverb Return: Sets the output volume of the reverb send effect.") set_control_help ($delay_feedback_masterfx, "Delay Feedback: Controls the amount of signal from the delay effect output that is fed back into the delay effect input.") set_control_help ($delay_time_masterfx, "Delay Time: Sets the amount of time between the original input and the delayed output signal.") set_control_help ($delay_amount_masterfx, "Reverb Return: Sets the output volume of the delay send effect.") set_control_help ($eq_lo_masterfx, "EQ Low Gain: Controls the gain of the master output's lower frequencies.") set_control_help ($eq_mid_masterfx, "EQ Mid Gain: Controls the gain of the master output's mid frequencies.") set_control_help ($eq_hi_masterfx, "EQ High Gain: Controls the gain of the master output's higher frequencies.") set_control_help ($rev_onoff_masterfx, "Reverb On/Off: Turns the reverb send effect on or off.") set_control_help ($delay_onoff_masterfx, "Delay On/Off: Turns the delay send effect on or off.") set_control_help ($eq_onoff_masterfx, "EQ On/Off: Turns the master equalizer on or off.") 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.") set_control_par(%masterfx_id[0], $CONTROL_PAR_WIDTH, ($GRID_X * 2) + 46) set_control_par(%masterfx_id[0], $CONTROL_PAR_HEIGHT, ($GRID_Y * 8)) set_control_par(%masterfx_id[1], $CONTROL_PAR_WIDTH, ($GRID_X * 1)) set_control_par(%masterfx_id[1], $CONTROL_PAR_HEIGHT, ($GRID_Y * 1)) $count := 0 while ($count < 17) set_control_par(%masterfx_id[$count], $CONTROL_PAR_WIDTH, ($GRID_X * 1)) set_control_par(%masterfx_id[$count], $CONTROL_PAR_HEIGHT, ($GRID_Y * 1)) set_control_par(%masterfx_id[$count], $CONTROL_PAR_HIDE, $HIDE_PART_BG) set_control_par(%masterfx_id[$count], $CONTROL_PAR_TEXT_ALIGNMENT, 1) set_control_par(%masterfx_id[$count], $CONTROL_PAR_FONT_TYPE, $FONT_ID) inc($count) end while set_control_par(%masterfx_id[8], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING) $count := 17 while ($count < 21) set_control_par(%masterfx_id[$count], $CONTROL_PAR_MOUSE_BEHAVIOUR, -500) inc($count) end while set_control_par_str(%masterfx_id[17], $CONTROL_PAR_PICTURE, "pv_synth_knob_main") set_control_par_str(%masterfx_id[18], $CONTROL_PAR_PICTURE, "pv_synth_knob_red") set_control_par_str(%masterfx_id[19], $CONTROL_PAR_PICTURE, "pv_synth_knob_red") set_control_par_str(%masterfx_id[20], $CONTROL_PAR_PICTURE, "pv_synth_knob_main") $count := 21 while ($count < 24) set_control_par(%masterfx_id[$count], $CONTROL_PAR_MOUSE_BEHAVIOUR, -1000) set_control_par_str(%masterfx_id[$count], $CONTROL_PAR_PICTURE, "pv_synth_master_fx_eq_fader") inc($count) end while set_control_par(%masterfx_id[24], $CONTROL_PAR_VALUE, 1) $count := 24 while ($count < 27) set_control_par_str(%masterfx_id[$count], $CONTROL_PAR_PICTURE, "pv_vintage_drums_btn_trans") set_control_par_str(%masterfx_id[$count], $CONTROL_PAR_TEXT, "") set_control_par(%masterfx_id[$count], $CONTROL_PAR_HEIGHT, 25) set_control_par(%masterfx_id[$count], $CONTROL_PAR_WIDTH, 50) inc($count) end while set_control_par(%masterfx_id[45], $CONTROL_PAR_PICTURE_STATE, 1) $count := 27 while ($count < 30) set_control_par_str(%masterfx_id[$count], $CONTROL_PAR_PICTURE, "pv_synth_button_small") set_control_par_str(%masterfx_id[$count], $CONTROL_PAR_TEXT, "") set_control_par(%masterfx_id[$count], $CONTROL_PAR_HEIGHT, 23) set_control_par(%masterfx_id[$count], $CONTROL_PAR_WIDTH, 23) inc($count) end while set_control_par_str(%masterfx_id[30], $CONTROL_PAR_PICTURE, "pv_synth_master_fx_reverb_dropdown_top") set_control_par(%masterfx_id[30], $CONTROL_PAR_FONT_TYPE, $FONT_ID_2) set_control_par_str(%masterfx_id[32], $CONTROL_PAR_PICTURE, "pv_synth_knob_scale_solid") set_control_par_str(%masterfx_id[33], $CONTROL_PAR_PICTURE, "pv_synth_knob_scale_dark") set_control_par_str(%masterfx_id[34], $CONTROL_PAR_PICTURE, "pv_synth_knob_scale_dark") set_control_par_str(%masterfx_id[35], $CONTROL_PAR_PICTURE, "pv_synth_master_fx_eq_bg") set_control_par_str(%masterfx_id[45], $CONTROL_PAR_PICTURE, "pv_synth_master_fx_tab_reverb") set_control_par_str(%masterfx_id[46], $CONTROL_PAR_PICTURE, "pv_synth_master_fx_tab_delay") set_control_par_str(%masterfx_id[47], $CONTROL_PAR_PICTURE, "pv_synth_master_fx_tab_eq") {Hide the Delay & EQ Elements} $count := 9 while ($count < 17) set_control_par(%masterfx_id[$count], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) inc($count) end while set_control_par(%masterfx_id[18], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[19], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[20], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[33], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[34], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[21], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[22], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[23], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[35], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) {Other} $count := 0 while ($count < $NUM_MASTERFX) if ($count # 31) set_control_par (%masterfx_id[$count],$CONTROL_PAR_POS_X,get_control_par(%masterfx_id[$count],$CONTROL_PAR_POS_X)... +$ROOT_X + ($x_grid_masterfx - 2)*$GRID_X + $x_px_masterfx) set_control_par (%masterfx_id[$count],$CONTROL_PAR_POS_Y,get_control_par(%masterfx_id[$count],$CONTROL_PAR_POS_Y)... +$ROOT_Y + ($y_grid_masterfx - 2)*$GRID_Y + $y_px_masterfx) end if inc($count) end while set_control_par_str(get_ui_id($rev_onoff_masterfx),$CONTROL_PAR_AUTOMATION_NAME,"Reverb") set_control_par_str(get_ui_id($delay_onoff_masterfx),$CONTROL_PAR_AUTOMATION_NAME,"Delay") set_control_par_str(get_ui_id($eq_onoff_masterfx),$CONTROL_PAR_AUTOMATION_NAME,"EQ") set_control_par_str(get_ui_id($rev_amount_masterfx),$CONTROL_PAR_AUTOMATION_NAME,"Rvb Rt") set_control_par_str(get_ui_id($delay_feedback_masterfx),$CONTROL_PAR_AUTOMATION_NAME,"Del Fb") set_control_par_str(get_ui_id($delay_time_masterfx),$CONTROL_PAR_AUTOMATION_NAME,"D Time") set_control_par_str(get_ui_id($delay_amount_masterfx),$CONTROL_PAR_AUTOMATION_NAME,"Del Rt") set_control_par_str(get_ui_id($eq_lo_masterfx),$CONTROL_PAR_AUTOMATION_NAME,"Lo EQ") set_control_par_str(get_ui_id($eq_mid_masterfx),$CONTROL_PAR_AUTOMATION_NAME,"Mid EQ") set_control_par_str(get_ui_id($eq_hi_masterfx),$CONTROL_PAR_AUTOMATION_NAME,"Hi EQ") set_control_par_str(get_ui_id($rev_amount_masterfx),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN, -1, $reverb_slot, 0) & " dB") set_control_par_str(get_ui_id($delay_feedback_masterfx),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_DL_FEEDBACK, -1, $delay_slot, 0) & " %") set_control_par_str(get_ui_id($delay_time_masterfx),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_DL_TIME, -1, $delay_slot, 0) & " 16th") set_control_par_str(get_ui_id($delay_amount_masterfx),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN, -1, $delay_slot, 0) & " dB") set_control_par_str(get_ui_id($eq_lo_masterfx),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_GAIN1, -1, $meq_slot, 1) & " dB") set_control_par_str(get_ui_id($eq_mid_masterfx),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_GAIN2, -1, $meq_slot, 1) & " dB") set_control_par_str(get_ui_id($eq_hi_masterfx),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_GAIN3, -1, $meq_slot, 1) & " dB") {*** END CONTROL GROUP "MASTERFX"} {Control Help} set_control_help ($attack_env,"Attack: Sets the volume envelope attack time for the selected instrument.") set_control_help ($hold_env,"Hold: Sets the volume envelope hold time for the selected instrument.") set_control_help ($decay_env,"Decay: Sets the volume envelope decay time for the selected instrument.") set_control_help ($reverb_send, "Reverb Send Level: Controls the amount of signal sent from the selected instrument to the master reverb effect.") set_control_help ($delay_send, "Delay Send Level: Controls the amount of signal sent from the selected instrument to the master delay effect.") set_control_help($cutoff_flt,"Cutoff: Controls the cutoff frequency of the filter for the selected instrument.") set_control_help($reso_flt,"Resonance: Controls the strength of the resonant peak at the cutoff frequency for the selected instrument.") set_control_help($vel_flt,"Velocity Sensitivity: Controls the amount of modulation applied from the MIDI velocity to the filter cutoff frequency.") set_control_help($onoff_flt,"Filter: Turns the filter on and off for the selected drum instrument.") set_control_help ($rev_masterfx, "Reverb: Displays the controls for the reverb send effect.") set_control_help ($delay_masterfx,"Delay: Displays the controls for the delay send effect.") set_control_help ($eq_masterfx,"EQ: Displays the controls for the master equalizer.") if ($CREATE_AUTOMATION_ID = 1) $count := 16 set_control_par(get_ui_id($cutoff_flt),$CONTROL_PAR_AUTOMATION_ID,0) set_control_par(get_ui_id($reso_flt),$CONTROL_PAR_AUTOMATION_ID,1) set_control_par(get_ui_id($vel_flt),$CONTROL_PAR_AUTOMATION_ID,$count) inc($count) set_control_par(get_ui_id($onoff_flt),$CONTROL_PAR_AUTOMATION_ID,8) set_control_par(get_ui_id($note_voicing),$CONTROL_PAR_AUTOMATION_ID,$count) inc($count) set_control_par(get_ui_id($sel_by_midi),$CONTROL_PAR_AUTOMATION_ID,9) set_control_par(get_ui_id($level_voicing),$CONTROL_PAR_AUTOMATION_ID,2) set_control_par(get_ui_id($pan_voicing),$CONTROL_PAR_AUTOMATION_ID,$count) inc($count) set_control_par(get_ui_id($tune_voicing),$CONTROL_PAR_AUTOMATION_ID,3) set_control_par(get_ui_id($sound_voicing),$CONTROL_PAR_AUTOMATION_ID,$count) inc($count) set_control_par(get_ui_id($reverb_send),$CONTROL_PAR_AUTOMATION_ID,4) set_control_par(get_ui_id($delay_send),$CONTROL_PAR_AUTOMATION_ID,5) set_control_par(get_ui_id($attack_env),$CONTROL_PAR_AUTOMATION_ID,6) set_control_par(get_ui_id($hold_env),$CONTROL_PAR_AUTOMATION_ID,$count) inc($count) set_control_par(get_ui_id($decay_env),$CONTROL_PAR_AUTOMATION_ID,7) set_control_par(get_ui_id($rev_onoff_masterfx),$CONTROL_PAR_AUTOMATION_ID,12) set_control_par(get_ui_id($delay_onoff_masterfx),$CONTROL_PAR_AUTOMATION_ID,13) set_control_par(get_ui_id($eq_onoff_masterfx),$CONTROL_PAR_AUTOMATION_ID,$count) inc($count) set_control_par(get_ui_id($rev_amount_masterfx),$CONTROL_PAR_AUTOMATION_ID,$count) inc($count) set_control_par(get_ui_id($delay_feedback_masterfx),$CONTROL_PAR_AUTOMATION_ID,$count) inc($count) set_control_par(get_ui_id($delay_time_masterfx),$CONTROL_PAR_AUTOMATION_ID,$count) inc($count) set_control_par(get_ui_id($delay_amount_masterfx),$CONTROL_PAR_AUTOMATION_ID,$count) inc($count) set_control_par(get_ui_id($eq_lo_masterfx),$CONTROL_PAR_AUTOMATION_ID,$count) inc($count) set_control_par(get_ui_id($eq_mid_masterfx),$CONTROL_PAR_AUTOMATION_ID,$count) inc($count) set_control_par(get_ui_id($eq_hi_masterfx),$CONTROL_PAR_AUTOMATION_ID,$count) end if end on {VOICING UI CALLBACKS START} on ui_control($note_voicing) $instr_menu_voicing := $note_voicing - 35 $selected_group := $note_voicing - 35 $sound_voicing := %sound_group[$selected_group] $level_voicing := _get_engine_par($ENGINE_PAR_VOLUME,$selected_group,-1,-1) $tune_voicing := _get_engine_par($ENGINE_PAR_TUNE,$selected_group,-1,-1) $pan_voicing := _get_engine_par($ENGINE_PAR_PAN,$selected_group,-1,-1) $attack_env := _get_engine_par($ENGINE_PAR_ATTACK,$selected_group,$env_idx,-1) $hold_env := _get_engine_par($ENGINE_PAR_HOLD,$selected_group,$env_idx,-1) $decay_env := _get_engine_par($ENGINE_PAR_DECAY,$selected_group,$env_idx,-1) $cutoff_flt := _get_engine_par($ENGINE_PAR_CUTOFF,$selected_group, $lp_slot,-1) $reso_flt := _get_engine_par($ENGINE_PAR_RESONANCE,$selected_group, $lp_slot,-1) $vel_flt := _get_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY, $selected_group,... find_mod($selected_group, "VEL_CUTOFF"), -1) $onoff_flt := (_get_engine_par($ENGINE_PAR_EFFECT_BYPASS,$selected_group, $lp_slot,-1) + 1) mod 2 $reverb_send := _get_engine_par($ENGINE_PAR_SENDLEVEL_0,$selected_group,$send_slot,1) $delay_send := _get_engine_par($ENGINE_PAR_SENDLEVEL_1,$selected_group,$send_slot,1) if (($note_voicing > 24) and ($note_voicing < 36)) set_text ($lb_note_voicing, "C0-B0") set_control_par_str(get_ui_id($note_voicing),$CONTROL_PAR_LABEL,"C0 - B0") else set_text ($lb_note_voicing,!note_names[$note_voicing]) set_control_par_str(get_ui_id($note_voicing),$CONTROL_PAR_LABEL,!note_names[$note_voicing]) end if $last_time := $ENGINE_UPTIME wait($wait_time * 1000) if($ENGINE_UPTIME - $last_time > $wait_time -5) set_text ($lb_note_voicing,"NOTE") end if end on on ui_control($level_voicing) set_engine_par($ENGINE_PAR_VOLUME,$level_voicing,$selected_group,-1,1) set_control_par_str(get_ui_id($level_voicing),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_VOLUME,$selected_group,-1,-1) & " dB") end on on ui_control($pan_voicing) set_engine_par($ENGINE_PAR_PAN,$pan_voicing,$selected_group,-1,1) set_control_par_str(get_ui_id($pan_voicing),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_PAN,$selected_group,-1,-1)) end on on ui_control($tune_voicing) set_engine_par($ENGINE_PAR_TUNE,$tune_voicing,$selected_group,-1,1) set_control_par_str(get_ui_id($tune_voicing),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_TUNE,$selected_group,-1,-1) & " st") end on on ui_control($instr_menu_voicing) $note_voicing := $instr_menu_voicing + 35 $selected_group := $instr_menu_voicing $sound_voicing := %sound_group[$selected_group] $level_voicing := _get_engine_par($ENGINE_PAR_VOLUME,$selected_group,-1,-1) $tune_voicing := _get_engine_par($ENGINE_PAR_TUNE,$selected_group,-1,-1) $pan_voicing := _get_engine_par($ENGINE_PAR_PAN,$selected_group,-1,-1) $attack_env := _get_engine_par($ENGINE_PAR_ATTACK,$selected_group,$env_idx,-1) $hold_env := _get_engine_par($ENGINE_PAR_HOLD,$selected_group,$env_idx,-1) $decay_env := _get_engine_par($ENGINE_PAR_DECAY,$selected_group,$env_idx,-1) $cutoff_flt := _get_engine_par($ENGINE_PAR_CUTOFF,$selected_group, $lp_slot,-1) $reso_flt := _get_engine_par($ENGINE_PAR_RESONANCE,$selected_group, $lp_slot,-1) $vel_flt := _get_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY, $selected_group,... find_mod($selected_group, "VEL_CUTOFF"), -1) $onoff_flt := (_get_engine_par($ENGINE_PAR_EFFECT_BYPASS,$selected_group, $lp_slot,-1) + 1) mod 2 $reverb_send := _get_engine_par($ENGINE_PAR_SENDLEVEL_0,$selected_group,$send_slot,1) $delay_send := _get_engine_par($ENGINE_PAR_SENDLEVEL_1,$selected_group,$send_slot,1) if (($note_voicing > 24) and ($note_voicing < 36)) set_text ($lb_note_voicing, "C0-B0") set_control_par_str(get_ui_id($note_voicing),$CONTROL_PAR_LABEL,"C0 - B0") else set_text ($lb_note_voicing,!note_names[$note_voicing]) set_control_par_str(get_ui_id($note_voicing),$CONTROL_PAR_LABEL,!note_names[$note_voicing]) end if $last_time := $ENGINE_UPTIME wait($wait_time * 1000) if($ENGINE_UPTIME - $last_time > $wait_time -5) set_text ($lb_note_voicing,"NOTE") end if end on on ui_control ($sound_voicing) %sound_group[$selected_group] := $sound_voicing $index_1 := $sound_voicing/10 $index_2 := $sound_voicing/10 +1 $knob_eq := $sound_voicing*10 if ($index_2 > 10) $index_2 := 10 end if set_control_par_str(get_ui_id($sound_voicing),$CONTROL_PAR_LABEL,$sound_voicing & " %") $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,$selected_group,$sound_eq_slot,1) inc($a_eq) end while end on {VOICING UI CALLBACKS END} on note if (in_range ($EVENT_NOTE,24,(35-1+$DRUM_INSTR)) and $sel_by_midi = 1) $note_voicing := 35 if (in_range ($EVENT_NOTE,35,(35-1+$DRUM_INSTR))) $note_voicing := $EVENT_NOTE end if $instr_menu_voicing := $note_voicing - 35 $selected_group := $note_voicing - 35 $sound_voicing := %sound_group[$selected_group] $level_voicing := _get_engine_par($ENGINE_PAR_VOLUME,$selected_group,-1,-1) $tune_voicing := _get_engine_par($ENGINE_PAR_TUNE,$selected_group,-1,-1) $pan_voicing := _get_engine_par($ENGINE_PAR_PAN,$selected_group,-1,-1) $attack_env := _get_engine_par($ENGINE_PAR_ATTACK,$selected_group,$env_idx,-1) $hold_env := _get_engine_par($ENGINE_PAR_HOLD,$selected_group,$env_idx,-1) $decay_env := _get_engine_par($ENGINE_PAR_DECAY,$selected_group,$env_idx,-1) $cutoff_flt := _get_engine_par($ENGINE_PAR_CUTOFF,$selected_group, $lp_slot,-1) $reso_flt := _get_engine_par($ENGINE_PAR_RESONANCE,$selected_group, $lp_slot,-1) $vel_flt := _get_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY, $selected_group,... find_mod($selected_group, "VEL_CUTOFF"), -1) $onoff_flt := (_get_engine_par($ENGINE_PAR_EFFECT_BYPASS,$selected_group, $lp_slot,-1) + 1) mod 2 $reverb_send := _get_engine_par($ENGINE_PAR_SENDLEVEL_0,$selected_group,$send_slot,1) $delay_send := _get_engine_par($ENGINE_PAR_SENDLEVEL_1,$selected_group,$send_slot,1) end if end on {ADSR UI CALLBACKS START} on ui_control($attack_env) _set_engine_par($ENGINE_PAR_ATTACK,$attack_env,$selected_group,$env_idx,-1) set_control_par_str(get_ui_id($attack_env),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_ATTACK,$selected_group,$env_idx,-1) & " ms") end on on ui_control($hold_env) _set_engine_par($ENGINE_PAR_HOLD,$hold_env,$selected_group,$env_idx,-1) set_control_par_str(get_ui_id($hold_env),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_HOLD,$selected_group,$env_idx,-1) & " ms") end on on ui_control($decay_env) _set_engine_par($ENGINE_PAR_DECAY,$decay_env,$selected_group,$env_idx,-1) set_control_par_str(get_ui_id($decay_env),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_DECAY,$selected_group,$env_idx,-1) & " ms") end on {ADSR UI CALLBACKS END} {FLT UI CALLBACKS START} on ui_control ($cutoff_flt) set_engine_par($ENGINE_PAR_CUTOFF, $cutoff_flt, $selected_group, $lp_slot,-1) set_control_par_str(get_ui_id($cutoff_flt),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_CUTOFF,$selected_group, $lp_slot,-1) & " Hz") end on on ui_control ($reso_flt) set_engine_par($ENGINE_PAR_RESONANCE, $reso_flt, $selected_group, $lp_slot,-1) set_control_par_str(get_ui_id($reso_flt),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_RESONANCE,$selected_group, $lp_slot,-1) & " %") end on on ui_control ($vel_flt) set_engine_par ($ENGINE_PAR_MOD_TARGET_INTENSITY, $vel_flt, $selected_group,... find_mod($selected_group, "VEL_CUTOFF"), -1) set_control_par_str(get_ui_id($vel_flt),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_MOD_TARGET_INTENSITY, $selected_group,... find_mod($selected_group, "VEL_CUTOFF"), -1) & " %") end on on ui_control ($onoff_flt) _set_engine_par ($ENGINE_PAR_EFFECT_BYPASS, (($onoff_flt + 1) mod 2), $selected_group, $lp_slot, -1) end on {FLT UI CALLBACKS END} {*** CONTROL GROUP "MASTERFX" UI_CONTROL CALLBACKS} on ui_control ($rev_masterfx) if ($rev_masterfx = 0) $rev_masterfx := 1 else $delay_masterfx := 0 $eq_masterfx := 0 set_control_par(%masterfx_id[45], $CONTROL_PAR_PICTURE_STATE, 1) set_control_par(%masterfx_id[46], $CONTROL_PAR_PICTURE_STATE, 0) set_control_par(%masterfx_id[47], $CONTROL_PAR_PICTURE_STATE, 0) $count := 5 while ($count < 9) set_control_par(%masterfx_id[$count], $CONTROL_PAR_HIDE, $HIDE_PART_BG) set_control_par(%masterfx_id[$count+4], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[$count+8], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) inc($count) end while set_control_par(%masterfx_id[8], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING) set_control_par(%masterfx_id[17], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING) set_control_par(%masterfx_id[30], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING) set_control_par(%masterfx_id[32], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING) set_control_par(%masterfx_id[18], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[19], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[20], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[33], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[34], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[21], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[22], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[23], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[35], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) $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 end if end on on ui_control ($delay_masterfx) if ($delay_masterfx = 0) $delay_masterfx := 1 else $rev_masterfx := 0 $eq_masterfx := 0 set_control_par(%masterfx_id[45], $CONTROL_PAR_PICTURE_STATE, 0) set_control_par(%masterfx_id[46], $CONTROL_PAR_PICTURE_STATE, 1) set_control_par(%masterfx_id[47], $CONTROL_PAR_PICTURE_STATE, 0) $count := 5 while ($count < 9) set_control_par(%masterfx_id[$count], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[$count+4], $CONTROL_PAR_HIDE, $HIDE_PART_BG) set_control_par(%masterfx_id[$count+8], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) inc($count) end while set_control_par(%masterfx_id[17], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[30], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[32], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING) set_control_par(%masterfx_id[18], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING) set_control_par(%masterfx_id[19], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING) set_control_par(%masterfx_id[20], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING) set_control_par(%masterfx_id[33], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING) set_control_par(%masterfx_id[34], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING) set_control_par(%masterfx_id[21], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[22], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[23], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[35], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) $count := 0 while ($count < 9) set_control_par(%subcat_menu_id[$count],$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL) inc ($count) end while end if end on on ui_control ($eq_masterfx) if ($eq_masterfx = 0) $eq_masterfx := 1 else $rev_masterfx := 0 $delay_masterfx := 0 set_control_par(%masterfx_id[45], $CONTROL_PAR_PICTURE_STATE, 0) set_control_par(%masterfx_id[46], $CONTROL_PAR_PICTURE_STATE, 0) set_control_par(%masterfx_id[47], $CONTROL_PAR_PICTURE_STATE, 1) $count := 5 while ($count < 9) set_control_par(%masterfx_id[$count], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[$count+4], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[$count+8], $CONTROL_PAR_HIDE, $HIDE_PART_BG) inc($count) end while set_control_par(%masterfx_id[17], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[30], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[32], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[18], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[19], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[20], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[33], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[34], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) set_control_par(%masterfx_id[21], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING) set_control_par(%masterfx_id[22], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING) set_control_par(%masterfx_id[23], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING) set_control_par(%masterfx_id[35], $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING) $count := 0 while ($count < 9) set_control_par(%subcat_menu_id[$count],$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL) inc ($count) end while end if end on {reverb functionality} on ui_control ($rev_onoff_masterfx) _set_engine_par($ENGINE_PAR_SEND_EFFECT_BYPASS, (($rev_onoff_masterfx + 1) mod 2), -1, $reverb_slot, 0) end on 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,0) {change 0 to 1 if reverb is on insert effect} end on on ui_control ($hall_reverb) _load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)... & !ir_path[$hall_reverb],$reverb_slot,0) end on on ui_control ($cathedral_reverb) _load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)... & !ir_path[$cathedral_reverb],$reverb_slot,0) end on on ui_control ($club_reverb) _load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)... & !ir_path[$club_reverb],$reverb_slot,0) end on on ui_control ($room_reverb) _load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)... & !ir_path[$room_reverb],$reverb_slot,0) end on on ui_control ($l300_reverb) _load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)... & !ir_path[$l300_reverb],$reverb_slot,0) end on on ui_control ($quadstick_reverb) _load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)... & !ir_path[$quadstick_reverb],$reverb_slot,0) end on on ui_control ($brt7_reverb) _load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)... & !ir_path[$brt7_reverb],$reverb_slot,0) end on on ui_control ($plate_reverb) _load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)... & !ir_path[$plate_reverb],$reverb_slot,0) end on on ui_control ($cabinet_reverb) _load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)... & !ir_path[$cabinet_reverb],$reverb_slot,0) end on on ui_control ($rev_amount_masterfx) set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN, $rev_amount_masterfx, -1, $reverb_slot, 0) set_control_par_str(get_ui_id($rev_amount_masterfx),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN, -1, $reverb_slot, 0) & " dB") end on {delay functionality} on ui_control ($delay_onoff_masterfx) _set_engine_par ($ENGINE_PAR_SEND_EFFECT_BYPASS, ($delay_onoff_masterfx+1) mod 2, -1, $delay_slot, 0) end on on ui_control ($delay_feedback_masterfx) _set_engine_par($ENGINE_PAR_DL_FEEDBACK, $delay_feedback_masterfx, -1, $delay_slot, 0) set_control_par_str(get_ui_id($delay_feedback_masterfx),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_DL_FEEDBACK, -1, $delay_slot, 0) & " %") end on on ui_control ($delay_time_masterfx) _set_engine_par ($ENGINE_PAR_DL_TIME, $delay_time_masterfx, -1, $delay_slot, 0) set_control_par_str(get_ui_id($delay_time_masterfx),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_DL_TIME, -1, $delay_slot, 0) & " 16th") end on on ui_control ($delay_amount_masterfx) _set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN, $delay_amount_masterfx, -1, $delay_slot, 0) set_control_par_str(get_ui_id($delay_amount_masterfx),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN, -1, $delay_slot, 0) & " dB") end on {eq functionality} on ui_control ($eq_onoff_masterfx) _set_engine_par ($ENGINE_PAR_EFFECT_BYPASS, (($eq_onoff_masterfx + 1) mod 2), -1, $meq_slot, 1) end on on ui_control ($eq_lo_masterfx) _set_engine_par($ENGINE_PAR_GAIN1, $eq_lo_masterfx, -1, $meq_slot, 1) set_control_par_str(get_ui_id($eq_lo_masterfx),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_GAIN1, -1, $meq_slot, 1) & " dB") end on on ui_control ($eq_mid_masterfx) _set_engine_par($ENGINE_PAR_GAIN2, $eq_mid_masterfx, -1, $meq_slot, 1) set_control_par_str(get_ui_id($eq_mid_masterfx),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_GAIN2, -1, $meq_slot, 1) & " dB") end on on ui_control ($eq_hi_masterfx) _set_engine_par($ENGINE_PAR_GAIN3, $eq_hi_masterfx, -1, $meq_slot, 1) set_control_par_str(get_ui_id($eq_hi_masterfx),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_GAIN3, -1, $meq_slot, 1) & " dB") end on {*** END CONTROL GROUP "MASTERFX" UI_CONTROL CALLBACKS} {*** CONTROL GROUP "SENDS" UI_CONTROL CALLBACKS} on ui_control($reverb_send) _set_engine_par($ENGINE_PAR_SENDLEVEL_0,$reverb_send,$selected_group,$send_slot,1) set_control_par_str(get_ui_id($reverb_send),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_SENDLEVEL_0,$selected_group,$send_slot,1) & " dB") end on on ui_control($delay_send) set_engine_par($ENGINE_PAR_SENDLEVEL_1,$delay_send,$selected_group,$send_slot,1) set_control_par_str(get_ui_id($delay_send),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_SENDLEVEL_1,$selected_group,$send_slot,1)& " dB") end on {*** END CONTROL GROUP "SENDS" UI_CONTROL CALLBACKS}