{*********************************************** Kontakt 4 Factory Library - Instrument Choir Collection Author: Native Instruments Written by: Nicki Marinic, Dinos Vallianatos Modified: August 9th, 2009 *************************************************} on init make_perfview set_script_title("Instrument") set_ui_height_px(318) message("") declare $count {pgs declarations} _pgs_create_key(DKS_ON_OFF, 1) _pgs_create_key(DKS_KEYSWITCHES, 6) _pgs_create_key(DKS_FADETIMES, 6) _pgs_create_key(DKS_RELEASE, 1) {end pgs declarations} declare $active_group {0-5, the active group} make_persistent ($active_group) declare const $DKS_TRANSPOSE := -12 {the interval between the static and the dynamic keyswitches} declare const $SPREAD_AMT := 500000 declare $vol_env_idx declare $reverb_slot := 6 declare $eq_slot := 4 declare $played_note_id declare $last_time_1 declare $last_time_2 declare $last_time_3 declare $wait_time := 800 {Enter control label wait time} declare const $ROOT_X := 66 declare const $ROOT_Y := 2 declare const $GRID_X := 92 declare const $GRID_Y := 21 declare const $FONT_ID := 8 {the font id for all visible labels} declare const $FONT_ID_2 := 10 {the font id for buttons and dropdowns} declare const $CREATE_AUTOMATION_ID := 0 {*** CONTROL GROUP "ARTICULATION"} {POSITIONING OF CONTROL GROUP} declare $x_grid_articulation := 1 {X Position of Control Group in grid} declare $y_grid_articulation := 8 {Y Position of Control Group in grid} declare $x_px_articulation := 0 {X Position Offset Control Group in pixel} declare $y_px_articulation := 0 {Y Position Offset Control Group in pixel} {DECLARATION AND UI_IDs} declare const $NUM_ARTICULATION := 29 {number of controls in this control group} declare ui_label $header_articulation (2,1) declare ui_button $button_1 declare ui_button $button_2 declare ui_button $button_3 declare ui_button $button_4 declare ui_button $button_5 declare ui_button $button_6 declare ui_value_edit $key_switch_1 (12,127,$VALUE_EDIT_MODE_NOTE_NAMES) declare ui_value_edit $key_switch_2 (12,127,$VALUE_EDIT_MODE_NOTE_NAMES) declare ui_value_edit $key_switch_3 (12,127,$VALUE_EDIT_MODE_NOTE_NAMES) declare ui_value_edit $key_switch_4 (12,127,$VALUE_EDIT_MODE_NOTE_NAMES) declare ui_value_edit $key_switch_5 (12,127,$VALUE_EDIT_MODE_NOTE_NAMES) declare ui_value_edit $key_switch_6 (12,127,$VALUE_EDIT_MODE_NOTE_NAMES) declare ui_button $load_button_1 declare ui_button $load_button_2 declare ui_button $load_button_3 declare ui_button $load_button_4 declare ui_button $load_button_5 declare ui_button $load_button_6 declare ui_slider $vol_knob (0,1000000) declare ui_slider $fade_knob (0,700) declare ui_slider $attack_knob (0,1000000) declare ui_slider $release_knob (200000,1000000) declare ui_label $vol_label (1,1) declare ui_label $fade_label (1,1) declare ui_label $attack_label (1,1) declare ui_label $release_label (1,1) declare ui_switch $group_2_button declare ui_label $lb_group_2_button (1,1) declare %articulation_id[$NUM_ARTICULATION] %articulation_id[0] := get_ui_id($header_articulation) %articulation_id[1] := get_ui_id($button_1) %articulation_id[2] := get_ui_id($button_2) %articulation_id[3] := get_ui_id($button_3) %articulation_id[4] := get_ui_id($button_4) %articulation_id[5] := get_ui_id($button_5) %articulation_id[6] := get_ui_id($button_6) %articulation_id[7] := get_ui_id($key_switch_1) %articulation_id[8] := get_ui_id($key_switch_2) %articulation_id[9] := get_ui_id($key_switch_3) %articulation_id[10] := get_ui_id($key_switch_4) %articulation_id[11] := get_ui_id($key_switch_5) %articulation_id[12] := get_ui_id($key_switch_6) %articulation_id[13] := get_ui_id($load_button_1) %articulation_id[14] := get_ui_id($load_button_2) %articulation_id[15] := get_ui_id($load_button_3) %articulation_id[16] := get_ui_id($load_button_4) %articulation_id[17] := get_ui_id($load_button_5) %articulation_id[18] := get_ui_id($load_button_6) %articulation_id[19] := get_ui_id($vol_knob) %articulation_id[20] := get_ui_id($fade_knob) %articulation_id[21] := get_ui_id($attack_knob) %articulation_id[22] := get_ui_id($release_knob) %articulation_id[23] := get_ui_id($vol_label) %articulation_id[24] := get_ui_id($fade_label) %articulation_id[25] := get_ui_id($attack_label) %articulation_id[26] := get_ui_id($release_label) %articulation_id[27] := get_ui_id($group_2_button) %articulation_id[28] := get_ui_id($lb_group_2_button) {POSITIONING OF INDIVIDUAL CONTROLS} move_control_px($header_articulation,($GRID_X * 1) + 0, ($GRID_Y * 1) + 0) {possible to offset control in pixels} move_control_px($button_1, ($GRID_X * 1) - 6, ($GRID_Y * 2) + 10) move_control_px($button_2, ($GRID_X * 1) - 6, ($GRID_Y * 3) + 3) move_control_px($button_3, ($GRID_X * 1) - 6, ($GRID_Y * 3) + 17) move_control_px($button_4, ($GRID_X * 1) - 6, ($GRID_Y * 4) + 10) move_control_px($button_5, ($GRID_X * 1) - 6, ($GRID_Y * 5) + 3) move_control_px($button_6, ($GRID_X * 1) - 6, ($GRID_Y * 5) + 17) move_control_px($key_switch_1, ($GRID_X * 1) + 15, ($GRID_Y * 2) + 10) move_control_px($key_switch_2, ($GRID_X * 1) + 15, ($GRID_Y * 3) + 3) move_control_px($key_switch_3, ($GRID_X * 1) + 15, ($GRID_Y * 3) + 17) move_control_px($key_switch_4, ($GRID_X * 1) + 15, ($GRID_Y * 4) + 10) move_control_px($key_switch_5, ($GRID_X * 1) + 15, ($GRID_Y * 5) + 3) move_control_px($key_switch_6, ($GRID_X * 1) + 15, ($GRID_Y * 5) + 17) move_control_px($load_button_1, ($GRID_X * 1) + 65, ($GRID_Y * 2) + 14) move_control_px($load_button_2, ($GRID_X * 1) + 65, ($GRID_Y * 3) + 7) move_control_px($load_button_3, ($GRID_X * 1) + 65, ($GRID_Y * 3) + 21) move_control_px($load_button_4, ($GRID_X * 1) + 65, ($GRID_Y * 4) + 14) move_control_px($load_button_5, ($GRID_X * 1) + 65, ($GRID_Y * 5) + 7) move_control_px($load_button_6, ($GRID_X * 1) + 65, ($GRID_Y * 5) + 21) move_control_px($vol_knob, ($GRID_X * 2) + 14, ($GRID_Y * 2) + 1) move_control_px($fade_knob, ($GRID_X * 2) + 74, ($GRID_Y * 2) + 1) move_control_px($attack_knob, ($GRID_X * 2) + 14, ($GRID_Y * 4) + 18) move_control_px($release_knob,($GRID_X * 2) + 74, ($GRID_Y * 4) + 18) move_control_px($group_2_button,($GRID_X * 3) + 45, ($GRID_Y * 3) + 11) move_control_px($lb_group_2_button,($GRID_X * 3) + 23, ($GRID_Y * 5) + 7) set_control_par(%articulation_id[28], $CONTROL_PAR_FONT_TYPE, $FONT_ID) set_control_par(%articulation_id[28], $CONTROL_PAR_HIDE, $HIDE_PART_BG) set_control_par(%articulation_id[28], $CONTROL_PAR_TEXT_ALIGNMENT, 1) {position the labels above the sliders & set their fonts} $count := 23 while ($count < 27) set_control_par (%articulation_id[$count],$CONTROL_PAR_POS_X,... get_control_par(%articulation_id[$count-4],$CONTROL_PAR_POS_X) - 20) set_control_par (%articulation_id[$count],$CONTROL_PAR_POS_Y,... get_control_par(%articulation_id[$count-4],$CONTROL_PAR_POS_Y) + 43) set_control_par(%articulation_id[$count], $CONTROL_PAR_FONT_TYPE, $FONT_ID) inc($count) end while {VARIOUS ATTRIBUTES} set_control_par(%articulation_id[19], $CONTROL_PAR_DEFAULT_VALUE, 631000) set_control_par(%articulation_id[0], $CONTROL_PAR_HIDE, $HIDE_PART_BG) $count := 1 while ($count < 7) set_control_par_str(%articulation_id[$count], $CONTROL_PAR_PICTURE, "pv_choir_list_switch") set_control_par(%articulation_id[$count], $CONTROL_PAR_HEIGHT, 18) set_control_par(%articulation_id[$count], $CONTROL_PAR_WIDTH, 27) inc($count) end while $count := 7 while ($count < 13) set_control_par(%articulation_id[$count], $CONTROL_PAR_HIDE, $HIDE_PART_BG) inc($count) end while $count := 13 while ($count < 19) set_control_par_str(%articulation_id[$count], $CONTROL_PAR_PICTURE, "pv_choir_list_point_switch") inc($count) end while $count := 19 while ($count < 23) set_control_par_str(%articulation_id[$count], $CONTROL_PAR_PICTURE, "pv_choir_knob_small") set_control_par(%articulation_id[$count], $CONTROL_PAR_MOUSE_BEHAVIOUR, -500) inc($count) end while $count := 23 while ($count < 27) set_control_par(%articulation_id[$count], $CONTROL_PAR_HIDE, $HIDE_PART_BG) set_control_par(%articulation_id[$count], $CONTROL_PAR_TEXT_ALIGNMENT, 1) inc($count) end while set_control_par (get_ui_id($header_articulation),$CONTROL_PAR_WIDTH,130) set_text($header_articulation,"") {IMPORTANT DECLARATIONS} declare %actual_keyswitches[6] {the six keyswitch notes from kontakt} $count := 0 while ($count < 6) if(_get_engine_par($ENGINE_PAR_START_CRITERIA_MODE,$count,0,-1) = $START_CRITERIA_ON_KEY) %actual_keyswitches[$count] := _get_engine_par($ENGINE_PAR_START_CRITERIA_KEY_MIN,$count,0,-1) end if inc($count) end while {key colouring initialization} $count := 0 while ($count < 127) set_key_color($count, $KEY_COLOR_NONE) inc($count) end while $count := 0 while ($count < 6) set_key_color(%actual_keyswitches[$count], $KEY_COLOR_WHITE) inc($count) end while {ARTICULATION BUTTON STUFF} $button_1 := 1 make_persistent($button_1) make_persistent($button_2) make_persistent($button_3) make_persistent($button_4) make_persistent($button_5) make_persistent($button_6) {name all buttons} $count := 0 while ($count < 6) {there are six buttons} set_control_par_str(%articulation_id[$count+1],$CONTROL_PAR_TEXT,group_name($count)) inc($count) end while {VALUE EDIT STUFF} {set size} $count := 0 while ($count < 6) {there are six value edits} set_control_par(%articulation_id[$count+7],$CONTROL_PAR_WIDTH,45) inc($count) end while {delete text} $count := 0 while ($count < 6) set_control_par_str(%articulation_id[$count+7],$CONTROL_PAR_TEXT,"") inc($count) end while {initialize with keyswitches} $count := 0 while ($count < 6) set_control_par(%articulation_id[$count+7],$CONTROL_PAR_VALUE,%actual_keyswitches[$count]) inc($count) end while make_persistent($key_switch_1) make_persistent($key_switch_2) make_persistent($key_switch_3) make_persistent($key_switch_4) make_persistent($key_switch_5) make_persistent($key_switch_6) _read_persistent_var($key_switch_1) _read_persistent_var($key_switch_2) _read_persistent_var($key_switch_3) _read_persistent_var($key_switch_4) _read_persistent_var($key_switch_5) _read_persistent_var($key_switch_6) _pgs_set_key_val(DKS_KEYSWITCHES, 0, $key_switch_1 + $DKS_TRANSPOSE) _pgs_set_key_val(DKS_KEYSWITCHES, 1, $key_switch_2 + $DKS_TRANSPOSE) _pgs_set_key_val(DKS_KEYSWITCHES, 2, $key_switch_3 + $DKS_TRANSPOSE) _pgs_set_key_val(DKS_KEYSWITCHES, 3, $key_switch_4 + $DKS_TRANSPOSE) _pgs_set_key_val(DKS_KEYSWITCHES, 4, $key_switch_5 + $DKS_TRANSPOSE) _pgs_set_key_val(DKS_KEYSWITCHES, 5, $key_switch_6 + $DKS_TRANSPOSE) set_key_color($key_switch_1, $KEY_COLOR_RED) set_key_color($key_switch_2, $KEY_COLOR_RED) set_key_color($key_switch_3, $KEY_COLOR_RED) set_key_color($key_switch_4, $KEY_COLOR_RED) set_key_color($key_switch_5, $KEY_COLOR_RED) set_key_color($key_switch_6, $KEY_COLOR_RED) {LOAD BUTTON STUFF} {name all buttons} $count := 13 while ($count < 19) {there are six buttons} set_control_par_str(%articulation_id[$count],$CONTROL_PAR_TEXT,"") inc($count) end while {initialize all buttons to the value 1} $count := 13 while ($count < 19) set_control_par(%articulation_id[$count],$CONTROL_PAR_VALUE,1) inc($count) end while make_persistent($load_button_1) make_persistent($load_button_2) make_persistent($load_button_3) make_persistent($load_button_4) make_persistent($load_button_5) make_persistent($load_button_6) {KNOB AND LABEL STUFF} set_text ($vol_label,"Level") set_text ($fade_label,"Dynamic Fade") set_text ($attack_label,"Attack") set_text ($release_label,"Release") set_text ($lb_group_2_button, "Group 2") set_control_par(get_ui_id($vol_knob),$CONTROL_PAR_DEFAULT_VALUE,500000) set_control_par(get_ui_id($release_knob),$CONTROL_PAR_DEFAULT_VALUE,600000) set_control_par(get_ui_id($fade_knob),$CONTROL_PAR_DEFAULT_VALUE,350) {make_persistent ($fade_knob)} {initialize values} read_persistent_var($active_group) $vol_env_idx := find_mod($active_group,"VOL_ENV") $vol_knob := get_engine_par($ENGINE_PAR_VOLUME,$active_group,-1,-1) $attack_knob := get_engine_par($ENGINE_PAR_ATTACK,$active_group,$vol_env_idx,-1) $release_knob := get_engine_par($ENGINE_PAR_RELEASE,$active_group,$vol_env_idx,-1) $fade_knob := _pgs_get_key_val(DKS_FADETIMES, $active_group) set_control_par_str(get_ui_id($group_2_button),$CONTROL_PAR_AUTOMATION_NAME,"Group 2") set_control_par_str(get_ui_id($vol_knob),$CONTROL_PAR_AUTOMATION_NAME,"Level") set_control_par_str(get_ui_id($attack_knob),$CONTROL_PAR_AUTOMATION_NAME,"Attack") set_control_par_str(get_ui_id($release_knob),$CONTROL_PAR_AUTOMATION_NAME,"Release") set_control_par_str(get_ui_id($fade_knob),$CONTROL_PAR_AUTOMATION_NAME,"Fade") {read_persistent_var($fade_knob)} set_control_par_str(get_ui_id($vol_knob),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_VOLUME,$active_group,-1,-1) & " dB") set_control_par_str(get_ui_id($attack_knob),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_ATTACK,$active_group,$vol_env_idx,-1) & " ms") set_control_par_str(get_ui_id($release_knob),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_RELEASE,$active_group,$vol_env_idx,-1) & " ms") set_control_par_str(get_ui_id($fade_knob),$CONTROL_PAR_LABEL,$fade_knob & " ms") {GROUP 2 BUTTON STUFF} $group_2_button := 1 set_text ($group_2_button,"") make_persistent ($group_2_button) set_control_par_str(%articulation_id[27], $CONTROL_PAR_PICTURE, "pv_orchestral_btn") set_control_par(%articulation_id[27], $CONTROL_PAR_HEIGHT, 40) set_control_par(%articulation_id[27], $CONTROL_PAR_WIDTH, 40) declare %group_2_states[6] {the on/off states for each of the six articulations} $count := 0 while ($count < 6) %group_2_states[$count] := 1 inc ($count) end while make_persistent (%group_2_states) {Other} $count := 0 while ($count < $NUM_ARTICULATION) set_control_par (%articulation_id[$count],$CONTROL_PAR_POS_X,get_control_par(%articulation_id[$count],$CONTROL_PAR_POS_X)... +$ROOT_X + ($x_grid_articulation - 2)*$GRID_X + $x_px_articulation) set_control_par (%articulation_id[$count],$CONTROL_PAR_POS_Y,get_control_par(%articulation_id[$count],$CONTROL_PAR_POS_Y)... +$ROOT_Y + ($y_grid_articulation - 2)*$GRID_Y + $y_px_articulation) inc($count) end while {*** END CONTROL GROUP "ARTICULATION"} {*** CONTROL GROUP "INSTCONTROLS"} {POSITIONING OF CONTROL GROUP} declare $x_grid_instcontrols := 1 {X Position of Control Group in grid} declare $y_grid_instcontrols := 2 {Y Position of Control Group in grid} declare $x_px_instcontrols := 0 {X Position Offset Control Group in pixel} declare $y_px_instcontrols := 0 {Y Position Offset Control Group in pixel} {DECLARATION AND UI_IDs} declare const $NUM_INSTCONTROL := 12 {number of controls in this control group} declare ui_switch $dyn_rel_button declare ui_switch $fade_button declare ui_slider $sound_knob (0,100) declare ui_slider $chord_knob (0,9) declare ui_slider $key_knob(0,11) declare ui_slider $scale_knob (0,22) declare ui_label $label_1_instcontrol (1,1) declare ui_label $label_2_instcontrol (1,1) declare ui_label $label_3_instcontrol (1,1) declare ui_label $label_4_instcontrol (1,1) declare ui_label $label_5_instcontrol (1,1) declare ui_label $label_6_instcontrol (1,1) declare %instcontrol_id[$NUM_INSTCONTROL] %instcontrol_id[0] := get_ui_id($dyn_rel_button) %instcontrol_id[1] := get_ui_id($sound_knob) %instcontrol_id[2] := get_ui_id($chord_knob) %instcontrol_id[3] := get_ui_id($key_knob) %instcontrol_id[4] := get_ui_id($scale_knob) %instcontrol_id[5] := get_ui_id($fade_button) %instcontrol_id[6] := get_ui_id($label_1_instcontrol) %instcontrol_id[7] := get_ui_id($label_2_instcontrol) %instcontrol_id[8] := get_ui_id($label_3_instcontrol) %instcontrol_id[9] := get_ui_id($label_4_instcontrol) %instcontrol_id[10] := get_ui_id($label_5_instcontrol) %instcontrol_id[11] := get_ui_id($label_6_instcontrol) {POSITIONING OF INDIVIDUAL CONTROLS} move_control_px($dyn_rel_button,($GRID_X * 2) + 3, ($GRID_Y * 2) + 17) move_control_px($sound_knob, ($GRID_X * 2) + 87, ($GRID_Y * 2) + 9) move_control_px($chord_knob, ($GRID_X * 3) + 86, ($GRID_Y * 2) + 9) {possible to offset control in pixels} move_control_px($key_knob, ($GRID_X * 4) + 85, ($GRID_Y * 2) + 9) move_control_px($scale_knob, ($GRID_X * 5) + 84, ($GRID_Y * 2) + 9) move_control_px($fade_button,($GRID_X * 1) + 4, ($GRID_Y * 2) + 17) {position the labels above the sliders} $count := 6 while ($count < 12) set_control_par (%instcontrol_id[$count],$CONTROL_PAR_POS_X,... get_control_par(%instcontrol_id[$count-6],$CONTROL_PAR_POS_X)-16) set_control_par (%instcontrol_id[$count],$CONTROL_PAR_POS_Y,... get_control_par(%instcontrol_id[$count-6],$CONTROL_PAR_POS_Y) + 57) set_control_par(%instcontrol_id[$count],$CONTROL_PAR_HIDE,$HIDE_PART_BG) set_control_par(%instcontrol_id[$count], $CONTROL_PAR_TEXT_ALIGNMENT, 1) set_control_par(%instcontrol_id[$count], $CONTROL_PAR_FONT_TYPE, $FONT_ID) inc($count) end while set_control_par (%instcontrol_id[6],$CONTROL_PAR_POS_X,... get_control_par(%instcontrol_id[0],$CONTROL_PAR_POS_X)-24) set_control_par (%instcontrol_id[6],$CONTROL_PAR_POS_Y,... get_control_par(%instcontrol_id[0],$CONTROL_PAR_POS_Y) + 49) set_control_par (%instcontrol_id[11],$CONTROL_PAR_POS_X,... get_control_par(%instcontrol_id[5],$CONTROL_PAR_POS_X)-24) set_control_par (%instcontrol_id[11],$CONTROL_PAR_POS_Y,... get_control_par(%instcontrol_id[5],$CONTROL_PAR_POS_Y) + 49) {VARIOUS ATTRIBUTES} $count := 1 while ($count < 5) set_control_par_str(%instcontrol_id[$count], $CONTROL_PAR_PICTURE, "pv_choir_knob_big") set_control_par(%instcontrol_id[$count], $CONTROL_PAR_MOUSE_BEHAVIOUR, -500) inc($count) end while set_control_par_str(%instcontrol_id[0], $CONTROL_PAR_PICTURE, "pv_orchestral_btn") set_control_par(%instcontrol_id[0], $CONTROL_PAR_HEIGHT, 40) set_control_par(%instcontrol_id[0], $CONTROL_PAR_WIDTH, 40) set_control_par_str(%instcontrol_id[5], $CONTROL_PAR_PICTURE, "pv_orchestral_btn") set_control_par(%instcontrol_id[5], $CONTROL_PAR_HEIGHT, 40) set_control_par(%instcontrol_id[5], $CONTROL_PAR_WIDTH, 40) declare const $REAL_TONAL := 0 declare const $MAPPING_STYLE := 2 {If note is not in scale (Tonal Mode): $MAPPING_STYLE = 0 -> Play only original Note $MAPPING_STYLE = 1 -> Play nothing $MAPPING_STYLE = 2 -> Play next higher chord $MAPPING_STYLE = 3 -> Play next lower chord $MAPPING_STYLE = 4 -> like 2, but original note is always played and not constrained to scale} declare !note_names[12] !note_names[0] := "C" !note_names[1] := "Db" !note_names[2] := "D" !note_names[3] := "Eb" !note_names[4] := "E" !note_names[5] := "F" !note_names[6] := "Gb" !note_names[7] := "G" !note_names[8] := "Ab" !note_names[9] := "A" !note_names[10] := "Bb" !note_names[11] := "B" declare !scale_names[24] !scale_names[0] := "Off" !scale_names[1] := "Major" !scale_names[2] := "Minor" !scale_names[3] := "Harmonic Minor" !scale_names[4] := "Melodic Minor" !scale_names[5] := "Dorian" !scale_names[6] := "Phrygian" !scale_names[7] := "Lydian" !scale_names[8] := "Mixolydian" !scale_names[9] := "Locrian" !scale_names[10] := "Whole-Tone" !scale_names[11] := "Diminished" !scale_names[12] := "Octatonic" !scale_names[13] := "Pentatonic Major" !scale_names[14] := "Pentatonic Minor" !scale_names[15] := "Blues" !scale_names[16] := "Messiaen III" !scale_names[17] := "Messiaen IV" !scale_names[18] := "Messiaen V" !scale_names[19] := "Messiaen VI" !scale_names[20] := "Messiaen VII" !scale_names[21] := "Lydian b7" !scale_names[22] := "Locrian #9" !scale_names[23] := "Major-Minor" {0 = in scale, 1 = not in scale (based on C)} declare %scale_types[24*12] := (... 0,0,0,0,0,0,0,0,0,0,0,0, {Chromatic }... 0,1,0,1,0,0,1,0,1,0,1,0, {Major }... 0,1,0,0,1,0,1,0,0,1,0,1, {Natural Minor}... 0,1,0,0,1,0,1,0,0,1,1,0, {Harmonic Minor}... 0,1,0,0,1,0,1,0,1,0,1,0, {Melodic Minor}... 0,1,0,0,1,0,1,0,1,0,0,1, {Dorian }... 0,0,1,0,1,0,1,0,0,1,0,1, {Phrygian }... 0,1,0,1,0,1,0,0,1,0,1,0, {Lydian }... 0,1,0,1,0,0,1,0,1,0,0,1, {Mixolydian }... 0,0,1,0,1,0,0,1,0,1,0,1, {Locrian }... 0,1,0,1,0,1,0,1,0,1,0,1, {Whole-Tone }... 0,0,1,0,0,1,0,0,1,0,0,1, {Diminished }... 0,1,0,0,1,0,0,1,0,0,1,0, {Octatonic }... 0,1,0,1,0,1,1,0,1,0,1,1, {Pentatonic Maj}... 0,1,1,0,1,0,1,0,1,1,0,1, {Pentatonic Min}... 0,1,1,0,1,0,0,0,1,1,0,1, {Pentatonic Blues}... 0,1,0,0,0,1,0,0,0,1,0,0, {Messiaen III}... 0,0,0,1,1,0,0,0,0,1,1,0, {Messiaen IV}... 0,0,1,1,1,0,0,0,1,1,1,0, {Messiaen V}... 0,1,0,1,0,0,0,1,0,1,0,0, {Messiaen VI}... 0,0,0,0,1,0,0,0,0,0,1,0, {Messiaen VII}... 0,1,0,1,0,1,0,0,1,0,0,1, {Lydian b7}... 0,1,0,0,1,0,0,1,0,1,0,1, {Locrian #9}... 0,1,0,1,0,0,1,0,0,1,0,1) {Major-Minor} declare !harmo_names[10] !harmo_names[0] := "Off" !harmo_names[1] := "Octave" !harmo_names[2] := "Third" !harmo_names[3] := "Fifth" !harmo_names[4] := "1-3-5" !harmo_names[5] := "1-3-6" !harmo_names[6] := "1-4-6" !harmo_names[7] := "1-4-5" !harmo_names[8] := "1-4-7" !harmo_names[9] := "1-5-8" set_text ($label_1_instcontrol,"Dynamic Release") set_text ($label_2_instcontrol,"Sound") set_text ($label_3_instcontrol,"Chord") set_text ($label_4_instcontrol,"Key") set_text ($label_5_instcontrol,"Scale") set_text ($label_6_instcontrol,"Dynamic KS") set_text($dyn_rel_button,"") make_persistent ($dyn_rel_button) _read_persistent_var ($dyn_rel_button) _pgs_set_key_val(DKS_RELEASE, 0, $dyn_rel_button) make_persistent ($sound_knob) set_control_help ($sound_knob,"Sound: Morphs through various EQ settings.") make_persistent ($chord_knob) set_control_help($chord_knob,"Chord: Enables the chord function of the built-in harmonizer. You can deactivate it by turning it all the way to the left, or you can select the desired chord using any of the other options. The exact notes that are going to be triggered are relying upon the Key and Scale settings.") make_persistent ($key_knob) set_control_help($key_knob,"Key: Chooses the root key of the scale set with ") make_persistent ($scale_knob) set_control_help ($scale_knob,"Scale: Chooses a scale or mode. All incoming notes will be automatically transposed to the next higher note that is a part of the selected scale. Turn the Scale knob to Off for a chromatic scale (no effect). The scale constraint functionality also affects the notes of the chords produced using the Chord knob.") set_text($fade_button,"") make_persistent ($fade_button) _read_persistent_var($fade_button) _pgs_set_key_val(DKS_ON_OFF, 0, $fade_button) declare %tonal_chord_types[10*4] := (0,0,0,0, 8,0,0,0, 3,0,0,0, 5,0,0,0, 3,5,0,0, 3,6,0,0, 4,6,0,0, 4,5,0,0, 4,7,0,0, 5,8,0,0) declare $absolute := 0 make_persistent($absolute) declare $a declare $b declare $c declare $new_id declare %tone_note_arr[4] while($a < 4) %tone_note_arr[$a] := %tonal_chord_types[($chord_knob*4)+$a] inc($a) end while make_persistent(%tone_note_arr) declare %cur_scale[12] $a := 0 while($a < 12) %cur_scale[$a] := %scale_types[$scale_knob*12 + (($a + 12 - $key_knob) mod 12)] inc($a) end while make_persistent(%cur_scale) declare $note_helper declare $velo_helper {Other} $count := 0 while ($count < $NUM_INSTCONTROL) set_control_par (%instcontrol_id[$count],$CONTROL_PAR_POS_X,get_control_par(%instcontrol_id[$count],$CONTROL_PAR_POS_X)... +$ROOT_X + ($x_grid_instcontrols - 2)*$GRID_X + $x_px_instcontrols) set_control_par (%instcontrol_id[$count],$CONTROL_PAR_POS_Y,get_control_par(%instcontrol_id[$count],$CONTROL_PAR_POS_Y)... +$ROOT_Y + ($y_grid_instcontrols - 2)*$GRID_Y + $y_px_instcontrols) inc($count) end while declare $learn_counter declare $a_instcontrols if ($fade_button = 1) set_key_color($key_switch_1 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_2 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_3 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_4 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_5 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_6 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) end if {*** SOUND KNOB FUNCTIONALITY START} {values of freq-bandwith-gain of the various eq bands} declare %savearr_instr[10*10] := (... {0} 500000,500000,500000, 500000,500000,500000, 500000, 500000,500000,... {1} 442254, 624023,416992, 574714, 62500,500000, 1000000,1000000, 500000,... {2} 322001, 398438,444336, 529713, 61523,500000, 813582,266602, 443359,... {3} 306705,392578,500000, 471583,263672,416992, 812492, 250977,500000,... {4} 322001,392578,500000, 543888,263672,555664, 812492, 250977,417969,... {5} 227314,392578,388672, 543888,263672,555664, 812492, 250977,417969,... {6} 264492,392578,500000, 463253,263672,388672, 812492, 250977,387695,... {7} 230922,460938,388672, 463253,263672,555664, 812492, 250977,500000,... {8} 230922,460938,388672, 463253,62500,582031, 812492, 61523,555664,... {9} 230922,62500,361328, 501929,0,611328, 788233, 61523,555664,... {10} 230922,62500,361328, 460178,0,611328, 725709, 61523,611328) declare %engine_par_instr[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_instr declare $a_eq_instr declare $knob_eq_instr _read_persistent_var($sound_knob) $knob_eq_instr := ($sound_knob+10)*10 declare $index_1_instr declare $index_2_instr {*** END SOUND KNOB FUNCIONALITY} set_control_par_str(get_ui_id($dyn_rel_button),$CONTROL_PAR_AUTOMATION_NAME,"Dyn Rel") set_control_par_str(get_ui_id($fade_button),$CONTROL_PAR_AUTOMATION_NAME,"Dyn KS") set_control_par_str(get_ui_id($sound_knob),$CONTROL_PAR_AUTOMATION_NAME,"Sound") set_control_par_str(get_ui_id($chord_knob),$CONTROL_PAR_AUTOMATION_NAME,"Chord") set_control_par_str(get_ui_id($key_knob),$CONTROL_PAR_AUTOMATION_NAME,"Key") set_control_par_str(get_ui_id($scale_knob),$CONTROL_PAR_AUTOMATION_NAME,"Scale") read_persistent_var($sound_knob) read_persistent_var($chord_knob) read_persistent_var($key_knob) read_persistent_var($scale_knob) set_control_par_str(get_ui_id($sound_knob),$CONTROL_PAR_LABEL,$sound_knob & " %") set_control_par_str(get_ui_id($chord_knob),$CONTROL_PAR_LABEL,!harmo_names[$chord_knob]) set_control_par_str(get_ui_id($key_knob),$CONTROL_PAR_LABEL,!Note_names[$key_knob]) set_control_par_str(get_ui_id($scale_knob),$CONTROL_PAR_LABEL,!Scale_names[$scale_knob]) {*** END CONTROL GROUP "INSTCONTROLS"} {----------MASTER REVERB FX START----------} {POSITIONING OF CONTROL GROUP} declare $x_grid_reverb := 3 {X Position of Control Group in grid} declare $y_grid_reverb := 6 {Y Position of Control Group in grid} declare $x_px_reverb := 46 {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 := 15 {number of elements in this control group} declare ui_label $lb_wetdry_reverb (1,1) declare ui_label $image_reverb (1,1) declare ui_menu $category_reverb declare ui_slider $wetdry_reverb (0, 500000) declare ui_switch $on_off_reverb declare ui_label $lb_on_off_reverb (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) set_control_par_str(get_ui_id($image_reverb),$CONTROL_PAR_PICTURE,"pv_global_reverb_animation_big") {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" !ir_type[17] := "Hard Wood" !ir_type[18] := "Music Studio" !ir_type[19] := "Small Room A" !ir_type[20] := "Small Room B" !ir_type[21] := "Large Hall" !ir_type[22] := "Gated Hall" !ir_type[23] := "Large Room" !ir_type[24] := "Large Chamber" !ir_type[25] := "Studio C" !ir_type[26] := "Contem-Plate" !ir_type[27] := "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 Modern" !ir_type[40] := "RnB Neptunes" !ir_type[41] := "RnB Today" !ir_type[42] := "Lrg Ambience" !ir_type[43] := "Sml Ambience" !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 %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($quadstick_reverb) %reverb_id[10] := get_ui_id($brt7_reverb) %reverb_id[11] := get_ui_id($plate_reverb) %reverb_id[12] := get_ui_id($cabinet_reverb) %reverb_id[13] := get_ui_id($on_off_reverb) %reverb_id[14] := get_ui_id($lb_on_off_reverb) {VARIOUS ATTRIBUTES} set_text($lb_wetdry_reverb,"Amount") set_control_par (get_ui_id($wetdry_reverb),$CONTROL_PAR_DEFAULT_VALUE,250000) set_text($lb_on_off_reverb, "On/Off") set_text($image_reverb,"") set_control_par(%reverb_id[0], $CONTROL_PAR_HIDE, $HIDE_PART_BG) set_control_par(%reverb_id[14], $CONTROL_PAR_HIDE, $HIDE_PART_BG) set_control_par(%reverb_id[0], $CONTROL_PAR_FONT_TYPE, $FONT_ID) set_control_par(%reverb_id[14], $CONTROL_PAR_FONT_TYPE, $FONT_ID) set_control_par_str(%reverb_id[2], $CONTROL_PAR_PICTURE, "pv_choir_knob_big") set_control_par(%reverb_id[2], $CONTROL_PAR_MOUSE_BEHAVIOUR, -500) set_control_par_str(%reverb_id[13], $CONTROL_PAR_PICTURE, "pv_orchestral_btn") set_text($on_off_reverb, "") set_control_par(%reverb_id[13], $CONTROL_PAR_HEIGHT, 40) set_control_par(%reverb_id[13], $CONTROL_PAR_WIDTH, 40) $count := 3 while ($count < 13) set_control_par_str(%reverb_id[$count], $CONTROL_PAR_TEXT, "") set_control_par_str(%reverb_id[$count], $CONTROL_PAR_PICTURE, "pv_choir_dropdown_trans") set_control_par(%reverb_id[$count], $CONTROL_PAR_FONT_TYPE, $FONT_ID_2) inc($count) end while {POSITIONING OF INDIVIDUAL CONTROLS} move_control_px($lb_wetdry_reverb,($GRID_X * 2) + 37, ($GRID_Y * 2) + 9) move_control_px($image_reverb,($GRID_X * 1) + 14, ($GRID_Y * 4) + 3) move_control_px($wetdry_reverb,($GRID_X * 2) + 34, ($GRID_Y * 3) + 4) move_control_px($category_reverb,($GRID_X * 1) + 10, ($GRID_Y * 3) + 7) move_control_px($on_off_reverb,($GRID_X * 2) + 44, ($GRID_Y * 6) + 12) move_control_px($lb_on_off_reverb,($GRID_X * 2) + 41, ($GRID_Y * 5) + 18) $count := 4 while ($count < 13) set_control_par(%reverb_id[$count], $CONTROL_PAR_POS_X, ($GRID_X * 1) + 10) set_control_par(%reverb_id[$count], $CONTROL_PAR_POS_Y, ($GRID_Y * 7) + 2) set_control_par(%reverb_id[$count], $CONTROL_PAR_WIDTH, 93) inc($count) end while set_control_par(%reverb_id[3], $CONTROL_PAR_WIDTH, 93) $count := 4 while ($count<13) if($count = $category_reverb + 4) set_control_par(%reverb_id[$count],$CONTROL_PAR_HIDE,$HIDE_PART_NOTHING) else set_control_par(%reverb_id[$count], $CONTROL_PAR_HIDE, $HIDE_WHOLE_CONTROL) end if inc($count) end while $wetdry_reverb := _get_engine_par($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN, -1,$reverb_slot,1) $on_off_reverb := (_get_engine_par($ENGINE_PAR_EFFECT_BYPASS, -1, $reverb_slot, 1) + 1) mod 2 $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 set_control_par_str(get_ui_id($wetdry_reverb),$CONTROL_PAR_AUTOMATION_NAME,"Rv Amt") set_control_par_str(get_ui_id($on_off_reverb),$CONTROL_PAR_AUTOMATION_NAME,"Reverb") set_control_par_str(get_ui_id($wetdry_reverb),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN, -1,$reverb_slot,1) & " dB") {----------MASTER REVERB FX END-----------} {Control Help} set_control_help ($fade_button,"Dynamic Key Switch: Activates the Dynamic Key switches which are mapped one octave below the standard key switches. A dynamic key switch affects notes that are already sounding when it is pressed.") set_control_help ($dyn_rel_button,"Dynamic Release: When on, the original sample will be retriggered as soon as the dynamic key switch is released,. When off, releasing the dynamic key switch will leave the currently selected sample set playing.") set_control_help ($button_1,"Articulation 1: Selects the first articulation.") set_control_help ($button_2,"Articulation 2: Selects the second articulation.") set_control_help ($button_3,"Articulation 3: Selects the third articulation.") set_control_help ($button_4,"Articulation 4: Selects the fourth articulation.") set_control_help ($button_5,"Articulation 5: Selects the fifth articulation.") set_control_help ($button_6,"Articulation 6: Selects the sixth articulation.") set_control_help ($key_switch_1,"Key Switch 1: The MIDI note which selects the first articulation. The dynamic key switch of this articulation is automatically mapped one octave below this note.") set_control_help ($key_switch_2,"Key Switch 2: The MIDI note which selects the second articulation. The dynamic key switch of this articulation is automatically mapped one octave below this note.") set_control_help ($key_switch_3,"Key Switch 3: The MIDI note which selects the third articulation. The dynamic key switch of this articulation is automatically mapped one octave below this note.") set_control_help ($key_switch_4,"Key Switch 4: The MIDI note which selects the fourth articulation. The dynamic key switch of this articulation is automatically mapped one octave below this note.") set_control_help ($key_switch_5,"Key Switch 5: The MIDI note which selects the fifth articulation. The dynamic key switch of this articulation is automatically mapped one octave below this note.") set_control_help ($key_switch_6,"Key Switch 6: The MIDI note which selects the sixth articulation. The dynamic key switch of this articulation is automatically mapped one octave below this note.") set_control_help ($load_button_1,"Articulation 1: Loads and unloads the samples of the first articulation.") set_control_help ($load_button_2,"Articulation 2: Loads and unloads the samples of the second articulation.") set_control_help ($load_button_3,"Articulation 3: Loads and unloads the samples of the third articulation.") set_control_help ($load_button_4,"Articulation 4: Loads and unloads the samples of the fourth articulation.") set_control_help ($load_button_5,"Articulation 5: Loads and unloads the samples of the fifth articulation.") set_control_help ($load_button_6,"Articulation 6: Loads and unloads the samples of the sixth articulation.") set_control_help ($vol_knob,"Level: Sets the volume of the selected articulation.") set_control_help ($fade_knob,"Dynamic Fade: Controls the length of the cross-fade between the two articulations when used with dynamic key switches.") set_control_help ($attack_knob,"Attack: Sets the attack time of the volume envelope of the selected articulation.") set_control_help ($release_knob,"Release: Sets the release time of the volume envelope of the selected articulation.") set_control_help ($group_2_button,"Group 2: Activates the second group of the choir. When activated, the two groups are also slightly spread in the stereo field.") set_control_help($wetdry_reverb,"Reverb Amount: Sets the send level of the reverb effect.") set_control_help($on_off_reverb,"Reverb On/Off: Turns the reverb effect 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.") if ($CREATE_AUTOMATION_ID = 1) set_control_par(get_ui_id($group_2_button),$CONTROL_PAR_AUTOMATION_ID,13) set_control_par(get_ui_id($vol_knob),$CONTROL_PAR_AUTOMATION_ID,5) set_control_par(get_ui_id($attack_knob),$CONTROL_PAR_AUTOMATION_ID,6) set_control_par(get_ui_id($release_knob),$CONTROL_PAR_AUTOMATION_ID,7) set_control_par(get_ui_id($fade_knob),$CONTROL_PAR_AUTOMATION_ID,16) set_control_par(get_ui_id($dyn_rel_button),$CONTROL_PAR_AUTOMATION_ID,9) set_control_par(get_ui_id($fade_button),$CONTROL_PAR_AUTOMATION_ID,8) set_control_par(get_ui_id($sound_knob),$CONTROL_PAR_AUTOMATION_ID,0) set_control_par(get_ui_id($chord_knob),$CONTROL_PAR_AUTOMATION_ID,1) set_control_par(get_ui_id($key_knob),$CONTROL_PAR_AUTOMATION_ID,2) set_control_par(get_ui_id($scale_knob),$CONTROL_PAR_AUTOMATION_ID,3) set_control_par(get_ui_id($wetdry_reverb),$CONTROL_PAR_AUTOMATION_ID,4) set_control_par(get_ui_id($on_off_reverb),$CONTROL_PAR_AUTOMATION_ID,12) end if end on on note ignore_event($EVENT_ID) play_note(%actual_keyswitches[$active_group],1,0,1000) $played_note_id := play_note($EVENT_NOTE,$EVENT_VELOCITY,0,-1) change_vol($played_note_id,get_event_par($EVENT_ID,$EVENT_PAR_VOLUME),1) change_tune($played_note_id,get_event_par($EVENT_ID,$EVENT_PAR_TUNE),1) change_pan($played_note_id,get_event_par($EVENT_ID,$EVENT_PAR_PAN),1) {if incoming note equals one of the six EXISTING keyswitches ignore them} if (search(%actual_keyswitches,$EVENT_NOTE) # -1) ignore_event($EVENT_ID) end if {if incoming note equals one of the six value edits} if ($EVENT_NOTE = $key_switch_1 or... $EVENT_NOTE = $key_switch_2 or... $EVENT_NOTE = $key_switch_3 or... $EVENT_NOTE = $key_switch_4 or... $EVENT_NOTE = $key_switch_5 or... $EVENT_NOTE = $key_switch_6) {set all buttons to zero} $count := 0 while ($count < 6) set_control_par(%articulation_id[$count+1],$CONTROL_PAR_VALUE,0) inc($count) end while ignore_event($EVENT_ID) if($EVENT_NOTE = $key_switch_1) $button_1 := 1 $active_group := 0 play_note(%actual_keyswitches[0],1,0,1000) end if if($EVENT_NOTE = $key_switch_2) $button_2 := 1 $active_group := 1 play_note(%actual_keyswitches[1],1,0,1000) end if if($EVENT_NOTE = $key_switch_3) $button_3 := 1 $active_group := 2 play_note(%actual_keyswitches[2],1,0,1000) end if if($EVENT_NOTE = $key_switch_4) $button_4 := 1 $active_group := 3 play_note(%actual_keyswitches[3],1,0,1000) end if if($EVENT_NOTE = $key_switch_5) $button_5 := 1 $active_group := 4 play_note(%actual_keyswitches[4],1,0,1000) end if if($EVENT_NOTE = $key_switch_6) $button_6 := 6 $active_group := 5 play_note(%actual_keyswitches[5],1,0,1000) end if {get values for four knobs & switch} $vol_knob := _get_engine_par ($ENGINE_PAR_VOLUME,$active_group,-1,-1) $attack_knob := _get_engine_par ($ENGINE_PAR_ATTACK,$active_group,$vol_env_idx,-1) $release_knob := _get_engine_par ($ENGINE_PAR_RELEASE,$active_group,$vol_env_idx,-1) $fade_knob := _pgs_get_key_val (DKS_FADETIMES, $active_group) $group_2_button := %group_2_states[$active_group] exit end if if ($fade_button = 1 and ($EVENT_NOTE = $key_switch_1 + $DKS_TRANSPOSE or... $EVENT_NOTE = $key_switch_2 + $DKS_TRANSPOSE or... $EVENT_NOTE = $key_switch_3 + $DKS_TRANSPOSE or... $EVENT_NOTE = $key_switch_4 + $DKS_TRANSPOSE or... $EVENT_NOTE = $key_switch_5 + $DKS_TRANSPOSE or... $EVENT_NOTE = $key_switch_6 + $DKS_TRANSPOSE)) exit end if {harmonization & restrain to scale START} if (%cur_scale[$EVENT_NOTE mod 12] = 1) select ($mapping_style) case 0 exit case 1 ignore_event($EVENT_ID) exit case 2 {this is our default case} $a := 1 while($a < 12) if (%cur_scale[($EVENT_NOTE+$a) mod 12] = 0 ) change_note($played_note_id,$EVENT_NOTE+$a) $a := 100 end if inc($a) end while case 3 $a := -1 while($a > -12) if (%cur_scale[($EVENT_NOTE+$a) mod 12] = 0 ) change_note($played_note_id,$EVENT_NOTE+$a) $a := -100 end if dec($a) end while case 4 $a := 1 while($a < 12) if (%cur_scale[($EVENT_NOTE+$a) mod 12] = 0 ) $a := 100 end if inc($a) end while end select end if if ($absolute = 0) $c := 0 while($c < 4) if (%tone_note_arr[$c] > 0) $a := 0 $b := 0 while(%tone_note_arr[$c] > $b and ($EVENT_NOTE+$a) > -1 and ($EVENT_NOTE+$a) < 128) if (%cur_scale[($EVENT_NOTE+$a) mod 12] = 0) inc($b) end if if ($b = %tone_note_arr[$c]) $note_helper := $EVENT_NOTE + $a if ($note_helper >= 0 and $note_helper <= 127 and $note_helper # $EVENT_NOTE) $new_id := play_note($note_helper,$EVENT_VELOCITY,0,-1) change_vol($new_id,get_event_par($EVENT_ID,$EVENT_PAR_VOLUME),1) change_tune($new_id,get_event_par($EVENT_ID,$EVENT_PAR_TUNE),1) change_pan($new_id,get_event_par($EVENT_ID,$EVENT_PAR_PAN),1) end if end if inc($a) end while end if inc($c) end while else $c := 0 while($c < 4) $note_helper := 0 select (%tone_note_arr[$c]) case 2 if (%cur_scale[($EVENT_NOTE+2) mod 12] = 0) $note_helper := $EVENT_NOTE + 2 else if (%cur_scale[($EVENT_NOTE+1) mod 12] = 0) $note_helper := $EVENT_NOTE + 1 end if end if case 3 if (%cur_scale[($EVENT_NOTE+4) mod 12] = 0) $note_helper := $EVENT_NOTE + 4 else if (%cur_scale[($EVENT_NOTE+3) mod 12] = 0) $note_helper := $EVENT_NOTE + 3 else if (%cur_scale[($EVENT_NOTE+2) mod 12] = 0) $note_helper := $EVENT_NOTE + 2 else if (%cur_scale[($EVENT_NOTE+5) mod 12] = 0) $note_helper := $EVENT_NOTE + 5 end if end if end if end if case 4 if (%cur_scale[($EVENT_NOTE+5) mod 12] = 0) $note_helper := $EVENT_NOTE + 5 else if (%cur_scale[($EVENT_NOTE+6) mod 12] = 0) $note_helper := $EVENT_NOTE + 6 else if (%cur_scale[($EVENT_NOTE+4) mod 12] = 0) $note_helper := $EVENT_NOTE + 4 end if end if end if case 5 if (%cur_scale[($EVENT_NOTE+7) mod 12] = 0) $note_helper := $EVENT_NOTE + 7 else if (%cur_scale[($EVENT_NOTE+6) mod 12] = 0) $note_helper := $EVENT_NOTE + 6 else if (%cur_scale[($EVENT_NOTE+8) mod 12] = 0) $note_helper := $EVENT_NOTE + 8 end if end if end if case 6 if (%cur_scale[($EVENT_NOTE+9) mod 12] = 0) $note_helper := $EVENT_NOTE + 9 else if (%cur_scale[($EVENT_NOTE+8) mod 12] = 0) $note_helper := $EVENT_NOTE + 8 else if (%cur_scale[($EVENT_NOTE+10) mod 12] = 0) $note_helper := $EVENT_NOTE + 10 end if end if end if case 7 if (%cur_scale[($EVENT_NOTE+10) mod 12] = 0) $note_helper := $EVENT_NOTE + 10 else if (%cur_scale[($EVENT_NOTE+11) mod 12] = 0) $note_helper := $EVENT_NOTE + 11 else if (%cur_scale[($EVENT_NOTE+9) mod 12] = 0) $note_helper := $EVENT_NOTE + 9 end if end if end if case 8 $note_helper := $EVENT_NOTE + 12 end select if ($note_helper > 0 and $note_helper <= 127 and $note_helper # $EVENT_NOTE) $new_id := play_note($note_helper,$EVENT_VELOCITY,0,-1) change_vol($new_id,get_event_par($EVENT_ID,$EVENT_PAR_VOLUME),1) change_tune($new_id,get_event_par($EVENT_ID,$EVENT_PAR_TUNE),1) change_pan($new_id,get_event_par($EVENT_ID,$EVENT_PAR_PAN),1) end if inc($c) end while end if end on on ui_control ($dyn_rel_button) _pgs_set_key_val(DKS_RELEASE, 0, $dyn_rel_button) end on on ui_control ($chord_knob) $a := 0 while($a < 4) %tone_note_arr[$a] := %tonal_chord_types[($chord_knob*4)+$a] inc($a) end while set_text ($label_3_instcontrol,!harmo_names[$chord_knob]) set_control_par_str(get_ui_id($chord_knob),$CONTROL_PAR_LABEL,!harmo_names[$chord_knob]) if ($chord_knob < 1 or $scale_knob = 0 or $REAL_TONAL = 1) $absolute := 1 else $absolute := 0 end if $last_time_1 := $ENGINE_UPTIME wait($wait_time * 1000) if($ENGINE_UPTIME - $last_time_1 > $wait_time -5) set_text ($label_3_instcontrol,"Chord") end if end on on ui_control ($scale_knob) $a := 0 while($a < 12) %cur_scale[$a] := %scale_types[$scale_knob*12 + (($a + 12 - $key_knob) mod 12)] inc($a) end while set_text($label_5_instcontrol,!Scale_names[$scale_knob]) set_control_par_str(get_ui_id($scale_knob),$CONTROL_PAR_LABEL,!Scale_names[$scale_knob]) if ($chord_knob < 1 or $scale_knob = 0 or $REAL_TONAL = 1) $absolute := 1 else $absolute := 0 end if $last_time_2 := $ENGINE_UPTIME wait($wait_time * 1000) if($ENGINE_UPTIME - $last_time_2 > $wait_time -5) set_text ($label_5_instcontrol,"Scale") end if end on on ui_control ($key_knob) $a := 0 while($a < 12) %cur_scale[$a] := %scale_types[$scale_knob*12 + (($a + 12 - $key_knob) mod 12)] inc($a) end while set_text($label_4_instcontrol,!Note_names[$key_knob]) set_control_par_str(get_ui_id($key_knob),$CONTROL_PAR_LABEL,!Note_names[$key_knob]) $last_time_3 := $ENGINE_UPTIME wait($wait_time * 1000) if($ENGINE_UPTIME - $last_time_3 > $wait_time -5) set_text ($label_4_instcontrol,"Key") end if end on on ui_control ($fade_button) _pgs_set_key_val(DKS_ON_OFF, 0, $fade_button) $count := 0 while ($count < 127) set_key_color($count, $KEY_COLOR_NONE) inc($count) end while $count := 0 while ($count < 6) set_key_color(%actual_keyswitches[$count], $KEY_COLOR_WHITE) inc($count) end while set_key_color($key_switch_1, $KEY_COLOR_RED) set_key_color($key_switch_2, $KEY_COLOR_RED) set_key_color($key_switch_3, $KEY_COLOR_RED) set_key_color($key_switch_4, $KEY_COLOR_RED) set_key_color($key_switch_5, $KEY_COLOR_RED) set_key_color($key_switch_6, $KEY_COLOR_RED) if ($fade_button = 1) set_key_color($key_switch_1 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_2 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_3 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_4 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_5 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_6 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) end if end on on ui_control ($sound_knob) $index_1_instr := $sound_knob/10 $index_2_instr := $sound_knob/10 +1 $knob_eq_instr := $sound_knob*10 if ($index_2_instr > 10) $index_2_instr := 10 end if $a_eq_instr := 0 while($a_eq_instr < 9) $helper_eq_instr := ((%savearr_instr[($index_2_instr*9) + $a_eq_instr] - %savearr_instr[($index_1_instr*9)... + $a_eq_instr]) * ($knob_eq_instr mod 100))/100 + %savearr_instr[($index_1_instr*9) + $a_eq_instr] _set_engine_par(%engine_par_instr[$a_eq_instr],$helper_eq_instr,-1,$eq_slot,1) inc($a_eq_instr) end while set_control_par_str(get_ui_id($sound_knob),$CONTROL_PAR_LABEL,$sound_knob & " %") end on {END INSTRUMENT CONTROLS CALLBACKS} {START ARTICULATION CALLBAKCS} on ui_control ($button_1) $count := 0 while ($count < 6) {there are six buttons} set_control_par(%articulation_id[$count+1],$CONTROL_PAR_VALUE,0) inc($count) end while $button_1 := 1 $active_group := 0 play_note(%actual_keyswitches[0],1,0,1000) $vol_knob := _get_engine_par ($ENGINE_PAR_VOLUME,$active_group,-1,-1) $attack_knob := _get_engine_par ($ENGINE_PAR_ATTACK,$active_group,$vol_env_idx,-1) $release_knob := _get_engine_par ($ENGINE_PAR_RELEASE,$active_group,$vol_env_idx,-1) $fade_knob := _pgs_get_key_val(DKS_FADETIMES, $active_group) $group_2_button := %group_2_states[$active_group] end on on ui_control ($button_2) $count := 0 while ($count < 6) {there are six buttons} set_control_par(%articulation_id[$count+1],$CONTROL_PAR_VALUE,0) inc($count) end while $button_2 := 1 $active_group := 1 play_note(%actual_keyswitches[1],1,0,1000) $vol_knob := _get_engine_par ($ENGINE_PAR_VOLUME,$active_group,-1,-1) $attack_knob := _get_engine_par ($ENGINE_PAR_ATTACK,$active_group,$vol_env_idx,-1) $release_knob := _get_engine_par ($ENGINE_PAR_RELEASE,$active_group,$vol_env_idx,-1) $fade_knob := _pgs_get_key_val(DKS_FADETIMES, $active_group) $group_2_button := %group_2_states[$active_group] end on on ui_control ($button_3) $count := 0 while ($count < 6) {there are six buttons} set_control_par(%articulation_id[$count+1],$CONTROL_PAR_VALUE,0) inc($count) end while $button_3 := 1 $active_group := 2 play_note(%actual_keyswitches[2],1,0,1000) $vol_knob := _get_engine_par ($ENGINE_PAR_VOLUME,$active_group,-1,-1) $attack_knob := _get_engine_par ($ENGINE_PAR_ATTACK,$active_group,$vol_env_idx,-1) $release_knob := _get_engine_par ($ENGINE_PAR_RELEASE,$active_group,$vol_env_idx,-1) $fade_knob := _pgs_get_key_val(DKS_FADETIMES, $active_group) $group_2_button := %group_2_states[$active_group] end on on ui_control ($button_4) $count := 0 while ($count < 6) {there are six buttons} set_control_par(%articulation_id[$count+1],$CONTROL_PAR_VALUE,0) inc($count) end while $button_4 := 1 $active_group := 3 play_note(%actual_keyswitches[3],1,0,1000) $vol_knob := _get_engine_par ($ENGINE_PAR_VOLUME,$active_group,-1,-1) $attack_knob := _get_engine_par ($ENGINE_PAR_ATTACK,$active_group,$vol_env_idx,-1) $release_knob := _get_engine_par ($ENGINE_PAR_RELEASE,$active_group,$vol_env_idx,-1) $fade_knob := _pgs_get_key_val(DKS_FADETIMES, $active_group) $group_2_button := %group_2_states[$active_group] end on on ui_control ($button_5) $count := 0 while ($count < 6) {there are six buttons} set_control_par(%articulation_id[$count+1],$CONTROL_PAR_VALUE,0) inc($count) end while $button_5 := 1 $active_group := 4 play_note(%actual_keyswitches[4],1,0,1000) $vol_knob := _get_engine_par ($ENGINE_PAR_VOLUME,$active_group,-1,-1) $attack_knob := _get_engine_par ($ENGINE_PAR_ATTACK,$active_group,$vol_env_idx,-1) $release_knob := _get_engine_par ($ENGINE_PAR_RELEASE,$active_group,$vol_env_idx,-1) $fade_knob := _pgs_get_key_val(DKS_FADETIMES, $active_group) $group_2_button := %group_2_states[$active_group] end on on ui_control ($button_6) $count := 0 while ($count < 6) {there are six buttons} set_control_par(%articulation_id[$count+1],$CONTROL_PAR_VALUE,0) inc($count) end while $button_6 := 1 $active_group := 5 play_note(%actual_keyswitches[5],1,0,1000) $vol_knob := _get_engine_par ($ENGINE_PAR_VOLUME,$active_group,-1,-1) $attack_knob := _get_engine_par ($ENGINE_PAR_ATTACK,$active_group,$vol_env_idx,-1) $release_knob := _get_engine_par ($ENGINE_PAR_RELEASE,$active_group,$vol_env_idx,-1) $fade_knob := _pgs_get_key_val(DKS_FADETIMES, $active_group) $group_2_button := %group_2_states[$active_group] end on on ui_control ($key_switch_1) _pgs_set_key_val(DKS_KEYSWITCHES, 0, $key_switch_1 + $DKS_TRANSPOSE) $count := 0 while ($count < 127) set_key_color($count, $KEY_COLOR_NONE) inc($count) end while $count := 0 while ($count < 6) set_key_color(%actual_keyswitches[$count], $KEY_COLOR_WHITE) inc($count) end while set_key_color($key_switch_1, $KEY_COLOR_RED) set_key_color($key_switch_2, $KEY_COLOR_RED) set_key_color($key_switch_3, $KEY_COLOR_RED) set_key_color($key_switch_4, $KEY_COLOR_RED) set_key_color($key_switch_5, $KEY_COLOR_RED) set_key_color($key_switch_6, $KEY_COLOR_RED) if ($fade_button = 1) set_key_color($key_switch_1 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_2 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_3 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_4 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_5 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_6 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) end if end on on ui_control ($key_switch_2) _pgs_set_key_val(DKS_KEYSWITCHES, 1, $key_switch_2 + $DKS_TRANSPOSE) $count := 0 while ($count < 127) set_key_color($count, $KEY_COLOR_NONE) inc($count) end while $count := 0 while ($count < 6) set_key_color(%actual_keyswitches[$count], $KEY_COLOR_WHITE) inc($count) end while set_key_color($key_switch_1, $KEY_COLOR_RED) set_key_color($key_switch_2, $KEY_COLOR_RED) set_key_color($key_switch_3, $KEY_COLOR_RED) set_key_color($key_switch_4, $KEY_COLOR_RED) set_key_color($key_switch_5, $KEY_COLOR_RED) set_key_color($key_switch_6, $KEY_COLOR_RED) if ($fade_button = 1) set_key_color($key_switch_1 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_2 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_3 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_4 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_5 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_6 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) end if end on on ui_control ($key_switch_3) _pgs_set_key_val(DKS_KEYSWITCHES, 2, $key_switch_3 + $DKS_TRANSPOSE) $count := 0 while ($count < 127) set_key_color($count, $KEY_COLOR_NONE) inc($count) end while $count := 0 while ($count < 6) set_key_color(%actual_keyswitches[$count], $KEY_COLOR_WHITE) inc($count) end while set_key_color($key_switch_1, $KEY_COLOR_RED) set_key_color($key_switch_2, $KEY_COLOR_RED) set_key_color($key_switch_3, $KEY_COLOR_RED) set_key_color($key_switch_4, $KEY_COLOR_RED) set_key_color($key_switch_5, $KEY_COLOR_RED) set_key_color($key_switch_6, $KEY_COLOR_RED) if ($fade_button = 1) set_key_color($key_switch_1 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_2 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_3 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_4 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_5 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_6 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) end if end on on ui_control ($key_switch_4) _pgs_set_key_val(DKS_KEYSWITCHES, 3, $key_switch_4 + $DKS_TRANSPOSE) $count := 0 while ($count < 127) set_key_color($count, $KEY_COLOR_NONE) inc($count) end while $count := 0 while ($count < 6) set_key_color(%actual_keyswitches[$count], $KEY_COLOR_WHITE) inc($count) end while set_key_color($key_switch_1, $KEY_COLOR_RED) set_key_color($key_switch_2, $KEY_COLOR_RED) set_key_color($key_switch_3, $KEY_COLOR_RED) set_key_color($key_switch_4, $KEY_COLOR_RED) set_key_color($key_switch_5, $KEY_COLOR_RED) set_key_color($key_switch_6, $KEY_COLOR_RED) if ($fade_button = 1) set_key_color($key_switch_1 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_2 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_3 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_4 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_5 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_6 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) end if end on on ui_control ($key_switch_5) _pgs_set_key_val(DKS_KEYSWITCHES, 4, $key_switch_5 + $DKS_TRANSPOSE) $count := 0 while ($count < 127) set_key_color($count, $KEY_COLOR_NONE) inc($count) end while $count := 0 while ($count < 6) set_key_color(%actual_keyswitches[$count], $KEY_COLOR_WHITE) inc($count) end while set_key_color($key_switch_1, $KEY_COLOR_RED) set_key_color($key_switch_2, $KEY_COLOR_RED) set_key_color($key_switch_3, $KEY_COLOR_RED) set_key_color($key_switch_4, $KEY_COLOR_RED) set_key_color($key_switch_5, $KEY_COLOR_RED) set_key_color($key_switch_6, $KEY_COLOR_RED) if ($fade_button = 1) set_key_color($key_switch_1 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_2 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_3 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_4 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_5 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_6 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) end if end on on ui_control ($key_switch_6) _pgs_set_key_val(DKS_KEYSWITCHES, 5, $key_switch_6 + $DKS_TRANSPOSE) $count := 0 while ($count < 127) set_key_color($count, $KEY_COLOR_NONE) inc($count) end while $count := 0 while ($count < 6) set_key_color(%actual_keyswitches[$count], $KEY_COLOR_WHITE) inc($count) end while set_key_color($key_switch_1, $KEY_COLOR_RED) set_key_color($key_switch_2, $KEY_COLOR_RED) set_key_color($key_switch_3, $KEY_COLOR_RED) set_key_color($key_switch_4, $KEY_COLOR_RED) set_key_color($key_switch_5, $KEY_COLOR_RED) set_key_color($key_switch_6, $KEY_COLOR_RED) if ($fade_button = 1) set_key_color($key_switch_1 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_2 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_3 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_4 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_5 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) set_key_color($key_switch_6 + $DKS_TRANSPOSE, $KEY_COLOR_CYAN) end if end on on ui_control ($vol_knob) set_engine_par ($ENGINE_PAR_VOLUME,$vol_knob,$active_group,-1,-1) set_control_par_str(get_ui_id($vol_knob),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_VOLUME,$active_group,-1,-1) & " dB") if ($group_2_button = 1) set_engine_par ($ENGINE_PAR_VOLUME,$vol_knob,$active_group + 6,-1,-1) end if end on on ui_control ($attack_knob) set_engine_par($ENGINE_PAR_ATTACK,$attack_knob,$active_group,$vol_env_idx,-1) set_engine_par($ENGINE_PAR_ATTACK,$attack_knob,$active_group +6,$vol_env_idx,-1) set_control_par_str(get_ui_id($attack_knob),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_ATTACK,$active_group,$vol_env_idx,-1) & " ms") end on on ui_control ($release_knob) set_engine_par($ENGINE_PAR_RELEASE,$release_knob,$active_group,$vol_env_idx,-1) set_engine_par($ENGINE_PAR_RELEASE,$release_knob,$active_group + 6,$vol_env_idx,-1) set_control_par_str(get_ui_id($release_knob),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_RELEASE,$active_group,$vol_env_idx,-1) & " ms") end on on ui_control ($fade_knob) _pgs_set_key_val(DKS_FADETIMES, $active_group, $fade_knob) set_control_par_str(get_ui_id($fade_knob),$CONTROL_PAR_LABEL,$fade_knob & " ms") end on on ui_control ($group_2_button) if ($group_2_button = 0) _set_engine_par ($ENGINE_PAR_VOLUME,0,$active_group + 6,-1,-1) else _set_engine_par ($ENGINE_PAR_VOLUME,$vol_knob,$active_group + 6,-1,-1) end if _set_engine_par ($ENGINE_PAR_PAN,500000 - ($group_2_button * $SPREAD_AMT),$active_group,-1,-1) _set_engine_par ($ENGINE_PAR_PAN,500000 + ($group_2_button * $SPREAD_AMT),$active_group + 6,-1,-1) %group_2_states[$active_group] := $group_2_button end on on ui_control ($load_button_1) _purge_group(0,$load_button_1) _purge_group(6,$load_button_1) end on on ui_control ($load_button_2) _purge_group(1,$load_button_2) _purge_group(7,$load_button_2) end on on ui_control ($load_button_3) _purge_group(2,$load_button_3) _purge_group(8,$load_button_3) end on on ui_control ($load_button_4) _purge_group(3,$load_button_4) _purge_group(9,$load_button_4) end on on ui_control ($load_button_5) _purge_group(4,$load_button_5) _purge_group(10,$load_button_5) end on on ui_control ($load_button_6) _purge_group(5,$load_button_6) _purge_group(11,$load_button_6) end on {END ARTICULATION CALLBACKS} {--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) {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,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 on ui_control ($wetdry_reverb) _set_engine_par ($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN, $wetdry_reverb, -1, $reverb_slot, 1) set_control_par_str(get_ui_id($wetdry_reverb),$CONTROL_PAR_LABEL,get_engine_par_disp($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN, -1,$reverb_slot,1) & " dB") end on on ui_control ($on_off_reverb) _set_engine_par($ENGINE_PAR_EFFECT_BYPASS, (($on_off_reverb + 1) mod 2), -1, $reverb_slot, 1) end on