Tab le o f Con t en t s
Introduction................................................................................................................... 5
Getting Started - the Kontakt Script Processor ..................................................................6
Working with KSP and Scripts ....................................................................................... 10
Basic Scripting Tutorial ................................................................................................12
Generating MIDI notes: a simple accompanist .............................................................12
Built-in variables: Building a simple Octaver................................................................ 14
UI Control variables and the init callback: Creating a simple Harmonizer ........................ 15
Debugging and customizing: finishing your script ......................................................... 18
Fundamentals ..............................................................................................................25
General rules concerning the syntax............................................................................ 25
Callbacks ................................................................................................................. 26
Variables..................................................................................................................26
Script Call Order ....................................................................................................... 31
Tempo- and time-based scripting ................................................................................... 32
The wait() function.................................................................................................... 32
Polyphonic Variables ................................................................................................. 33
Control Statements.......................................................................................................34
if…else…end ...........................................................................................................34
select() ....................................................................................................................34
while() ..................................................................................................................... 35
Operators ....................................................................................................................36
Boolean Operators..................................................................................................... 36
Arithmetic Operators ................................................................................................. 36
Bit Operators ............................................................................................................ 37
Array Functions ........................................................................................................ 37
Random Generator ....................................................................................................37
Group Management ......................................................................................................38
Events and Note ID's ................................................................................................. 40
Changing Events ....................................................................................................... 41
Grouping Events .......................................................................................................43
Assigning Event Parameters .......................................................................................44