ksp
premium article

Last modifiedby & filed under Kontakt Scripting (KSP) - Basics, UIs, Tutorials, Scripts and Tools, Kontakt Scripting (KSP) :: Custom Scripts & Functions (Plugins).

With samplers (or other software instruments) round robin basically means sound variations. Imagine you are picking a guitar! Your single picks will never sound the same since you always pick the strings slightly different. We can simulate that “humanization” by simply randomly varying between a few sound variations which we all have to recorded of course. So each time you hit a key on your keyboard another sound variation is played. Thereby the same variation shall not be played twice one after another.


Different ways of round robin


round robin function using groups

We wanna use 4 different sound variations so we will create a function to vary between 4 groups. Each group becomes a “container” for one sound variation. Since the variations shall be triggered randomly we will do a simple check so that the same sound is never played twice, one after another.

premium content

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?

10 Responses to “Kontakt Scripting (KSP) :: CUSTOM SCRIPTS :: basic round robin function (groups & keys)”

  1. jesse

    in the case of cymbals, I run into the issue where if I play a high velocity followed by a low velocity, the low velocity sample sound chokes the sustain of the high sample sound. What's a good solution to this? Is there maybe a way to script longer sustain values for higher velocity hits?

    • YummyBeats

      In the group editor you could try to assign your cymbal group to a voice group and then incerase the voices. You can increase the voices in the same line next to the voice group selection.

      I only tried it briefly with the release phase, but not with sustain. But I don't see why sustain shouldn't work as well.

      You can then simply set your hold/sustain rate in the AEG (or Volume ADHSR) modulator. So scipting is not required here.

  2. vincent sermonne

    Thank you for the prompt response! I was hoping to be able to group the same elements (kick, snare, hihat etc etc...) in their group in order to simplify the use of the effect, without going through the "instrument buse" channel because there will be several bass drum and snare drum, with different settings. I'm going to try it with your groups methode because the round robin in order that kontakt proposes is a little too mechanical. thx a lot !

  3. vincent sermonne

    Hello ! Very usefull BUT ! How to assign to a single note and not to all the notes on the keyboard? Example Kick: the strokes are from 0 to 3 (C-2 to D#-2) but the position of the kick should only be heard on the 35, the 38 is for the snare drum etc etc etc Thx !! As I'm French I may have missed an already existing explanation, forgive me in this case.

    • YummyBeats

      Hey, thx!
      Would it be a problem for you to work with groups instead?
      This way you would just need to create 4 separate groups each with your preferred mapping like:

      Group 1: B0 = Kick variation 1
      Group 1: D1 = Snare variation 1
      Group 2: B0 = Kick variation 2
      Group 2: D1 = Snare variation 2


      (Just follow the group round robin section)

      • vincent sermonne

        eh too bad no I have to keep groups differentiated by gender to allow different eq's per group. And then I don't see how to create a mixer with this method !

        • YummyBeats

          Ok I see,
          I think there is a way you want it e.g. via ignore_event() / note_off() and play_note(), but that's a little too complicated for the comments here now :) But maybe you already know where it leads to?!

          Another solution would be working with more than 4 Groups. Like 4 Groups for the Kick, 4 Groups for the sanre and so on.

          • vincent sermonne

            yes indeed, for the moment I use the basic Kontakt method with the group start option and 4 group round robin...it requires to use one effect per group with the same settings if you want an eq for the bass drum (for example), it might become a bit heavy...in addition to the mechanical round robin not great. That's why the random round robin per key made me salivate ;)

          • YummyBeats

            Yeah, working with groups here is a bit cumbersome.
            But performance wise I think you wouldn't need to worry. Even 500 groups loaded with modulators EQ & FX would be no problem. This just requires a little more ram.

            Another alternative would be working with veolicty rangnes if you are not using more than 32 veolcity steps for each drum.
            But working over the veolcity range is way more complicated than your approach, regarding the code.

          • vincent sermonne

            I am far from being a scriptwriter, I am slowly advancing my apprenticeship as an amateur, hence my presence here to learn a little bit, and I thank you for it. I'm observing NI's Session drummer scripts and it's the key method that is used but it's hard core ;) Level too high for me ! However, with your round robin by key method, I just need to understand how to make a single note trigger the round robin by key of a specific group. Translated with www.DeepL.com/Translator (free version)

Leave a Reply

use <pre> </pre> to wrap code blocks

use <code> </code> to wrap small code snippets

use basic html to style your comment

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