Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {-----------------Scripted/programmed and sampled by:
- Andreas Hald----------------------------------------}
- 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}
- {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 $Volume0510(0, 1000000, 1)
- make_persistent($Volume0510)
- set_text($Volume0510,"Surround")
- $Volume0510 := $DefVol
- set_knob_defval($Volume0510,$DefVol)
- move_control_px($volume0510,66,2) { you can position this knob wherever you like }
- read_persistent_var($Volume0510)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume0510,0,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume0510,5,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume0510,10,-1,-1)
- set_knob_label($Volume0510,get_engine_par_disp($ENGINE_PAR_VOLUME,0,-1,-1))
- declare ui_knob $Volume1611(0, 1000000, 1)
- make_persistent($Volume1611)
- set_text($Volume1611,"Out")
- $Volume1611 := $DefVol
- set_knob_defval($Volume1611,$DefVol)
- move_control_px($Volume1611,158,2) { you can position this knob wherever you like }
- read_persistent_var($Volume1611)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume1611,1,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume1611,6,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume1611,11,-1,-1)
- set_knob_label($Volume1611,get_engine_par_disp($ENGINE_PAR_VOLUME,1,-1,-1))
- declare ui_knob $Volume2712(0, 1000000, 1)
- make_persistent($Volume2712)
- set_text($Volume2712,"Decca")
- $Volume2712 := $DefVol
- set_knob_defval($Volume2712,$DefVol)
- move_control_px($Volume2712,250,2) { you can position this knob wherever you like }
- read_persistent_var($Volume2712)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume2712,2,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume2712,7,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume2712,12,-1,-1)
- set_knob_label($Volume2712,get_engine_par_disp($ENGINE_PAR_VOLUME,27,-1,-1))
- declare ui_knob $Volume3813(0, 1000000, 1)
- make_persistent($Volume3813)
- set_text($Volume3813,"Close")
- $Volume3813 := $DefVol
- set_knob_defval($Volume3813,$DefVol)
- move_control_px($Volume3813,342,2) { you can position this knob wherever you like }
- read_persistent_var($Volume3813)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume3813,3,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume3813,8,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume3813,13,-1,-1)
- set_knob_label($Volume3813,get_engine_par_disp($ENGINE_PAR_VOLUME,3813,-1,-1))
- declare ui_knob $Volume4914(0, 1000000, 1)
- make_persistent($Volume4914)
- set_text($Volume4914,"Mix S.")
- $Volume4914 := $DefVol
- set_knob_defval($Volume4914,$DefVol)
- move_control_px($Volume4914,433,2) { you can position this knob wherever you like }
- read_persistent_var($Volume4914)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume4914,4,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume4914,9,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume4914,14,-1,-1)
- set_knob_label($Volume4914,get_engine_par_disp($ENGINE_PAR_VOLUME,4914,-1,-1))
- {Mix buttons}
- declare ui_button $surroundpower
- declare ui_button $outpower
- declare ui_button $deccapower
- declare ui_button $closepower
- declare ui_button $mixpower
- 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($Volume0510)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume0510,0,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume0510,5,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume0510,10,-1,-1)
- set_knob_label($Volume0510,get_engine_par_disp($ENGINE_PAR_VOLUME,0,-1,-1))
- end on
- on ui_control($Volume1611)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume1611,1,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume1611,6,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume1611,11,-1,-1)
- set_knob_label($Volume1611,get_engine_par_disp($ENGINE_PAR_VOLUME,0,-1,-1))
- end on
- on ui_control($Volume2712)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume2712,2,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume2712,7,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume2712,12,-1,-1)
- set_knob_label($Volume2712,get_engine_par_disp($ENGINE_PAR_VOLUME,0,-1,-1))
- end on
- on ui_control($Volume3813)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume3813,3,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume3813,8,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume3813,13,-1,-1)
- set_knob_label($Volume3813,get_engine_par_disp($ENGINE_PAR_VOLUME,0,-1,-1))
- end on
- on ui_control($Volume4914)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume4914,4,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume4914,9,-1,-1)
- set_engine_par($ENGINE_PAR_VOLUME,$Volume4914,14,-1,-1)
- set_knob_label($Volume4914,get_engine_par_disp($ENGINE_PAR_VOLUME,4914,-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}
- purge_group(10,0)
- 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}
- purge_group(10,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)
- purge_group(11,0)
- else
- set_text($outpower, "Out. On")
- purge_group(1,1)
- purge_group(6,1)
- purge_group(11,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)
- purge_group(12,0)
- else
- set_text($deccapower,"Decca. On")
- purge_group(2,1)
- purge_group(7,1)
- purge_group(12,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)
- purge_group(13,0)
- else
- set_text($closepower, "Close On")
- purge_group(3,1)
- purge_group(8,1)
- purge_group(13,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)
- purge_group(14,0)
- else
- set_text($mixpower, "Mix. On")
- purge_group(4,1)
- purge_group(9,1)
- purge_group(14,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
- {here begins code for the text, that Kontakt displays when certain notes are pressed down}
- on note
- select ($EVENT_NOTE)
- case 24 {this is just the midi number for the key}
- message ("C octave (Ori.)")
- end select
- 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