Automation and routing trouble

Vblamed
Vblamed Member Posts: 7 Member

Hello friends! Can you please help me with KSP scripting? I have 2 problems

I made a library Where Knob UI are changed to My custom sliders with 3 parallel busses at the time

1) It seems that i need some code for automation working

Cause when i activate WR buttons on my Kontakt window and trying to change volumes - Cubase (my DAW) did not write any information about changes. 

2) I have an internal routing into 3 parallel buses (from different groups) - all they go to Kontakt main Out. What code i need for automatic remapping outs when i change Kontakt on multiple outs? It will be cool if I changed the output mode - and library will automaticly start to playing my 3 parallel bus outs from Konakt! 

I use Kontakt 6 Mac Os Mojave

I hope someone will help me! Thank you Guys very much!

Here is code


on init

set_ui_height_px(560)

set_ui_width_px(1000)

 

 {create the control - must be a slider}

  declare ui_slider $subVolumeSlider (0, 1000000)

  $subVolumeSlider := 500000

  declare ui_slider $cleanVolumeSlider(0, 1000000)

  $cleanVolumeSlider := 500000

  declare ui_slider $distortionVolumeSlider (0, 1000000)

  $distortionVolumeSlider := 500000

 

  make_perfview


  {hide the slider parts}

  hide_part($cleanVolumeSlider, $HIDE_PART_BG .or. $HIDE_PART_MOD_LIGHT .or. $HIDE_PART_TITLE .or. $HIDE_PART_VALUE)

  {hide the slider parts}

  hide_part($DistortionVolumeSlider, $HIDE_PART_BG .or. $HIDE_PART_MOD_LIGHT .or. $HIDE_PART_TITLE .or. $HIDE_PART_VALUE)

  {hide the slider parts}

  hide_part($subVolumeSlider, $HIDE_PART_BG .or. $HIDE_PART_MOD_LIGHT .or. $HIDE_PART_TITLE .or. $HIDE_PART_VALUE)

  {assign the image file} 

  set_control_par_str(get_ui_id($cleanVolumeSlider), $CONTROL_PAR_PICTURE, "fader")

  {assign the image file} 

  set_control_par_str(get_ui_id($distortionVolumeSlider), $CONTROL_PAR_PICTURE, "fader")

  {assign the image file} 

  set_control_par_str(get_ui_id($subVolumeSlider), $CONTROL_PAR_PICTURE, "fader")



  {place it on the performance view}

  move_control_px($cleanVolumeSlider, 355, 365)

  {place it on the performance view}

  move_control_px($distortionVolumeSlider, 482, 435)

  {place it on the performance view}

  move_control_px($subVolumeSlider, 612, 365)

  {control how mouse movements should affect the control}

  set_control_par(get_ui_id($cleanVolumeSlider), $CONTROL_PAR_MOUSE_BEHAVIOUR, -500)

  {control how mouse movements should affect the control}

  set_control_par(get_ui_id($distortionVolumeSlider), $CONTROL_PAR_MOUSE_BEHAVIOUR, -500)

  {control how mouse movements should affect the control}

  set_control_par(get_ui_id($subVolumeSlider), $CONTROL_PAR_MOUSE_BEHAVIOUR, -500)


   

  

end on


on ui_control ($subVolumeSlider)

  set_engine_par($ENGINE_PAR_VOLUME,$subVolumeSlider,-1,-1,$NI_BUS_OFFSET +0)

end on


on ui_control ($cleanVolumeSlider)

  set_engine_par($ENGINE_PAR_VOLUME,$cleanVolumeSlider,-1,-1,$NI_BUS_OFFSET +1)

end on


on ui_control ($distortionVolumeSlider)

  set_engine_par($ENGINE_PAR_VOLUME,$distortionVolumeSlider,-1,-1,$NI_BUS_OFFSET +2)

end on

Comments

  • Gablux
    Gablux Member Posts: 88 Helper

    Read the KSP manual on automation IDs. This is a scripting way of connecting our instrument parameters to host automations, these will not have to show in the DAW as CCs.

  • Vblamed
    Vblamed Member Posts: 7 Member

    Thanks! Will check it! Any Ideas about routing?

  • Gablux
    Gablux Member Posts: 88 Helper

    There's 3 ways to do routing in Kontakt

    1) "hard wired" in the edit view - you set your groups and busses outs

    2) same as 1 but via script - usually this is done only once, but could be done multiple times if needed and if makes sense.

    3) via script and at the event level. Routing where each event signal will go. This may make sense in situations you want to duplicate a voice, you would use play_note() twice and route each event to a different output.

Back To Top