In Kontakt, realistic round robins means using a script. I'll share a prebuilt instrument in another post for anyone who'd rather not touch code. For now, if you want to know what to look for in a well-designed instrument (or get a jumpstart on building your own), this is a solid place to start. If you're new to this, round robin recordings are multiple recordings of the same note. Most sampled instruments use them to mimic a real instrument.
4 Things to Avoid
1 - Doing nothing. A Machine or Broken Record effect — 1 1 1 1 1 1 1 1 1
2 - The washing machine cycle — 1 2 3 4 • 1 2 3 4 • 1 2 3 4 — Each "1" creates an audible rhythm.
3 - Random Chaos — 1 4 2 3 2 3 1 1 1 5 1 1 3 1 4 1 — Facepalm. This results in both.
4 - Non-Repeating 'Random' — 3 4 1 4 1 3 1 2 1 4 1 3 4 2 — We still get unwanted rhythms.
The Golden Answer
A shuffle (like a deck of cards) aims to reduce repeating patterns as much as possible. This first bit of code from this script creates a deck of cards (a group of round robins). You can easily edit the RR's via the "cards in the deck" variable. Or you could use a keyswitch or CC (for a different technique or articulation) to change the number. Playing a new note is like pulling a card from the top of the deck. The RR count, or $card goes up a number.
I prefer to name variables both as musically as possible as I appreciate being a composer who'd rather never code. However, "StaccatoRRs := 10" has nothing to do with the RR calculation. I prefer to keep math and music separate to make the script easier for composers to use. Shuffling cards keeps them separate and simple for those who need to code, but would rather keep their focus most on composing.
Once we've reached the bottom card (cards in deck := 10), three things happen. First, we take a picture of the current deck (we'll return to this first shuffle in a minute). Then we call the dealer function to shuffle the deck. How the shuffle works: the dealer fans out 10 cards in an array and tells us to take the first card from his deck and to pick a number, any number, at random. We pick a 3. In the new deck, this card will be in the 3rd in order. What just happened? We pull the cards in order, but re-place them in a random new location.
The shuffle looks like this: 2, 3, 1, 4 — turns into — 4, 1, 2, 3 This way we don't re-use any round robin until all cards have been dealt. It's brilliant (Mathmeticians Fisher & Yates described the concept first). All that said and done, we still have one ACE up our sleeve. If you didn't notice it, we still have a repeat number to avoid: 2, 3 ,1 ,4 — 4, 1, 2, 3. In our final move, we'll pull the card from the top of the new deck and check if it's the same card at the bottom of the old deck. If they match, we glance at two cards from the middle and swap the best of the two. If we swap the new top card with a "1", from the middle of the first deck, it would still give us a repeat. The answer is simple. Swap the 4 (from the 2nd shuffle) with whichever middle card (first shuffle) doesn't also match the 2nd card from the 2nd shuffle. Voila! No Round Robin will ever be played twice in a row. Finally, we mimic a genuine musical performance.
Stuck in Kontakt? Get a new deck and a new shuffle. 🃏