Changelog
Kontakt 8.12
New Features
Audio Components Package
- The experimental audio_components package introduced in Kontakt 8.10, with the Waveform component and the Sample interface, is now stable
- Renamed
SampleRangeto VisibleRange
Kontakt Package
- Added Instrument class and instrument variable providing access to the current Kontakt instrument (replacing the experimental
Programclass andprogramvariable) - Added Group, GroupList, and GroupListIterator classes for working with instrument groups; zones are created via add_zone
- Added group, is_destroyable, and destroy members to Zone
- The experimental Sample, Zone, ZoneList, and ZoneListIterator classes, as well as load_sample and library_path, are now stable
Path Package
- The experimental
fspackage introduced in Kontakt 8.10 is now the stable path package, containing the Path class and the path_from_uri function - Replaced
appending_allandappending_pathwith appending overloads accepting a String, a Path, or an array of Path segments
URI Package
- The experimental uri package introduced in Kontakt 8.10, with the URI class and the parse_uri and parse_uri_list functions, is now stable
Language
- Classes now support method overloading: multiple methods with the same name can be defined, as long as they differ in parameter count, types, or argument labels
- Replaced
append_allwith an append overload accepting an array of elements.
Kontakt 8.11
New Features
UI Package
- Added letter_spacing parameter to Text and TextInput components, and the LetterSpacing environment modifier
- Added line_height parameter to Text component, and the LineHeight environment modifier
Language
- Subscript Operator support via the
atandassignmethods for custom classes
Improved
Language
- Number parsing performance has been improved, so parsing is now faster
Kontakt 8.10
New Features
Math Package
- Added atan2
Experimental Features
Audio Components Package
- New package with Waveform component
Filesystem Package
-
New
fspackage with thePathclass for working with filesystem pathscautionThe
fspackage'sPathclass may clash with the ui.Path class from theuipackage, which describes a vector drawing path. If you need both in the same file, use a namespace import to disambiguate: -
Added path_from_uri function to create a Path from a file URI string
Kontakt Package
- Added load_sample function to load samples from disk
- Added library_path variable providing the path to the Kontakt library folder
- Added Sample class representing a loaded audio sample
- Added
Programclass providing access to the current Kontakt program and its zones (replaced by Instrument in Kontakt 8.12) - Added Zone, ZoneList, and ZoneListIterator classes for working with program zones
URI Package
- New uri package with the URI class for working with URIs
- Added parse_uri function to parse a URI string
- Added parse_uri_list function to parse a
text/uri-listformatted string
Fixed
Language
- String.index didn't work for characters composed out 3 or more code points
- String.lowercased, String.trimmed, String.uppercased, and String.reversed change the unicode normalization form
- Duplicate errors printed for type errors in function signature
Kontakt 8.9
New Features
Language
- Strings now support the
\rescape sequence, which is especially useful when dealing withtext/uri-listmime data - Functions and methods now support default arguments:
fun my_fun(parameter: Int = 0) {}
Fixed
Language
- A
breakstatement outside of aforloop statement was considered valid - is_finite didn't return
falsefornan - removing_all and replacing_all would freeze when the search string was empty
- Some runtime errors would show the wrong source location
- Loading a font could crash Kontakt
Kontakt 8.8
New Features
Kontakt Package
Kontakt 8.5.1
New Features
UI Package
- Added constructor with visible Bool property for Popover and removed experimental
close_policy
Fixed
UI Package
- Arc thickness not constrained to parent frame properties
Language
- Error message when parsing invalid unicode codepoints not describing the issue
Kontakt 8.5
New Features
UI Package
- Drag and drop modifiers to enable drag and drop functionality on components are now stable:
Language
- Enums can now be used as keys in maps
- Compile time improvements
Kontakt 8.4
New Features
Kontakt Package
- KSPButton, KSPKnob, KSPSwitch, and KSPValueEdit expose the KSP property
$CONTROL_PAR_TEXTvia thetextproperty. - KSPTextEdit adds a setter to the property text
UI Package
Fixed
Kontakt Package
- An issue where the menu entries visibility in KSPMenu instances was not synchronized with their counterparts in KSP.
Language
- An issue where using the declarative for loop wouldn't update before its body
- An issue where the declarative if statement wouldn't update before its body
- An issue where some modifiers caused a cycle error
Kontakt 8.3
New Features
Kontakt Package
Kontakt 8.2.1
Fixed
UI Package
- Fixed an issue where Popover was not displayed when its visible property was initially set to
true. - Fixed an issue where Popover was not following its anchor.
- Resolved a crash that occurred when the UI was reloaded and a Popover was present.
Kontakt 8.2
New Features
Language
-
Angle: Helps dealing with degrees and radians conversion
The components and modifiers that take angles as arguments now use the Angle global class instead of Float type. This affects Rotation, Arc, and the Painter methods draw_arc, draw_pie, and rotate.
-
Maps: A new associative container to store key-value pairs.
-
Unicode code points allowed in string literals
-
Named arguments can be listed in arbitrary order now
-
enumerated() was added to Array to iterate over elements with their index.
-
nil can now be used as result of a ternay branch:
var x: Int? = 0 > 1 ? 4 : nil -
[[Float.clamped|clamped(min:max)]] added to Float.
-
Range utility to express ranges and iterate over them
-
Type deduction for templates and function expressions
You can now omit the parameter type annotation when using templates and function expressions. In the case of function expressions the return type can also be omitted. Examples:
old syntaxvar fun_expr: (Int) -> (Int) =fun (x: Int) -> (Int) {return x + 1}new syntaxvar fun_expr: (Int) -> (Int) =fun (x) {return x + 1}old syntaximport { VStack, Text } from uicomponent MyList {@property item: Template(String)VStack {for i in Range(3) {self.item("\{i}")}}}export var main: Component = MyList(item: template (text: String) {Text(text)})new syntaximport { VStack, Text } from uicomponent MyList {@property item: Template(String)VStack {for i in Range(3) {self.item("\{i}")}}}export var main: Component = MyList(item: template (text) {Text(text)})
UI Package
- Text modifiers: Affect the default style of text:
Kontakt Controls Package
- XYPad component to display the values of the active cursor of a KSP
ui_xy - Stepper component to display the value of a KSP
ui_value_edit
Breaking Changes
Komplete UI Setup In Kontakt
The load_komplete_ui() KSP command was removed. To load the main Komplete UI Package you can now select the module file in the Instrument Options dialog. Find a step-by-step guide in Configure Komplete UI
Language
-
countparameter of subsequence was renamed to length -
Array.filterwas renamed to filteredold syntaxvar arr = [1, 2, 3]var res = arr.filter(fun (value: Int) -> (Bool) {return value > 2})new syntaxvar arr = [1, 2, 3]var res = arr.filtered(by: fun (value: Int) -> (Bool) {return value > 2}) -
index no longer returns 0 when searching for an empty string
-
String.replace_allrenamed to replacing_all -
String.removingwas removedYou can achieve the same by using removing_subrange and index:
var example = "some words that I know"var remove = "that "var result = example.removing_subrange(from: example.index(of: remove)!,length: remove.length) -
String methods providing an offset didn't accept from to be after the last character
This includes substring, index and removing_subrange.
-
Exported types can not refer to un-exported types anymore
old syntaxexport var main = Main()new syntaxexport var main: Component = Main() -
if-else expression syntax updated to ternary conditional expression
The syntax for using an if-else conditional expression to produce a value was updated to
a ? b : c. Here is an example:old syntaxvar x = if 0 < 1 {"Hello"} else {"World"}new syntaxvar x = 0 < 1 ? "Hello" : "World"Note that this applies to any place that accepts an expression. Here is an example of a conditional expression used within a component:
import { Hover, Text } from uicomponent HoverText {hovered: Bool = falseText( self.hovered ? "Hovered" : "Not Hovered" ) with {Hover(self.$hovered)}}The naming is now aligned with the Float.clamped method.
UI Package
-
Ring renamed to Arc
-
Text component font size changed to Int
This was a bug and we never supported rendering in between pixel values. Migrate your code to use integers only for font sizes.
-
FontFamilyrenamed to FontFamilyNameSimply replace all occurences of
FontFamilywithFontFamilyName. This was done so we can use the name for the newFontFamilymodifier (see below). -
TapGesture
cancelanduptrigger changesCancel is only triggered when another gesture takes over. This means it is no longer triggered when the pointer left the component, or when the pointer moved too far from the "down" location.
Up is triggered even if the gesture completes outside of the component, unless cancel was triggered before.
Math Package
-
degrees_to_radiansandradians_to_degreesremoved in favor of the new Angle class. -
clampandclampfmethods removed in favor of Int.clamped and Float.clamped
Kontakt Controls Package
TogglePolicywas renamed to TriggerPolicy
Fixed
Language
-
Parameter names sometimes not included in error messages
-
Bitwise operations inside a string interpolation caused a runtime error
-
Float.to_intdidn't raise an error on over-/underflow -
String.substring(from:length)didn't validate from for empty strings -
String.index(of)raised an error when used on an empty string -
String literals allowed trailing line breaks
String literals cannot contain unescaped line breaks. The trailing line breaks where also not part of the actual string value.
-
String.splitcouldn't handle a trailing separator -
String.splitwould hang when separator was an empty string -
For loop body inside property getter interpreted as declarative block
-
Escaped newline in string causes runtime error
-
Constructor delegation argument with optional ternary doesn't type check
-
Parsing error when the unwrap (!) operator is followed by an equality (==) operator, e.g.
x! == 5 -
Assigning a lambda to a variable of optional function type erroneously produced a type error
var f: () -> ()? = fun () {} // typecheck error occured -
Templates have now a proper string interpolation
var t = template () {}var s = "\{t}" // == "template(x)", where x is some memory addressAlso templates are now properly "printed" when they are part of another aggregate, like a class.
-
Referencing variables which start with nil, true or false
var nil_index: Int? = nilvar x = nil_index // invalid parser error was generated here -
Fixed several string methods not treating different unicode normalization forms the same way
The same unicode character using different normalization forms should be treated as the same. Example: The letter Å can exist in composed form, i.e.
"\u{00c5}", or in decomposed form, i.e."\u{0041}\u{030A}"(A◌̊).Methods affected by this fix:
String.index,String.has_prefix,String.has_suffix,String.removing_allandString.replacing_all.
UI Package
- Padding didn't validate it's properties
- Text didn't validate its line_limit and font_weight properties
- Opacity didn't validate it's properties
- Frame didn't validate it's properties
- Text gets truncated instead of wrapped on Windows in some cases
- TapGesture accepts right mouse button when left is pressed
- Calling load_font with empty list causes an error
- ZStack layout didn't take into account the priority of its children
Kontakt Controls Package
- Slider dragging doesn't match mouse movement 1:1
Kontakt 8.1 (Komplete UI Beta)
New Features
Kontakt Package
- KSPTextEdit to connect to a
ui_text_editin KSP - KSPLabel to connect to a
ui_labelin KSP
Kontakt 8 (Komplete UI Beta)
Introduction of Komplete UI public beta. Creating a resource container will now create a new folder called komplete_scripts.
A Komplete Script file has the file extension .kscript and can be loaded from KSP with load_komplete_ui("module_name").
Have a look at Get Started for more details.