Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on init
- make_perfview
- set_ui_height (4)
- {These are not currently in use. They're used to make loops - see NI forum}
- declare $gx
- declare %GM[3] := (0,5)
- {These above are not currently in use. They're used to make loops - see NI forum}
- {Below, declare to the output routing-code}
- declare $i
- {here the code for the knobs begins - that control volume on groups eg. mic placements}
- {groups are indexed, so group one is 0, group two is 1 - and so on. 500000 equals -6dB}
- message("") { this clears the status line so no error messages will be hidden }
- declare const $DefVol := 500000 { default initial volume, you can choose this to be whatever you want }
- set_ui_height (4)
- declare ui_knob $Volume05(0, 1000000, 1)
- make_persistent($Volume05)
- set_text($Volume05,"Surround")
- $Volume05 := $DefVol
- set_knob_defval($Volume05,$DefVol)
- move_control_px($volume05,66,2) { you can position this knob wherever you like }
- read_persistent_var($Volume05)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume05,0,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume05,5,-1,-1)
- set_knob_label($Volume05,get_engine_par_disp($ENGINE_PAR_VOLUME,0,-1,-1))
- declare ui_knob $Volume16(0, 1000000, 1)
- make_persistent($Volume16)
- set_text($Volume16,"Out")
- $Volume16 := $DefVol
- set_knob_defval($Volume16,$DefVol)
- move_control_px($Volume16,158,2) { you can position this knob wherever you like }
- read_persistent_var($Volume16)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume16,1,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume16,6,-1,-1)
- set_knob_label($Volume16,get_engine_par_disp($ENGINE_PAR_VOLUME,1,-1,-1))
- declare ui_knob $Volume27(0, 1000000, 1)
- make_persistent($Volume27)
- set_text($Volume27,"Decca")
- $Volume27 := $DefVol
- set_knob_defval($Volume27,$DefVol)
- move_control_px($Volume27,250,2) { you can position this knob wherever you like }
- read_persistent_var($Volume27)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume27,2,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume27,7,-1,-1)
- set_knob_label($Volume27,get_engine_par_disp($ENGINE_PAR_VOLUME,27,-1,-1))
- declare ui_knob $Volume38(0, 1000000, 1)
- make_persistent($Volume38)
- set_text($Volume38,"Close")
- $Volume38 := $DefVol
- set_knob_defval($Volume38,$DefVol)
- move_control_px($Volume38,342,2) { you can position this knob wherever you like }
- read_persistent_var($Volume38)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume38,3,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume38,8,-1,-1)
- set_knob_label($Volume38,get_engine_par_disp($ENGINE_PAR_VOLUME,38,-1,-1))
- declare ui_knob $Volume49(0, 1000000, 1)
- make_persistent($Volume49)
- set_text($Volume49,"Mix S.")
- $Volume49 := $DefVol
- set_knob_defval($Volume49,$DefVol)
- move_control_px($Volume49,433,2) { you can position this knob wherever you like }
- read_persistent_var($Volume49)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume49,4,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume49,9,-1,-1)
- set_knob_label($Volume49,get_engine_par_disp($ENGINE_PAR_VOLUME,49,-1,-1))
- {Mix buttons}
- declare ui_button $surroundpower
- declare ui_button $outpower
- declare ui_button $deccapower
- declare ui_button $closepower
- declare ui_button $mixpower
- {Keyswitch buttons, they're hided. They make it possible to write new names when a certain button is pressed.}
- declare ui_button $keyswitch1
- declare ui_button $keyswitch2
- declare ui_button $keyswitch3
- $keyswitch1 := 1
- $keyswitch2 := 0
- $keyswitch3 := 0
- hide_part($keyswitch1, $HIDE_WHOLE_CONTROL)
- hide_part($keyswitch2, $HIDE_WHOLE_CONTROL)
- hide_part($keyswitch3, $HIDE_WHOLE_CONTROL)
- {Keyswitch codes ends, Mix buttons again.}
- {Experiment.}
- declare ui_button $output
- move_control($output,1,8)
- {Experiment.}
- move_control($surroundpower, 1,3)
- move_control($outpower, 2,3)
- move_control($deccapower,3,3)
- move_control($closepower,4,3)
- move_control($mixpower,5,3)
- set_text($surroundpower, "Surround Off")
- set_text($outpower, "Out. Off")
- set_text($deccapower, "Decca. Off")
- set_text($closepower, "Close. Off")
- set_text($mixpower, "Mix. Off")
- $surroundpower := 0
- $outpower := 0
- $deccapower := 0
- $closepower := 0
- $mixpower := 0
- {AHDSR}
- declare $count
- declare ui_knob $Attack (0,1000000,1)
- declare ui_knob $Hold (0,1000000,1)
- declare ui_knob $Decay (0,1000000,1)
- declare ui_knob $Sustain (0,1000000,1)
- declare ui_knob $Release (0,1000000,1)
- set_knob_unit($Attack, $KNOB_UNIT_MS)
- set_knob_unit($Hold, $KNOB_UNIT_MS)
- set_knob_unit($Decay, $KNOB_UNIT_MS)
- set_knob_unit($Sustain, $KNOB_UNIT_DB)
- set_knob_unit($Release, $KNOB_UNIT_MS)
- {AHDSR, Simple and effective Method}
- declare $ahdsr
- $ahdsr := 1
- while($ahdsr > $NUM_GROUPS)
- set_engine_par($ENGINE_PAR_ATTACK,$attack,$ahdsr,0,-1)
- set_engine_par($ENGINE_PAR_HOLD,$hold,$ahdsr,0,-1)
- set_engine_par($ENGINE_PAR_DECAY,$decay,$ahdsr,0,-1)
- set_engine_par($ENGINE_PAR_SUSTAIN,$sustain,$ahdsr,0,-1)
- set_engine_par($ENGINE_PAR_RELEASE,$release,$ahdsr,0,-1)
- inc($ahdsr)
- end while
- move_control($Attack, 1,5)
- move_control($Hold,2,5)
- move_control($Decay,3,5)
- move_control($Sustain,4,5)
- move_control($Release,5,5)
- make_persistent($Attack)
- make_persistent($Hold)
- make_persistent($Decay)
- make_persistent($Sustain)
- make_persistent($Release)
- read_persistent_var($Attack)
- read_persistent_var($Hold)
- read_persistent_var($Decay)
- read_persistent_var($Sustain)
- read_persistent_var($Release)
- set_knob_label($Attack, get_engine_par_disp($ENGINE_PAR_ATTACK, 0, find_mod(0,"ENV_AHDSR"), -1))
- set_knob_label($Hold, get_engine_par_disp($ENGINE_PAR_HOLD, 0, find_mod(0,"ENV_AHDSR"), -1))
- set_knob_label($Decay, get_engine_par_disp($ENGINE_PAR_DECAY, 0, find_mod(0,"ENV_AHDSR"), -1))
- set_knob_label($Sustain, get_engine_par_disp($ENGINE_PAR_SUSTAIN, 0, find_mod(0,"ENV_AHDSR"), -1))
- set_knob_label($Release, get_engine_par_disp($ENGINE_PAR_RELEASE, 0, find_mod(0,"ENV_AHDSR"), -1))
- {CONVO REVERB}
- declare ui_button $reverb
- set_text($reverb,"Convo. Off")
- move_control($reverb,6,7)
- declare ui_slider $convowet (0,1000000)
- declare ui_slider $convodry (0,1000000)
- declare ui_slider $convodelay (0,1000000)
- declare ui_slider $convoearlyir (0,1000000)
- declare ui_slider $convolateir (0,1000000)
- move_control($convowet, 6,2)
- move_control($convodry, 6,3)
- move_control($convodelay,6,4)
- move_control($convoearlyir,6,5)
- move_control($convolateir,6,6)
- {Impulses, you have to define them as !}
- {$ Stores a single integer values}
- {% Store single integer values at specific indices}
- {! Stores text strings... We need to use ! for Samples, Impulses etc...}
- declare $impulse
- declare const $impulse_samples := 9
- declare !ir_names[$impulse_samples]
- {Names of the IR Samples}
- !ir_names[0] := "IR_DrumRoom"
- !ir_names[1] := "IR_Fames_DT_01"
- !ir_names[2] := "IR_FiveColumns"
- !ir_names[3] := "IR_FiveColumnsShort"
- !ir_names[4] := "IR_FrenchSalon"
- !ir_names[5] := "IR_GoingHome_Dist"
- !ir_names[6] := "IR_Narrow"
- !ir_names[7] := "IR_ParkingGarage"
- !ir_names[8] := "IR_Silo"
- {Impulse Menu}
- declare ui_menu $impulses
- move_control($impulses, 6, 8)
- add_menu_item($impulses,"Impulses.....", -1)
- while ($count < $impulse_samples)
- add_menu_item($impulses,!ir_names[$count],$count)
- inc($count)
- end while
- {You can delete these labels if you want!}
- declare ui_label $ConvInfo (1,1)
- set_text($ConvInfo," Conv Settings")
- move_control($ConvInfo, 6,1)
- declare ui_label $ahdsrinfo (5,1)
- set_text($ahdsrinfo, "------------------------------------------AHDSR-----------------------------------------")
- move_control($ahdsrinfo, 1,4)
- end on
- {Impulse Menu}
- on ui_control ($impulses)
- if ($impulses = -1)
- else
- load_ir_sample(!ir_names[$impulses],6,1) {6,1 is (slot) then (Generic).. Generic = 1 Insert effect, 0 Send effect}
- end if
- end on
- on ui_control($Volume05)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume05,0,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume05,5,-1,-1)
- set_knob_label($Volume05,get_engine_par_disp($ENGINE_PAR_VOLUME,0,-1,-1))
- end on
- on ui_control($Volume16)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume16,1,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume16,6,-1,-1)
- set_knob_label($Volume16,get_engine_par_disp($ENGINE_PAR_VOLUME,1,-1,-1))
- end on
- on ui_control($Volume27)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume27,2,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume27,7,-1,-1)
- set_knob_label($Volume27,get_engine_par_disp($ENGINE_PAR_VOLUME,2,-1,-1))
- end on
- on ui_control($Volume38)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume38,3,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume38,8,-1,-1)
- set_knob_label($Volume38,get_engine_par_disp($ENGINE_PAR_VOLUME,3,-1,-1))
- end on
- on ui_control($Volume49)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume49,4,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume49,9,-1,-1)
- set_knob_label($Volume49,get_engine_par_disp($ENGINE_PAR_VOLUME,4,-1,-1))
- end on
- {MIX Buttons, Purging etc..}
- on ui_control ($surroundpower)
- if ($surroundpower = 0)
- set_text($surroundpower,"Surround Off") {When the button is off, it will say it's off}
- purge_group(0,0)
- purge_group(5,0) {Group Index, Mode - Surround Power being the first group, and unloaded if the button is off}
- else
- set_text($surroundpower,"Surround On") {When the button is on, it will say it's on!}
- purge_group(0,1)
- purge_group(5,1) {Else (if it is on!) then load the samples in group 1}
- end if
- end on
- on ui_control ($outpower)
- if ($outpower = 0)
- set_text($outpower, "Out. Off")
- purge_group(1,0)
- purge_group(6,0)
- else
- set_text($outpower, "Out. On")
- purge_group(1,1)
- purge_group(6,1)
- end if
- end on
- on ui_control ($deccapower)
- if ($deccapower = 0)
- set_text($deccapower,"Decca. Off")
- purge_group(2,0)
- purge_group(7,0)
- else
- set_text($deccapower,"Decca. On")
- purge_group(2,1)
- purge_group(7,1)
- end if
- end on
- on ui_control ($closepower)
- if ($closepower = 0)
- set_text($closepower, "Out. Off")
- purge_group(3,0)
- purge_group(8,0)
- else
- set_text($closepower, "Close On")
- purge_group(3,1)
- purge_group(8,1)
- end if
- end on
- on ui_control ($mixpower)
- if ($mixpower = 0)
- set_text($mixpower, "Mix. Off")
- purge_group(4,0)
- purge_group(9,0)
- else
- set_text($mixpower, "Mix. On")
- purge_group(4,1)
- purge_group(9,1)
- end if
- end on
- {AHDSR Workings}
- on ui_control ($Attack)
- $ahdsr := 0
- while($ahdsr < $NUM_GROUPS)
- _set_engine_par($ENGINE_PAR_ATTACK,$Attack,$ahdsr,0,-1)
- inc($ahdsr)
- end while
- set_knob_label($Attack, get_engine_par_disp($ENGINE_PAR_ATTACK, 0, 0, -1))
- wait(10)
- set_knob_label($Attack, get_engine_par_disp($ENGINE_PAR_ATTACK, 0, 0, -1))
- end on
- on ui_control ($Hold)
- $ahdsr := 0
- while($ahdsr < $NUM_GROUPS)
- _set_engine_par($ENGINE_PAR_HOLD,$Hold,$ahdsr,0,-1)
- inc($ahdsr)
- end while
- set_knob_label($Hold, get_engine_par_disp($ENGINE_PAR_HOLD, 0, 0, -1))
- wait(10)
- set_knob_label($Hold, get_engine_par_disp($ENGINE_PAR_HOLD, 0, 0, -1))
- end on
- on ui_control ($Decay)
- $ahdsr := 0
- while($ahdsr < $NUM_GROUPS)
- _set_engine_par($ENGINE_PAR_DECAY,$Decay,$ahdsr,0,-1)
- inc($ahdsr)
- end while
- set_knob_label($Decay, get_engine_par_disp($ENGINE_PAR_DECAY, 0, 0, -1))
- wait(10)
- set_knob_label($Decay, get_engine_par_disp($ENGINE_PAR_DECAY, 0, 0, -1))
- end on
- on ui_control ($Sustain)
- $ahdsr := 0
- while($ahdsr < $NUM_GROUPS)
- _set_engine_par($ENGINE_PAR_SUSTAIN,$Sustain,$ahdsr,0,-1)
- inc($ahdsr)
- end while
- set_knob_label($Sustain, get_engine_par_disp($ENGINE_PAR_SUSTAIN, 0, 0, -1))
- wait(10)
- set_knob_label($Sustain, get_engine_par_disp($ENGINE_PAR_SUSTAIN, 0, 0, -1))
- end on
- on ui_control ($Release)
- $ahdsr := 0
- while($ahdsr < $NUM_GROUPS)
- _set_engine_par($ENGINE_PAR_RELEASE,$Release,$ahdsr,0,-1)
- inc($ahdsr)
- end while
- set_knob_label($Release, get_engine_par_disp($ENGINE_PAR_RELEASE, 0, 0, -1))
- wait(10)
- set_knob_label($Release, get_engine_par_disp($ENGINE_PAR_RELEASE, 0, 0, -1))
- end on
- {CONVOLUTION REVERB}
- on ui_control ($reverb)
- if ($reverb = 0)
- set_text($reverb, "Convo. Off")
- set_engine_par($ENGINE_PAR_SEND_EFFECT_BYPASS,1,-1,6,1)
- else
- set_text($reverb, "Convo. On")
- set_engine_par($ENGINE_PAR_SEND_EFFECT_BYPASS,0,-1,6,1)
- end if
- end on
- on ui_control ($convowet)
- set_engine_par($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,$convowet,-1,6,1)
- set_text($ConvInfo," Wet Slider")
- end on
- on ui_control ($convodry)
- set_engine_par($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,$convodry,-1,6,1)
- set_text($ConvInfo," Dry Slider")
- end on
- on ui_control ($convodelay)
- set_engine_par($ENGINE_PAR_IRC_PREDELAY,$convodelay,-1,6,1)
- set_text($ConvInfo," Delay Slider")
- end on
- on ui_control ($convoearlyir)
- set_engine_par($ENGINE_PAR_IRC_LENGTH_RATIO_ER,$convoearlyir,-1,6,1)
- set_text($ConvInfo," Early Ir")
- end on
- on ui_control ($convolateir)
- set_engine_par($ENGINE_PAR_IRC_LENGTH_RATIO_LR,$convolateir,-1,6,1)
- set_text($ConvInfo," Late Ir")
- end on
- {Experiment}
- on ui_control ($output)
- if ($output = 1)
- set_text($output, "Multi output on")
- set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL,1,0,-1,-1)
- set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL,1,5,-1,-1)
- set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL,1,10,-1,-1)
- set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL,1,15,-1,-1)
- set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL,1,20,-1,-1)
- set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL,2,1,-1,-1)
- set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL,2,6,-1,-1)
- set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL,2,11,-1,-1)
- set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL,2,16,-1,-1)
- set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL,2,21,-1,-1)
- else
- set_text($output, "Multi output off")
- $i := 0
- while ($i < $NUM_GROUPS)
- set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL,$i,$i,-1,-1)
- inc($i)
- end while
- end if
- end on
- {Experiment}
- {here begins code for the text, that Kontakt displays when certain notes are pressed down}
- on note
- select ($EVENT_NOTE)
- case 24
- $keyswitch1 := 1
- $keyswitch2 := 0
- $keyswitch3 := 0
- case 26
- $keyswitch1 := 0
- $keyswitch2 := 1
- $keyswitch3 := 0
- case 28
- $keyswitch1 := 0
- $keyswitch2 := 0
- $keyswitch3 := 1
- end select
- if ($keyswitch1 = 1)
- select ($EVENT_NOTE)
- case 24
- message ("Plain chords - Keyswitch")
- case 36
- message("C plain")
- case 38
- message("D plain (Ori.)")
- case 37
- message("Db plain")
- case 39
- message("Eb plain (Ori.)")
- case 40
- message("E plain")
- case 41
- message("F plain (Ori.)")
- case 42
- message("F# plain")
- case 43
- message("G plain (Ori.)")
- case 44
- message("G# plain")
- case 45
- message("A plain (Ori.)")
- case 46
- message("Bb plain (Ori.)")
- case 47
- message("B plain")
- case 48
- message("C plain")
- case 58
- message("Bb mol plain")
- case 59
- message("B mol plain")
- case 60
- message("C mol plain (Ori.)")
- case 61
- message("Db mol plain")
- case 62
- message("D mol plain (Ori.)")
- case 63
- message("Eb mol plain")
- case 64
- message("E mol plain (Ori.)")
- case 65
- message("F mol plain")
- case 66
- message("F# mol plain (Ori.)")
- case 67
- message("G mol plain (Ori.)")
- case 68
- message("Ab mol plain")
- case 69
- message("A mol plain")
- case 70
- message("Bb mol plain")
- case 71
- message("B mol plain (Ori.)")
- case 72
- message("C mol plain")
- case 73
- message("Db mol plain")
- end select
- end if
- if ($keyswitch2 = 1)
- select ($EVENT_NOTE)
- case 26
- message("Artificial harmon chords - Keyswitch")
- case 36
- message("C art. harm.")
- case 37
- message("Db art. harm.")
- case 38
- message("D art. harm. (Ori.)")
- case 39
- message("Eb art. harm. (Ori.)")
- case 40
- message("E art. harm.")
- case 41
- message("F art. harm. (Ori.)")
- case 42
- message("F# art. harm.")
- case 43
- message("G art. harm. (Ori.)")
- case 44
- message("G# art. harm.")
- case 45
- message("A art. harm. (Ori.)")
- case 46
- message("Bb art. harm. (Ori.)")
- case 47
- message("B art. harm.")
- case 48
- message("C art. harm.")
- case 58
- message("Bb mol art. harm.")
- case 59
- message("B mol art. harm.")
- case 60
- message("C mol art. harm. (Ori.)")
- case 61
- message("Db mol art. harm.")
- case 62
- message("D mol art. harm. (Ori.)")
- case 63
- message("Eb mol art. harm.")
- case 64
- message("E mol art. harm. (Ori.)")
- case 65
- message("F mol art. harm.")
- case 66
- message("F# mol art. harm. (Ori.)")
- case 67
- message("G mol art. harm. (Ori.)")
- case 68
- message("Ab mol art. harm.")
- case 69
- message("A mol art. harm. (Ori.)")
- case 70
- message("Bb mol art. harm.")
- case 71
- message("B mol art. harm. (Ori.)")
- case 72
- message("C mol art. harm.")
- case 73
- message("Db mol art. harm.")
- end select
- end if
- if ($keyswitch3 = 1)
- select ($EVENT_NOTE)
- case 60
- message("Short")
- end select
- end if
- end on
- {here begins code for the text, that Kontakt displays when notes are released}
- on release
- message("Play a note")
- end on
Advertisement
Add Comment
Please, Sign In to add comment