kotori
04-11-2006, 12:04 PM
I have now completed a new version (http://www.nilsliberg.se/ksp/) of my Kontakt script editor. For those who haven't heard of my Kontakt script editor before please check out this screenshot (http://nilsliberg.se/ksp/screenshot.png) and read more about its features on the web page.
The latest version (0.96) fixes a number of bugs and adds a completely new compiler. This compiler makes it possible to extend the script syntax in a number of ways. Compiling (by pressing F5) will translate code using the extended syntax to ordinary Kontakt script code. The reason for using the extended syntax is that it makes it easier for humans to write scripts. Features of the new compiler and extended script syntax (here's a chart (http://nilsliberg.se/ksp/img/kscript_editor_0_96.jpg)):
Variables don't have to be prefixed with $ and % which makes scripts clearer to read and easier to type.
For-loop - you can write "for i := 0 to 10".
Else if - no more nested if-statements, you can write "else if note = 24".
Parenthesis around if/select/while conditions are optional. You can write "if x = 10".
User-defined functions - you can define your own functions to avoid repeating yourself and to make larger scripts managable.
Local variables in functions. A variable which is declared inside a function is local to that function. Eg. if two functions both contain the line "declare x" then they will each get their own x variable. Changing the value of one will not affect the other. This facilitates further modularization and make functions more reusable.
Common errors are reported when you compile.Usage of the extended syntax is completely optional - you decide yourself if you want to use it or not. The new editor also provides instant HTML export with syntax highlighting. This is useful for printing or publishing on the net (here's a sample (http://nilsliberg.se/ksp/scripts/partmaker_source.html) of what it can look like). You can download the program from my web page (http://www.nilsliberg.se/ksp/) where both a windows and an OSX version is freely available.
Please post any comments and/or questions you might have in this thread.
Best,
Nils
(this announcement was posted on the NI Forums as well - link (http://www.nativeinstruments.de/forum_us/showthread.php?p=218256))
The latest version (0.96) fixes a number of bugs and adds a completely new compiler. This compiler makes it possible to extend the script syntax in a number of ways. Compiling (by pressing F5) will translate code using the extended syntax to ordinary Kontakt script code. The reason for using the extended syntax is that it makes it easier for humans to write scripts. Features of the new compiler and extended script syntax (here's a chart (http://nilsliberg.se/ksp/img/kscript_editor_0_96.jpg)):
Variables don't have to be prefixed with $ and % which makes scripts clearer to read and easier to type.
For-loop - you can write "for i := 0 to 10".
Else if - no more nested if-statements, you can write "else if note = 24".
Parenthesis around if/select/while conditions are optional. You can write "if x = 10".
User-defined functions - you can define your own functions to avoid repeating yourself and to make larger scripts managable.
Local variables in functions. A variable which is declared inside a function is local to that function. Eg. if two functions both contain the line "declare x" then they will each get their own x variable. Changing the value of one will not affect the other. This facilitates further modularization and make functions more reusable.
Common errors are reported when you compile.Usage of the extended syntax is completely optional - you decide yourself if you want to use it or not. The new editor also provides instant HTML export with syntax highlighting. This is useful for printing or publishing on the net (here's a sample (http://nilsliberg.se/ksp/scripts/partmaker_source.html) of what it can look like). You can download the program from my web page (http://www.nilsliberg.se/ksp/) where both a windows and an OSX version is freely available.
Please post any comments and/or questions you might have in this thread.
Best,
Nils
(this announcement was posted on the NI Forums as well - link (http://www.nativeinstruments.de/forum_us/showthread.php?p=218256))