PDA

View Full Version : SAM Horns note repetition Script for Kontakt 2


Guga Bernardo
04-11-2005, 08:35 PM
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.


on init
declare $rotate
declare $newrotate
declare ui_button $Rotation_Mode
declare ui_button $Random_Mode
declare ui_value_edit $firstnote (0, 120,1)
$firstnote:=24
$Rotation_Mode:=1
$Random_Mode:=0
make_persistent($rotate)
make_persistent($Rotation_Mode)
make_persistent($Random_Mode)
end on
on ui_control($Rotation_Mode)
$Random_Mode:=0
$Rotation_Mode:=1
end on
on ui_control($Random_Mode)
$Random_Mode:=1
$Rotation_Mode:=0
end on
on note
if($Rotation_Mode=1)
message($rotate)
play_note($firstnote+$rotate,$EVENT_VELOCITY,0,-1)
$rotate:=$rotate+1
if($rotate>3)
$rotate:=0
end if
end if
if($Random_Mode=1)
while($newrotate = $rotate)
$newrotate:=random(0,3)
end while
$rotate := $newrotate
message($rotate)
play_note($firstnote+$rotate,$EVENT_VELOCITY,0,-1)
end if
end on


6 - Save the patch.

Enjoy! :D

Guga Bernardo
04-11-2005, 08:50 PM
Good news and bad news.

I just found out that this script will work for SAM Trombones as well, but it will not work for SAM Trumpets, because the keyswitches are done in a different way.

Well, at least 66% of the problem is solved! :D

A_Sapp
04-11-2005, 08:52 PM
How about a small demo of the script in action?

Guga Bernardo
04-11-2005, 09:21 PM
Here it is:

www.trilhaoriginal.com.br/repetition.script.demo.mp3

First without repetition fx, second with rotation mode, third with random mode. The velocities are flat in all cases, so the subtle changes in the sound are due to the action of the script ifself.

Guga Bernardo
04-11-2005, 09:33 PM
This one is much better, also more expressive:

www.trilhaoriginal.com.br/repetition.script.betterdemo.mp3

In this one I actually quantized the chords, so that the repetition effect would become more obvious. In the same order: No script, rotation mode, and random mode.

A_Sapp
04-11-2005, 11:17 PM
Wow, I have to say, that's sounds pretty nice man. Now do a Signs mockup of the horn part. :)

Rach3
04-12-2005, 02:03 AM
The second one (rotation mode) sounds very natural.

Chadwick
04-12-2005, 10:59 AM
That second demo is a brilliant example of the value of rotating through several samples on the one key. Thanks Guga!

guybrush threepwood
04-12-2005, 01:29 PM
thx for the great info :)

Should get more sleep before looking code

Rich Pell
04-12-2005, 01:50 PM
The random mode sounds quite natural to my ears. Good work! :) Rich

Waywyn
04-12-2005, 02:04 PM
heyja and thanks for that cool thing.

i just have one question without sounding kinda ironic, but what is the difference to the already available sam horns for kontakt1 ? there is also a program which is round robin and it has, i think 3 or 4 samples.

... but defintely thanks. i will hope i will get my version of K2 too soon and i said to myself that i will also look into these script stuff a little bit.

Guga Bernardo
04-12-2005, 02:11 PM
thx for the great info :)

Been taking a look, and made a test with the Horns Far. It has 8 keyswitches so you have to make slight changes. Apart from seeing that the Random patch (using the cycle random) included in the kontakt version sounds not so good as the rotation, i think the script has a small problem

When you are using just one instrument, and press 2 notes, 2 keyswitches are pressed by the script, so you are not using all the possible samples in each voice. To do that, using properly all the samples of the rotation in each voice, you have to set up as many instruments as voices and route each voice to each instrument. Not really noticeable when you have 8 keyswitches, anyway

Here it is the script for the Horns Far, if someone doesn't feel like searching and changing the parameters, and a little demo with the rotation/random of the script

Plablo, I am afraid your script is not correct.
The SAM Horns Far also has 4 keyswitches, but they are whole tone instead of chromatic, begining from the key 29 (Lowest F).
I think we have to adopt open-source policies to avoid mistakes or multiple versions of the same scripts, or people will start to get confused about them.
I propose that we create a unique name for each project, and release the scripts with version numbers so that people can be aware of latest version and updates.
Anyone can alter the scripts, but the "head" of the project must be warned so that new features can be double checked before a new version is released.

I will be posting the last updated versions in a DOC file, with instructions and informations on the repetition script. (they are done already, but I need to write the documentation)

For now, the last version must be ignored.

Thanks for putting your time and effort to analyse the script, anyway! :)

Guga Bernardo
04-12-2005, 02:33 PM
You can find the documentation and the scripts here:

www.trilhaoriginal.com.br/SAM_note_repetition_for_KSP_version1.rtf

Current versions support the following patches:


SAM HORNS KEY STACCATO CLOSE
SAM TROMBONES KEY ALL STACCATOS CLOSE
SAM TROMBONES KEY ALL STACCATOS ENHANCED
SAM TROMBONES KEY ALL STACCATOS FAR
SAM HORNS KEY STACCATO FAR



Enjoy!

guybrush threepwood
04-12-2005, 03:22 PM
yep, you're completely right, correcting it :)

Guga Bernardo
04-12-2005, 05:00 PM
SAM Note Repetiton Project for KSP is updated to Version 1.1!

Download here:

http://www.trilhaoriginal.com.br/SAM_note_repetition_for_KSP_version1.rtf

There is a new script for the following intruments now:


SAM TRUMPETS STACCATO_S MW=ALT CLOSE
SAM TRUMPETS STACCATO_L MW=ALT CLOSE
SAM TRUMPETS STACCATO_S MW=ALT STAGE
SAM TRUMPETS STACCATO_L MW=ALT STAGE
SAM TRUMPETS STACCATO_S MW=ALT FAR
SAM TRUMPETS STACCATO_L MW=ALT FAR

werter66
04-12-2005, 05:37 PM
Huh nice Idea, slowly it comes to my mind what will come over us next in the next time... :D


Maybe there is allso a possibility to make a script for the scarbee bass, with is really nice but difficult to work with...

werter

guybrush threepwood
04-14-2005, 10:05 PM
Good news and bad news.

I just found out that this script will work for SAM Trombones as well, but it will not work for SAM Trumpets, because the keyswitches are done in a different way.Just received my trumpets today, and saw that the KS staccattos are not under the KS folder, but under the Basic Main folder with the names Trp Staccatos_L 4x KEY c.nki and Trp Staccatos_S 4x KEY c.nki. The keyswitching layering is the same as in the horns and so, so the first script can be used too :)

A little example of fast repetition with the trumpets:
http://www.pablodelgado.com/public/trumpetrep.mp3

btw, to get the best results, each voice has to be routed to a different instrument