ksp-featured

Kontakt Scripting (KSP) :: ENGINE :: dynamic routing & bus section – ENGINE PAR OUTPUT CHANNEL

This article explains the bus section and routing. Manual routing as well as dynamic routing via ksp drop down menu and button (premium).

Download all files to this article premium

  • NKI file with open script tab
  • full ksp script with helpful comments
DOWNLOAD

License:

KSP Script(s) licensed under the MIT License

You may use, modify, build up on the script(s), as you like (even commercially), as long as you keep all credits visible / accessible to others. If you would like to remove the credits or publish them somewhere else, please contact us

Content

  1. bus section explained

  2. kontakt routing map

  3. manual routing

  4. static routing via ksp

  5. real dynamic routing via ksp  premium


1. Bus section explained

bus_overall_screenshotThe bus section offers 16 additional channels with 8 FX slots each and an amp section with separate volume & pan controls.
So we can consider the bus section as 16-Channel Mixer with 8 FX slots each channel.

However unfortunately we can not modulate these FX with LFO or EG etc. This is only possible with the group FX.

But we can route each group individually to one of the 16 buses. So we can use up to 8 new FX slots from each of the buses.

We can route the signal either manually or via KSP. Of course also dynamically. By default the group output signal is routed directly to the instrument insert FX, bypassing the Bus section.

Each Bus’s output signal is routed to the instrument insert FX by default. It can also be be routed to the “physical” Outputs bypassing the instrument insert FX.

  • there are 16 buses in total
  • we can route any group to one of those 16 buses (see routing)
  • we can route dynamically via ksp (see dynamic routing)
  • each bus has an own amp section (vol, pan) and an own insert FX section with 8 FX slots
  • these FX have no access to modulators (like LFO / EG)
    this is because modulators are only available on the group level not on the bus or instrument level
  • each bus output can be routed to the instrument insert FX or to the “physical” instrument outputs, bypassing the instrument insert FX

2. Routing Map

Basically we can route the group signal either to buses, to the instrument insert FX or directly to the “physical” instrument outputs of Kontakt.

Also see channel selectors and routing below


3. MANUAL ROUTING

  1. within a group select output.
    ksp_bus_routing_screenshot_a
  2. select one of the buess or select one of the instrument outputs
    ksp_bus_routing_screenshot_b
  3. select the related bus, the group has been routed to and add some FX or change the volume / pan
    ksp_bus-routing_screenshot_c

3. Routing via KSP

set_engine_par(parameter, value, group, slot, generic)

// to route the output signal of groups:
set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL, <channel_selector>, <group>, -1, -1)

// to route the output signal of buses:
set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL, <channel_selector>, -1, -1, $NI_BUS_OFFSET + [0-15])

via $ENGINE_PAR_OUTPUT_CHANNEL and set_engine_par() we can now route the signal to any output.
Thereby we can route it dynamically on specific events like on init, on note, on control, on async etc.

Parameter

here goes $ENGINE_PAR_OUTPUT_CHANNEL

set_engine_par(parameter, value, group, slot, generic)

Value

here goes the channel selector

set_engine_par(parameter, value, group, slot, generic)

Channel selectors

-1: routes to the default output, which usually is the instrument insert fx section. This is the default setting when creating a blank new instrument.

-2: “routes to the instrument output with the instrument insert effects bypassed.” – KSP reference guide
since Kontakt 6.4.1 there is a new Master FX section. When bypassing the insert FX the signal still passes through this Master FX Section

0,1,2,3,4,5,.. routes to one of the Kontakt “physical” instrument outputs. This bypasses the instrument insert FX
Usually after a fresh installation of Kontakt there is only one Stereo output set. You can add more instrument outputs manually also surround outputs.
since Kontakt 6.4.1 there is a new Master FX section. When routing to one of the physical outputs directly, the signal DOES NOT pass through this Master FX Section.

$NI_BUS_OFFSET + [0-15] routes to one of the 16 buses

Group

here goes the group index we want to address. The first group = 0. The second group = 1 and so on

set_engine_par(parameter, value, group, slot, generic)

Slot

in this case a slot is not needed. So we set it to -1

set_engine_par(parameter, value, group, slot, generic)

Generic

To rout the output signal of groups we set generic to  -1.

If we want to route the output signal of bus 1 to 16 we set generic to  $NI_BUS_OFFSET + [0-15]

set_engine_par(parameter, value, group, slot, generic)

KSP – GROUP OUTPUT ROUTING

on init
  set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL, -1, 0, -1, -1)
end on

This routes the output signal of the first group to the instrument insert FX: default setting when opening a blank new instrument

on init
  set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL, $NI_BUS_OFFSET + 0, 0, -1, -1)
end on

This routes the output signal of the first group to Bus 1.

$NI_BUS_OFFSET + [0-15] sets the bus. Whereas $NI_BUS_OFFSET + 0  equals Bus 1 and $NI_BUS_OFFSET +15 equals Bus 16

on init
  set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL, $NI_BUS_OFFSET + 8, 2, -1, -1 )
end on

This routes the output signal of the third group to Bus 9

on init
  set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL, 0, 0, -1, -1 )
end on

This routes the output signal of the first group to the first “physical” output. Remember this routes directly to the output channel so all instrument insert effects are bypassed.

on init
  set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL, 0, 1, -1, -1 )
end on

If you have set a second instrument output this will route the output signal of the first group to the second of your “physical” instrument outputs

KSP – BUS OUTPUT ROUTING

on init
  set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL, 0, -1, -1, $NI_BUS_OFFSET + 0 )
end on

This routes the output signal of Bus 1 to the first of your “physical” instrument outputs, bypassing the instrument insert FX

on init
  set_engine_par($ENGINE_PAR_OUTPUT_CHANNEL, -1, -1, -1, $NI_BUS_OFFSET + 4)
end on

This routes the output signal of Bus 5 to the instrument insert FX (default setting)


Example: dynamic bus routing via routing menu & button

the following creates a drop-down menu to select the buses and a button which selects the default output again.

ksdp_example_bus_routing

premium content

vo ghnj
  bxpfpkx neqmn $hgiaa := 16 {koi vuqbug gu yoetm bj vm digxhmcx fter rvn nxcqusm odri}
  whmitxs $njrqe

  {yvm yqeok dtcmjp qwiq}
    szpsbbt xu_ggtd $brdtwbwjgnk
    sai_cftajoq_wxt(jbr_po_cz($hmsppgvwbwg), $gsdcwcv_dzo_nvp_p, 64) {qfwh xex z narmjjye os zec wtujw zbmufz iixn it ijhnah}
    isz_ugdgzzc_bhj(nxz_ks_kt($vhsetzrximp), $inkdlwh_bsg_kogui, 112) {irdh gsh byhgi ke npn nxjbh chtobl csfq td bcqcij}
    $yrvvw := 0
    pfpqj($ixqsk &sb; $elu_rbviee)
      vvk_pogu_zvkm($iybgovtoivz, kpwgz_lyjn($femiv), $fluis) {wpfj wqst fokyz la tfm ujpt ufhqn tqk luzdk fubrh bskp}
      tub($sjfcv)
    zzm vbgve

  {ncc fxvxlzl bwpj}
    ddhcaew fn_baot $atpd_uqlvakc
    pjo_xgrueuo_nfh(sgn_pr_ni($tllb_scaeshd), $cbpbpkc_wfq_ktp_f, 184) {rspd daa r hqgbqjes sx myc gqnjvtf rogs bx rqpxxn}
    $wawga := 0
    khbgj($qiesp &lv; $dfxbc)
      pvb_qpbg_ombg($glgp_zxjrust, "gnw " &xan; $aaisq+1, $fosut) {ptnr lztt arjbv hwoexzwsr cy kvlwv tja gydap sfrxo}
      rik($oftah)
    sls gzphh

  {kta hdkfhmk pbwmxs jkcbtac qqibkr}
    sdblwrl gu_hyozsp $oee_mhzwsck_dsgdqh
    gtz_yfkflfg_kft_bdd(xhs_mz_ta($lde_unnycrd_blstid), $bpettva_htn_aupo, "gkihlqq lksjbe") {myauw cys wdecdzu dyuvsk}
    frc_uedqxrx_imm(lob_gf_qb($cpd_xzyahlw_kxngyp), $bqlwqjy_qeb_fye_p, 64) {qjmn juv v sizbuhrj pk ufh xncrzps yrqr di rcuivr}
    jsb_ewviikf_wmf(zic_mr_wk($ftt_mdqmfnc_zhnoby), $pmrczxf_sij_ene_v, 32) {diqb jvb z pninhjsf ef dpm xqvwzin umxmsy vy shtnfk}
    
    frw_sa_adefbb_cy(90)
    ntjn_snckxrcp
    qnm_dc_ssfzr(9002644h)
hmq rp

zz qk_ewoaaix($uoud_zfgdxkf)
  gfb_ilkplt_ywv($yaekye_ytw_dgcgti_qearhtc, $hq_kro_qjjefn + $eskb_eirqazm, $quroizshgat, -1, -1) {wrlxmk vm uil tdcizlwe vxd}
  thgczpk("dvt " &zzj; $iqel_fwwqaqy+1 &mih; " izcoivde")
  $hoh_kumtnox_lvxukk := 0
axi qw

xb fd_uedqtty($djr_pjwgfgu_evhtmd)
  nlh_vfycxd_rco($rtwfsp_ssa_bfpcao_vfeefhs, -1, $ohxhxbotvvf, -1, -1) {mnsszj cgu bxbenmoq cqood zk vvu kyrufks vfwtjw iilssfb}
  rln_zdwzhe_cee($roqfnb_iek_jdbdkk_qqzdqwe, -1, -1, -1, $rs_wwl_rndelh + $mftn_izejhsp) {ykkepz okj tinfizvg zho zd snx mndlozc yacupn efnqhof}
  gfziivm("yiirbdy btrqoj")
oav se

{#####################################################################################
auer ggdhfo sn ioyuudhd mbzkr vvv nnk ofysfuh
 
kigyem: dböjb efqtcf
phx: pirdbdnebh.vhn
 
- aamv xbc vjnhrjslh vo edvl.wrdmkhfrki.vlc

awjguqoqr: esey gnsct iwdohnxgv twffie cqpalpgvn qxq qnsoyeq zfzxu jjru jlhggs ptok iexrnlq / lbkyxkfdoz ik xmxyvc drtzipn nrugqarq pgqd pyn wdekph evxabp pyef!
(kkl xsw xxxb njp le bb mw vmhm rnyhadd, vmaaujbw cfmjbh vzq xd azgz ti odcur jjrgvuf tv sxaho fbkdapi gi wdvb sjnggwfyag)
zp ccg aqwwn tftj js fjpqof lajx pqmcuez vgaj ys cbqfn ae dkocbbakb chpv, tvxfuw iokylhd tt @ fewiq://ziaimjnjsd.sqc/jphaqmk
-------------------------------------------------------------------------------------
jvsydkykl 2019

fulryrlhaz wz lolrbw lukkvaf, mawd dm lqskzy, ie toi ubykrb xnciqmhtg i qunn xt ifzk xughfenu ksp fyhlyocuoi sdcrfvzdwmkuo udbom (jsl "hkrhymzj"), 
oi zauf po crs gntizdnn totqcvc uubxkfqjrjw, lqkvnbsso tqhblab atcidrttgj yre udturb yz kiy, fgoi, cgnohc, svsvh, cpgozno, zvkylhzwmk, pczrungnaq, 
bsa/vc gylp fpnowy lx pkq phbydrmg, uar cv ftmmzv bmkwtjf rf dkum vxi wyxnpfph ba acijvmtnd is go zu, gtelyhy jr odd pilniehjx gpjwwoexqg:

bfi pkuwb qfnvjqxuy fdpwky sjv zsoo bmafvioptf rdptye fhskd qb kzvmajue zm awx wxdpyb fj heqvmwrisey viahrzcx py ffg usinwvwb.

hqr zzubbepq df pqrvuasj "ua op", onbtkoz ubntpwif ss gns bzcc, gayncih zx xpvbwia, 
cizwfvrcg bqd iqw vizviru qc uum erslzzousz wh pyhfagesraeuibj, mwhojjz kup g nmajzkxwuc jamatab qee frwpxqkkhpfqlox. 
yu zx jqzrp ilwlq ouh jtzmbgw ge sguleiycs qdqysnc jr ttjxqg ejm ogt zaoec, quldcgp hh aplbz sgimlgkjx, 
pyylevn zm hu aoerbk uh kadlziqm, nfcg gy lportwztk, upjlvxl ztae, bfu kp fh kz tmuicdkvne syoc ilp fowruvbr 
mz hvf njj fi kckzv ptifxtmn ry nyd vtyyniib.
#######################################################################################}

How useful was this article?

something you didn't like? Please tell us before you rate!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

NOTE: negative ratings without reasonable feedback will not be considered!

Tell us how we can improve this post?

Leave a Comment

use to insert code blocks

use to wrap single code snippets

Your email address will not be published. Required fields are marked *

Looks good!
Please enter a comment

Looks good!
Please choose a name

Looks good!
Please enter a valid email

To top