This is the KSP script that creates the note repetition effect like in VSL, by making key switch automatic in the SAM horns staccato patch.
The idea of creating automatic keyswitches for instruments that support this feature came to my mind yesterday, beucause I never liked very much to create repetition effects using keyswitches. This script solves this problem by making it all automatic.
The UI offers only three options:
Rotate_Mode: The keyswitches are rotated in the same order as they appear in the keyboard. For SAM horns Keyswitch staccatos, the first keyswitch is controled by the Lowest C in an 88 keyboard. Thus the rotate mode will play C#, D, D# and then go back to C again.
Random_Mode: The keyswitches are rotated randomically. The script already prevents two identical keyswitches to occur in a sequence by accident. Thus, if the fist keyswitch is a C the next can only be C#, D and D#. All automatic.
The default mode is Rotate.
Firstnote: The default value is 24, wich corresponds to the lowest C note in my 88 note keyboard. This note is also the first keyswitch note available in the SAM Horns Keyswitch Staccato patch, and as long the keyswitches respect the same pattern, you can use this script in other instruments as well by changing the number 24 into whatever is the first keyswitch for repeated notes.
You should not change this value, unless you wish to adapt this script to others SAM instruments (trumpets, trombones) or patches!!!
Here we go:
1 - Import SAM H KEY - Staccatos (c) into Kontakt 2.
2 - Click on edit instrument
3 - Open the Script Editor
4 - Click on Edit
5 - Paste the following code.
declare ui_button $Rotation_Mode
declare ui_button $Random_Mode
declare ui_value_edit $firstnote (0, 120,1)
while($newrotate = $rotate)
$rotate := $newrotate