What's new

SublimeKSP Updates (current version: 1.18.2)

EvilDragon

KSP Wizard
Feb 6th, 2024 - version 1.18.2
This hotfix update resolves another issue pertaining to .sublime-syntax and .sublime-color-scheme clashing with old .tmTheme files.


Jan 31st, 2024 - version 1.18.1
This hotfix update resolves teething issues caused by the addition of the new compiler option, Additional Branch Optimization Steps
  • Fixed compilation not working if task functions were used
  • Fixed incorrect default value for Additional Branch Optimization Steps option (it was set to true, even if the menu didn't show it)
  • compile_with/without pragma directive for the new compiler option now works and is documented on Wiki (it's extra_branch_optimization)

Jan 29th, 2024 - version 1.18.0
This update adds support for new engine parameters and callback type introduced with Kontakt 7.8, along with the following changes:
  • Added an option which enables completions for vanilla KSP built-in constants and variables (with $, %, etc. type prefixes)
  • Added .SIZE define for literal defines (issue #99)
  • Added an error message if function declaration has duplicate argument names
  • Added a compiler option to enable additional branch optimization steps - this allows using if-else with defines, which can be used in many interesting ways
  • Added += and =+ operators to defines, which allows appending or prepending a literal define to the existing list of literals - see Wiki for more info!
  • Improved internal structure of built-ins data file, which enables using vanilla KSP built-in constants as they were supposed to be used (previously you couldn't use these to, for example, specify array size upon declaration)
  • Improved automatic syntax detection (SublimeKSP will automatically switch syntax to KSP if enough keywords have been detected in the first 5000 characters of currently focused document)
  • Improved syntax coloring of pers, instpers and read keywords when they are placed after the UI widget specifier
  • Further improved command line interface: output_file argument is now completely optional; save_compiled_source pragmas are now disregarded if output_file argument is specified
  • Fixed operator precedence for or, xor, .or. and .xor. operators
  • Fixed task function return and out parameters not working correctly (issue #217)
  • Fixed an issue where multi-dimensional arrays clashed with Combine Callbacks feature (issue #389)
  • Fixed "Optimize Compiled Code" option breaking with bitwise operators (issue #423)
  • Fixed $CONTROL_PAR_CUSTOM_ID missing from syntax coloring
Have fun!

Oct 25th, 2023 - version 1.17.2
This is a minor update with the following changes:
  • Fixes an issue introduced in 1.17.1, where import paths wouldn't be checked if they exist before compilation continued. Now works again!
  • Option "Play sound when compilation finishes" now finally works even for SublimeKSP installations done via Package Control!
Have fun!


Sep 28th, 2023 - version 1.17.1
This is a minor update with the following changes:
  • Improved detection of duplicate defines - now both the name and the value of a define have to match in order to throw a compiler error
  • Removed $ENGINE_PAR_RAUM_MIX because it is not a valid engine parameter
  • Added support for importing whole folders in one go, instead of listing them file by file
  • Pressing Alt+O with cursor focused on the line which imports a folder will show all .ksp files within that folder in a new Sublime Text window
Have fun!


Sep 14th, 2023 - version 1.17.0
This version brings support for Kontakt 7.6 additions (including NKS2 parameter descriptive information and navigation commands!), along with several fixes.

  • Added support for real array arguments in load/save_array(_str) commands. This was supposed to be there in 7.5, alas...
  • Fixed missing Raum engine parameters ($ENGINE_PAR_RAUM_REVERB, $ENGINE_PAR_RAUM_PREDELAY_UNIT)
  • Fixed incorrectly named engine parameter for Raum Low Shelf (it was $ENGINE_PAR_RAUM_LOWCUT instead of $ENGINE_PAR_RAUM_LOWSHELF)
  • Fixed superfluous closed parentheses appearing in auto-completion suggestions for certain commands
  • Updated the list of functions with forced parentheses with all remaining commands that weren't there yet

Jul 11th, 2023 - version 1.16.0

This version brings support for Kontakt 7.5 additions and a couple of interesting new features.
  • Added overloaded macros - different macros can now be executed based on different number of arguments they have!
  • Added the capability for override keyword which allows user-defined functions to override built-in functions
  • Added an error in case a duplicate define is being declared (issue #380)
  • Added a new comment type: section comment {{ }}, which will also show up in the symbol list (Ctrl/Cmd+R), making it easier to create named bookmark jumps in the code
  • Fixed persistence shorthands not working if they come after ui_control keyword (issue #379)
Thanks to Jack Williams from Fracture Sounds for implementing overloaded macros and expanding the usage of override keyword!


Apr 29th, 2023 - version 1.15.0

This version brings support for Kontakt 7.3 additions, a number of bugfixes and even more syntax coloring improvements, as well as the announced removal of the Logger module.
  • Fixed get_ui_id() being inserted in various situations when it shouldn't have been added (for example when using an array when setting $CONTROL_PAR_PARENT_PANEL etc.)
  • Fixed a couple of issues that prevented compilation from command line in certain cases (when using inline iterate_macro(), for example, string placeholders weren't reachable to the preprocessor)
  • Fixed #n# token not being replaced inside strings when using inline literate/iterate_macro() (issue #306)
  • Info bar line in Sublime Text will now report how long the compilation lasted upon successful compilation
  • If compiling from command line and output file argument wasn't specified, the compiler will notify the user about it upon successful compilation
  • Added $NI_ZONE_STATUS_ constants to builtins, which somehow managed to evade being included around Kontakt 7.1 times!
  • redirect_midi() command now has its arguments properly documented
  • Arrow shorthand notation for event parameters didn't work with functions like by_marks(), now it does (issue #350)
  • Added more syntax checks (when "Extra syntax checks" option is enabled) relevant to UI control declarations, and arguments which can be both integer and real (like for the sort() command)
  • Minor tweaks to KScript Dark theme for improved contrast
  • Cleaned up several files in the repository for better readability
  • Even more syntax coloring improvements, for example previously %CONTROL_PAR_VALUE would colorize as a valid control parameter, when it isn't valid - now it doesn't anymore; using macro tokens inside variable declarations didn't colorize properly, now it does
  • Completions list now looks the same in Sublime Text 4 as it does in Sublime Text 3 (function arguments are listed in parentheses after function name)
  • Fixed an error where all functions that had no arguments in the completion list ended up with closed parentheses (for example, exit()) which was incorrect
  • Added several more unit tests to keep us on our toes so that we don't break things in the future
  • Added .bat and .sh scripts to run tests locally (requires Python 3 to be installed and added to PATH environment variable)
  • Removed duplicate callbacks warning that was triggered too early in the compilation process
  • Removed Logger functionality - we recommend using Creator Tools with watch_var()/watch_array_idx() commands instead!

Thanks as always to Jack Williams from Fracture Sounds for solving some of the tricky ones from the above list!

Update from Sublime Text's Package Control or from GitHub repository.
 
Last edited:
It's just a slight improvement of already existing UI Arrays (see sKSP wiki). The difference is in how things look after compilation.

Previously, this line:
Code:
declare ui_switch Test[10]
would compile to:
Code:
declare %Test[10]
declare ui_switch $Test0
%Test[0] := get_ui_id($Test0)
declare ui_switch $Test1
%Test[1] := get_ui_id($Test1)
declare ui_switch $Test2
%Test[2] := get_ui_id($Test2)
declare ui_switch $Test3
%Test[3] := get_ui_id($Test3)
declare ui_switch $Test4
%Test[4] := get_ui_id($Test4)
declare ui_switch $Test5
%Test[5] := get_ui_id($Test5)
declare ui_switch $Test6
%Test[6] := get_ui_id($Test6)
declare ui_switch $Test7
%Test[7] := get_ui_id($Test7)
declare ui_switch $Test8
%Test[8] := get_ui_id($Test8)
declare ui_switch $Test9
%Test[9] := get_ui_id($Test9)
From 1.9.0 onward, it will look like this:
Code:
declare $preproc_i
declare %Test[10]
declare ui_switch $Test0
declare ui_switch $Test1
declare ui_switch $Test2
declare ui_switch $Test3
declare ui_switch $Test4
declare ui_switch $Test5
declare ui_switch $Test6
declare ui_switch $Test7
declare ui_switch $Test8
declare ui_switch $Test9
$preproc_i := 0
while ($preproc_i<=9)
%Test[$preproc_i] := get_ui_id($Test0)+$preproc_i
inc($preproc_i)
end while
...

This saves a ton of lines of compiled code when you get into larger UI arrays (or multidimensional ones).
 
Hi guys,

as Mario said now is possible to import the nckp format from Creator Tools and I wanted to add few more side notes on the integration I did:

- I'm the QA for the Kontakt Instruments team but I wanted to clarify that this is not an "official" NI participation but more an internally agreed initiative to hopefully push more of you to use our new tool.
- Mario have been beta testing my changes but you're very welcome to do the same, just whatever issue you may experience while using this new function please write to me directly or raise an issue on the github repo, and I'll try to sort it out asap.

Happy development to everybody ;)
 
Last edited:
SublimeKSP is updated to version 1.9.1! Minor (but some of them important if you use Optimize compiled code option!) fixes.
 
Can I downgrade the update to the previous version?
Since the automatic update , trying to compile a very important code that I'm working on (for more then a year now) causes sublime to crash.
The compiling process gets stuck at:
Comiling.png
And then, after a loooooooong wait - Sublime crashes :confused::shocked:o_O:alien:

- The same code was perfectly fine 4 days ago.
- I've also tried to compile older version of the same code to no avail (I back up each progress).
- Sublime crashes both on my laptop & desktop.
- Uninstalling and reinstalling Sublime didn't help....

Major SOS here...any tip about downgrading would be much appreciated!:emoji_rose:
 
Can I downgrade the update to the previous version?
Since the automatic update , trying to compile a very important code that I'm working on (for more then a year now) causes sublime to crash.
The compiling process gets stuck at:
Comiling.png
And then, after a loooooooong wait - Sublime crashes :confused::shocked:o_O:alien:

- The same code was perfectly fine 4 days ago.
- I've also tried to compile older version of the same code to no avail (I back up each progress).
- Sublime crashes both on my laptop & desktop.
- Uninstalling and reinstalling Sublime didn't help....

Major SOS here...any tip about downgrading would be much appreciated!:emoji_rose:

The only way I can possibly debug this issue is to directly compile your code and read the output of python. I have compiled a variety of complex projects with a lot of imported files and extra features with no issues, so there isn't anything I can use to find the potential problem by myself. Since there is no error being given, and it's just crashing, it's even less likely that I can guess the issue since I don't even know the line of code it happens on.

Like Mario said, you can downgrade by uninstalling KSP in the Package Control and instead just manually installing the older version that he linked by placing it directly in the folder.
 
Update:

In the code that happens at that compilation step, I found an extraneous python print() statement, which is what I use to debug functions. It may be possible the repeated print()'s overloaded your system for some reason or another, and Sublime became unresponsive as a result.

I have scheduled a quick 1.9.6 release that removes the prints. Please check the latest automatic update before downgrading if this fixes your issue, and let me know if it doesn't.

Also, when you do, please verify you are on 1.9.6. You can do this by bringing up the Package Control "List Packages" command, and observing KSP in the list. It will say the version number.
 
Last edited:
Update:

In the code that happens at that compilation step, I found an extraneous python print() statement, which is what I use to debug functions. It may be possible the repeated print()'s overloaded your system for some reason or another, and Sublime became unresponsive as a result.

I have scheduled a quick 1.9.6 release that removes the prints. Please check the latest automatic update before downgrading if this fixes your issue, and let me know if it doesn't.

Also, when you do, please verify you are on 1.9.6. You can do this by bringing up the Package Control "List Packages" command, and observing KSP in the list. It will say the version number.
Thanks for helping out so quickly, much appreciated!
Is 1.9.6 out yet? I'm currently on 1.9.4.
 
Top Bottom