Skip to content

Welcome to CKSP!

cksp is a compiler and transpiler built in C++, designed to convert cKSP syntax into KSP syntax for Native Instruments' Kontakt.

Its goal is to bring the feel of modern programming languages to Kontakt scripting, introducing modularity and abstractions while ensuring fast compilation. This makes writing and maintaining KSP scripts easier and more approachable—even for those new to Kontakt instrument development.

At a Glance

An up to x27 Speed-up in Compilation Performance!

Since almost all SublimeKSP features are supported, cksp can also compile existing sksp projects with minimal changes.

And it does so in seconds with an up to × speed-up compared to SublimeKSP. Beneath are some real-world projects that have been benchmarked with both compilers (big thanks to Sonuscore for providing these!):

    Benchmarks: 2021 MacBook Pro (M1 Max, 64 GB RAM).

    Frequently Asked Questions

    The most important questions about CKSP, the compiler, migration from SublimeKSP, and the VS Code workflow.

    What is CKSP?

    CKSP is a compiler and transpiler written in C++ for Native Instruments Kontakt scripting. It accepts both cksp and standard ksp code.

    It lets you write code in the higher-level CKSP syntax and compiles it down to standard KSP code that Kontakt can load. CKSP is available through the CKSP Tools VS Code extension for shortcut-based compilation, and as a standalone executable for command-line workflows.

    Why use CKSP instead of vanilla KSP?

    Besides its syntactical oddities and strict limitations, vanilla KSP was never designed for large projects. CKSP adds structure where larger Kontakt instruments usually need it: local variables, lexical scoping, objects, functions with parameters, optional typing, and a more readable syntax.

    The language overview is covered in The CKSP Syntax.

    Does CKSP stay compatible with Kontakt?

    Yes. CKSP compiles to standard KSP, which you can load into Kontakt and run normally.

    As with SublimeKSP, a common workflow is to place the generated *.txt file inside your Kontakt instrument's resources container. Kontakt's Script Editor can then automatically reflect updates from your codebase.

    See the syntax documentation for the CKSP constructs that are converted back to KSP output.

    Can CKSP compile existing KSP or SublimeKSP projects?

    Yes. CKSP fully supports vanilla KSP files and adopts most features from nojanath's fork of Nils Liberg's SublimeKSP plugin. If you already have a SublimeKSP project, there is a good chance that CKSP can compile it out of the box. You can quickly test this by setting up the cksp compiler as a Build System in Sublime Text. This also lets you use both compilers, sksp and cksp, on the same project.

    If compilation fails, CKSP's error messages are usually descriptive enough to point you to the required code changes. Feature differences between SublimeKSP and CKSP are covered in Adopted Features.

    Which SublimeKSP preprocessor features are supported?

    CKSP includes migration-oriented preprocessor support such as macros, defines, line incrementors, iterate_macro, and literate_macro.

    The related compatibility notes are listed in Adopted Features.

    How do I compile a CKSP file?

    There are several ways to compile a CKSP file. With the CKSP Tools VS Code extension, you can compile the current file directly from the editor with Ctrl+R on macOS.

    If you have configured CKSP as a Build System in Sublime Text, use Cmd+B on macOS.

    From the command line, compile a CKSP file with cksp input.cksp -o output.txt. Recommended setup paths are documented in Installation.

    What does the VS Code extension add?

    The CKSP Tools extension provides syntax highlighting, hover information, go-to-definition style navigation, compiler integration, Kontakt log output, and workflow helpers.

    When you hover over or type built-in KSP commands, the extension can show the official documentation for those functions directly in the editor, so you do not have to search through the KSP manual.

    The full editor workflow is described in VS Code Extension.

    How fast is CKSP compared with SublimeKSP?

    The homepage benchmarks show CKSP compiling several real-world Kontakt projects in seconds, with large speed-ups over SublimeKSP. See the performance chart above for the measured comparison.

    Is CKSP still under active development?

    Yes. Both the CKSP compiler and CKSP Tools are under active development.

    For current builds and changelogs, use the latest compiler release or the extension information in VS Code Extension.

    Where can I find the latest release or report issues?

    Download the compiler from the latest release, browse setup instructions in Installation, or report bugs and feature requests in the issue tracker.