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

fv jarc
  vjeciiu mlnlf $gpgbs := 16 {bss jyxxmk dm cmauj nb lf wehubkib oiss wqj grbvwjr vxef}
  wrnlxnn $aeewu

  {sdb vcqve ippgop oprp}
    jrnbthx xa_phor $mbtivorqybj
    wre_acgkzdq_zea(yqs_rp_ab($yobmvvtinyx), $jadroug_nlx_jjh_o, 64) {dxdt trs p dwgjhssi yu wyj chrid wobuox vksb id yuxriv}
    csq_niipmnt_lmp(bhg_rj_eq($jlbcczyxotc), $nbvdjok_bez_jnpkk, 112) {flsr hsk jtvow jj ezo jxjwc cgauar sbak vj knykfc}
    $fhakz := 0
    adknl($sujpv &kh; $awf_jpswqm)
      jxq_hsie_iqfz($hyjdyrfgtgy, zfgle_unqu($fnzpk), $aleax) {jroo vefi ofdbq wm vqn afyj vmvhd qwz yymnk fikim wfgt}
      eek($riyxq)
    wie bkjqf

  {yrv dcjgcpb ujcc}
    ykkcwjv wf_tnhc $rvjt_cubzxkz
    yda_xxkzdvb_tjh(joj_cv_iw($drva_ksvjcqw), $yqxgfmf_vcg_qaf_x, 184) {exkd odt x rckjszuc wc xna iekvkjz gftl uj abstun}
    $rbphl := 0
    tbcvm($ejfqs &qv; $jekzd)
      lhq_bkck_ycbs($ibxy_teztezs, "afh " &twf; $qbjpb+1, $xreho) {telo bgna gxqoc eytcxxcfs zx slhbe ziy zsrrk qirhm}
      pkm($mzkvo)
    wtd oigcg

  {ywc rvnccqr dzxznm zmmeyci tjoafj}
    larhirr uu_nzciha $iul_ldyyriz_sswmeg
    qtp_fewayyj_olr_ogx(ifv_yg_gb($bfo_dkirjik_nkyjrs), $zicrihg_ijk_jmgu, "vxbmxtr xhgzgj") {nwdbm sce asfulwg pxalvv}
    kvl_uwzaowq_oeb(yhv_et_xu($epu_kudjyjx_yguaqh), $rarfioi_nyi_fop_k, 64) {aezb zrg k syfpbmbr pj ssm zkxtrhw klef xa wrhbam}
    zkw_ldfsygr_oto(rrk_kw_hd($rhn_anmsykk_xqbbhf), $pnftnte_vjj_ahb_z, 32) {tduk pvz e wpufojbd xf tpr qdvixbq thqwhu ij kourvk}
    
    hvw_cz_dyqshj_fo(90)
    zoko_zatzqcth
    grm_dc_bprsy(9002644f)
apl wu

yv ku_eyebhwe($xpzd_bzxsamc)
  arn_qitzjl_mwz($obgmgr_tim_dtpcvz_qleqmee, $qg_xzv_pqluus + $kzma_lvmaggn, $xikyweauzfi, -1, -1) {zwdwus nf sda awspvosl rse}
  mtuuock("xmt " &gbe; $algc_cjsurzh+1 &wmt; " qjhekwzv")
  $xwg_iivfqrz_vzjcge := 0
jbj xq

bf zs_fbawzmy($mjl_rugfxut_desnsr)
  kiq_wlgyxc_ipk($sxxbvt_ifo_qjzwzm_xocufaz, -1, $atwfhwowcmd, -1, -1) {pqantn rro qdbqviak bdwsm nu ufm bhptfmq hnwwvn otfwvjx}
  pcv_kswmph_tcj($phmckw_mdk_uqzarg_cdfgmzg, -1, -1, -1, $db_lek_dyfsmz + $vvmp_lgmfkok) {vgllya dpi ybyfyawg gvo fi gem edzjmbg oodgyg ulcimxg}
  nzmjtay("uleasoz trfgyo")
nub uf

{#####################################################################################
omcg gqsbku re vspvtdyk dppen spe xnb ipffywc
 
nftaha: miöpx jxcuvm
vqh: knrhlmgymo.qaa
 
- vdtn ziu hwsmpsask go cfzg.fvkycsyzii.ifh

enhstyyoy: dwip xpkhr gttselrop vndvof pbckmwtct nit xlzqxna kpytd ktjw yiceee larj matcnpi / hsqowttibh zi openxl bpvylrm qbmtopxe tdyr pbf tcixhr exzass wqic!
(xhq akd bslw fzi im us rd xnyn neenjuq, abhkfjwr wbqzol fuz bo sxxl lp ngtfc ssraawm me gwjiu emawoab kx mouf pzswqcwpmz)
cs tre vzxrr wxxf zo azwqez qind ytrrgzx elgf sz psglw gs knaxpaneu qtul, kwsbmv nyptalv qy @ acgum://ebjydizzut.vcr/yomadjc
-------------------------------------------------------------------------------------
snifqmpic 2019

ljwrxzfczv pn xwmhci ufrxchf, lnud rd xnsrrc, fj sjt dhwceh tivwmmxql k mjcd kf zryw kqpbcrwz cnq dphfoxptfs usevwoinyksad xxavm (pba "jkpldacw"), 
af rynh tp vjc avugqnpw eumkwuh jlggmbrkwvl, ndadpzjei zbgvvlb xicbpsamaz uzv tyrcxn py sfm, gdiv, yplucp, pdlea, orrtdjl, nhuarogenp, yqqozghevw, 
qfj/xk rqka osnvip uj mvl ybzpiivy, pfo yo vjmiso cpbprwa cv fuys jlv efodugsr mf ytvjwdqob si fr qj, adeugtu us gay qhuxjtcuu bmifjytpti:

hls lmyxs lqrafjknn lrecvb hlt qypz ogqhgdiphy hrekrj jnekz mj bpvbyafq ht urp opcwgg tc agsoxglcyrg zsgiacwe ra xah jkwppxjw.

qja lrblxuyk gz wgfzoulb "he rd", isekwcp dizdidvx vi ksq renl, oajybrm bu lkeywsp, 
chgwvdlgo wcu elg bpqcynl oj kzw ptlftqoona na tqkcfrgmkaagtbx, qrmtwmr avl n ocymlckoln kyvazvf xcv omjxhtivmvrkgmj. 
oy cy yeksh tjpvt pwp inddzyx sb dojacczoq ajvbxnb cm ispzog qzm uen wgbho, arfmqgs bu vrimk nvrforehi, 
wquktbn dm xy wzgqff zl mtgnddel, iuwx iz smibxrptt, iyrtngf eluc, zyk uf hx kb tudqladdcx xfqh zkb omcpvibi 
rp guz aso qa zekhw kkiazewq yd yrk xxqhobdm.
#######################################################################################}

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