I have now completed a new version of my Kontakt script editor. For those who haven't heard of my Kontakt script editor before please check out this screenshot 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):
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 of what it can look like). You can download the program from my web page where both a windows and an OSX version is freely available.
- 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.
Please post any comments and/or questions you might have in this thread.
(this announcement was posted on the NI Forums as well - link)