premium article

Posted by & filed under KSP Scripting (NI Kontakt) - Tutorials, KSP: Custom Scripts & Functions (Plugins).

In the last article we’ve learned a basic round robin function via groups. Now we create a more complex round robin application. A simple guitar engine, containing 3 different instruments (acoustic guitar, flageolett & fx guitar). They can be activated via special instrument buttons. So this time we nee to create a matrix that only the activated instrument groups are played (containing 4 round robin groups for each instrument)

Download all files to this tutorial

  • NKI file: open scipt tab  premium
  • additional ksp script file for sublime 3 premium


Required & Recommended



The full Script

before we take a closer look at the single callbacks, here is the full script

premium content


7 Responses to “Kontakt Scripting (KSP) – CUSTOM SCRIPTS :: advanced round robin function”

    • YummyBeats

      Sorry it’s because the modest guitar is also available as Kontakt instrument so that you can’t completely rebuild it. But this article is actually about the round robin function itself, which is only the mathematical or functional aspect (so only the code is relevant for this). If you need pngs just refer to the specific tutorials (like knobs or buttons)

      • CodeKSP

        Ok, no problem, I like just learn/follow the code step by step, line by line. And, no way for extract .nkr.

        • YummyBeats

          yeah me too, actually. But on the other hand some articles can get bloat heavily if you go too much into detail. Plus the articles would start to repeat again and again. For example creating a knob and using set_engine_par() to control the engine is always the same. So when learning all the basics separately I think .. or I hope more advanced tutorials like this one are way more pleasant to follow if you don’t have to read through all those basics code pattern explanations again and again. And to be honest, also writing articles this way would be very exhausting ;)

          But I also know what you mean so usually the Kontakt resources are completely open (including the pngs etc) so that you can analyze the whole “project” yourself. Just not in this case or in all those cases where the instrument needs to be protected (from rebuilding it).

  1. CodeKSP

    “This will not be explained any further in this tutorial but the code is not complex so you should find out yourself how it works.”

    Premium Tutorial for us: “find out yourself”

    WOW! Thanks!

    • YummyBeats

      Well you are right, sorry. I will write an extra (non premium) tutorial about animation steps / image sprites.
      But it is really pretty simple. The code is already completely shown. You just need to create an image sprite with your indicator states like you would do for a custom button or knob. In this case we just need two animation steps. Circle bordered (indicator off state) and Circle filled (indicator on state). With $CONTROL_PAR_PICTURE_STATE you can change the animation position of your image sprite (and keep in mind that $CONTROL_PAR_PICTURE_STATE only works with tables, value edits and labels not with buttons or menus).

      • CodeKSP

        Im premium user. I love learn myself, and autodidact, but 1st I need good tools, that’s, why I’m here! :) Thanks! I will analyze it!


Leave a Reply

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