The compiled code gets copied to your clipboard and you can just paste it into Kontakt Ctrl V So the above gets: set_control_par_str(get_ui_id($textfield),$CONTROL_PAR_TEXT,"hello, it's me")īut actually you don’t have to worry about this. When compiling, Sublime Text “rewrites” the short syntax code and makes it readable for Kontakt. Wouldn’t work at all if you copy it into Kontakt. You have to compile your code when you are using all the helpful extra features since this one: $textfield -> text: "hello, it's me" Optimize Compiled Code: this simply optimizes your code.Signal Error on Empty if/case statements: warns you when you leave statements empty like so.(Undeclared variables, wrong statements are already checked by default) Extra Syntax Checks: this detects some additional syntax errors. Set_control_par($s1cn2,$CONTROL_PAR_HIDE,$HIDE_PART_NOTHING) Set_control_par_str($s1cn2,$CONTROL_PAR_PICTURE,"wallpaper2") Set_control_par_str($s1cn2,$CONTROL_PAR_TEXT,"") Set_control_par_str($INST_WALLPAPER_ID,$CONTROL_PAR_PICTURE,"wallpaper1") Set_control_par($label_id ,$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL) Note that this makes your compiled code almost unreadable show example Compact Variables: this compacts your code by shorten all variable names.Remove Indents: when compiling all indents are removed which slightly compacts your code.Go to tools and enable all KSP settings as shown in the screenshot: Explanation: Here are some recommended settings you should do when it comes to compiling your code. $lbl-> text := "BUTTON" & idx & ": CALLED ME" If it’s colorized now everything works fine: copy & paste the following test code into your tab.type “ksp” and select “Set Syntax: KSP”.If you open a new tab, start writing and your code stays just white, the KSP syntax is not activated. type “ksp” and select “KSP (Kontakt Script Processor)”.install the special KSP Plugin from Nils Liberg / nojanath fork ( GitHub) by opening the command palette with:.install Package Control ( installation instructions).download Sublime 3 and install it (at best as portable version on a non-system drive).Start new project – activate KSP syntax.Like this now (the above is still allowed): $textfield -> text: "hello, it's me" We can write this line: set_control_par_str(get_ui_id($textfield),$CONTROL_PAR_TEXT,"hello, it's me") With the increase of complexity of your code Sublime saves lots of time and frustration so it is highly recommended to use it. At the top of the each article you can see weather the Sublime Syntax is used or not. Please note this blog also covers the original KSP syntax.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |