Control Parameters
General
|
---|
Nothing will be applied to the widget. |
|
---|
Sets or returns a custom value bound to a specific UI widget. This allows custom tagging of UI widgets, for instance to bind them to a specific parameter in the script. |
|
---|
Returns the type of the UI widget. Only works with Possible return values are:
|
Size, Position, and Look
|
---|
Sets or returns the horizontal position in pixels. |
|
---|
Sets or returns the vertical position in pixels. |
|
---|
Sets or returns the horizontal position in grid units. |
|
---|
Sets or returns the vertical position in grid units. |
|
---|
Sets or returns the width of the control in pixels. |
|
---|
Sets or returns the height of the control in pixels. |
|
---|
Sets or returns the width of the control in grid units. |
|
---|
Sets or returns the height of the control in grid units. |
|
---|
Sets or returns the hide status. Can be used with the following built-in constants:
|
|
---|
Sets or returns the picture name. Full path and extension are not required. If the instrument references a resource container (in this case, KONTAKT will look for the specified filename in the |
|
---|
Sets or returns the picture state of the control for |
|
---|
Assigns a widget to a particular |
|
---|
Sets or returns the Z layer position of the widget. Widgets can be placed in one of three layers. Within these layers they are then positioned by widget type, and then by declaration order. 0: Default layer. All widgets are assigned to this layer by default. -1: Background layer. Widgets in this layer are placed below the default layer. 1: Foreground layer. Widgets in this layer are placed on top of the default and background layers. Z layer order by widget type (from top to bottom):
|
Values
|
---|
Sets or returns the value of the widget. Note that doing this does NOT execute the UI callback of the widget! |
|
---|
Sets or returns the default value of the widget. A widget is set to the default value when clicking it with [Ctrl] (Windows) or [Cmd] (macOS) key held. This is only applicable to |
Text
|
---|
Sets or returns the widget text, similar to |
|
---|
Adds a text line to multiline labels, similar to |
|
---|
Returns the name of the UI widget as declared in the script, without the type specifier ($, %, @, ?). Only works with |
|
---|
Sets or returns the help text, which is displayed in KONTAKT's Info pane when hovering above the widget. |
|
---|
Sets or returns the widget label, similar to This is also the string published to the host when using host automation. |
|
---|
Sets or returns the short name of the widget. |
|
---|
Sets or returns the knob unit, similar to |
|
---|
Sets or returns the font type. Numbers 0 ... 25 are used to select any of the 26 factory fonts, as shown below. Combine with ![]() For responsive widgets (
Not using any of the five additional state fonts will result in the default ( |
|
---|
Deactivates text position shifting when clicking on |
|
---|
Shifts the vertical position in pixels of text in |
|
---|
The text alignment in 0: Left 1: Centered 2: Right |
|
---|
Shifts the vertical position in pixels of the parameter value in |
Automation
|
---|
Sets or returns if a UI widget can be automated (1) or not (0). By default, automation is allowed for all automatable widgets ( This control parameter can only be used in the When allowing automation for |
|
---|
Sets or returns an automation name to a UI widget when used with
When assigning automation names to |
|
---|
Sets or returns an automation ID to a UI widget, in range 0 ... 2047. Can only be used in the init callback. Automation IDs can only be assigned to automatable widgets ( When assigning automation IDs to |
Key Modifiers
|
---|
Returns 1 when the shift key was pressed (0 otherwise) while clicking the UI widget.
The basic [Shift] modifier functionality on |
|
---|
Returns 1 if the [Alt] (Windows) or [Opt] (macOS) key was pressed (0 otherwise) while clicking the UI widget.
|
|
---|
Returns 1 if the [Ctrl] (Windows) or [Cmd] (macOS) key was pressed (0 otherwise) while clicking the UI widget.
The basic [Ctrl]/[Cmd] modifier functionality on |
Specific
Tables
|
---|
Returns the index of the |
Tables and Waveforms
|
---|
Sets or returns the color of the step bar in Colors are set using a hex value in the following format:
The 0 at the start is just to let KONTAKT know the value is a number. The h or H at the end is to indicate that it is a hexadecimal value. |
|
---|
Sets or returns the color of the middle line in |
Menus
|
---|
Returns the number of menu entries in a specific Only works with |
|
---|
Returns the index of the currently selected menu entry. Only works with |
Mouse Area
|
---|
Enables These can be set to one of the following values:
|
| |
---|---|
Configures whether The UI callback has two built-in variables: | |
| Specifies the event type that triggered the callback and can have one of the following values:
|
| 1: The mouse has entered 0: The mouse has left |
Exampleon ui_control ($aMouseArea) if ($NI_MOUSE_EVENT_TYPE = $NI_MOUSE_EVENT_TYPE_DROP) message(num_elements(!NI_DND_ITEMS_AUDIO)) end if if ($NI_MOUSE_EVENT_TYPE = $NI_MOUSE_EVENT_TYPE_DRAG) message(num_elements(!NI_DND_ITEMS_AUDIO)) message($MOUSE_OVER_CONTROL) end if end on |
Labels
|
---|
Sets or returns the drag and drop behavior for |
|
---|
Assigns one of 512 available MIDI object export areas to be drag and drop exported via a particular |
Value Edit
|
---|
Hides the arrows of 0: Arrows are hidden 1: Arrows are shown |
Level Meters
|
---|
Sets or returns the background color of |
|
---|
Sets the second background color of |
|
---|
Sets the main level meter color of |
|
---|
Sets the color of |
|
---|
Sets the color of the little bar showing the current peak level. |
|
---|
Aligns |
|
---|
Sets the minimum and maximum display range of If the minimum values is smaller than the maximum value, the display is inverted. |
File Selector
|
---|
Sets or returns the basepath of Be careful with the number of subfolders in the basepath, as it might take too long to scan the filesystem. |
|
---|
Sets or returns the width of |
|
---|
Sets or returns the actual path (full path of the file) currently selected in |
|
---|
Sets or returns the file type for The following file types are available:
|
Instrument Icon and Wallpaper
|
---|
The ID of the instrument icon. It's possible to hide the instrument icon:
It's also possible to load a different picture file for the instrument icon:
|
|
---|
The ID of the instrument wallpaper. It is used in a similar way as
This command can only be used in This command only supports wallpapers that are located within the resource container. If you use it in different script slots, then the last script slot in which wallpaper was set will be the one that is loaded. |
Waveform
Waveform Flag Constants | |
---|---|
To be used with | |
| Display the zone’s slice markers. |
| Display a per-slice table. Note: this only works if the slice markers are also active. |
| Make the table bipolar. |
| Display a MIDI drag and drop icon. Note: this only works if the slice markers are also active. |
Waveform Property Constants | |
---|---|
To be used with | |
| Sets or returns the play cursor position, in microseconds. |
| Used to set new flag constants after the |
| Sets or returns the value of the indexed slice’s table. |
| Highlights the indexed slice within the |
| Defines the start note for the MIDI drag and drop function. |
|
---|
Changes the way the waveform is drawn. Valid values:
|
|
---|
Sets or returns the background color of |
|
---|
Sets or returns the color of the waveform drawn in |
|
---|
Sets or returns the alpha channel (opacity) of the waveform drawn in Range: 0 (fully transparent) to 255 (fully opaque). |
|
---|
Sets or returns the color of the playback cursor in |
|
---|
Sets or returns the color of the slice markers in |
|
---|
Sets or returns the alpha channel (opacity) of the background of Range: 0 (fully transparent) to 255 (fully opaque). |
Wavetable
|
---|
Attaches a zone to |
|
---|
Sets or returns the mode of
|
|
---|
Sets or returns the X-axis parallax of Range: -1000000 ... 1000000 |
|
---|
Sets or returns the Y-axis parallax of Range: -1000000 ... 1000000 |
|
---|
Sets or returns the color of the whole wavetable. |
|
---|
Sets or returns the alpha channel (opacity) of the whole wavetable. Range: 0 (fully transparent) to 255 (fully opaque). |
|
---|
Sets or returns the background color of |
|
---|
Sets or returns the alpha channel (opacity) of Range: 0 (fully transparent) to 255 (fully opaque). |
Additional Color and Alpha Parameters | |
---|---|
To be paired with the above control parameters in order to create gradient effects. If not explicitly set, they inherit the value of their match from above, resulting in no gradient. | |
| Sets or returns the color for the end of the gradient applied to the waveform. |
| Sets or returns the alpha channel (opacity) for the end of the gradient applied to the waveform. |
| Sets or returns the color for the end of the gradient applied to the wavetable. |
| Sets or returns the alpha channel (opacity) for the end of the gradient applied to the wavetable. |
Slider
|
---|
A value from -5000 to 5000, setting the move direction of Settings are relative to the size of the slider picture. Negative values give a vertical slider behavior, positive values give a horizontal behavior. |
XY Pad
|
---|
Mouse behavior, i.e. the drag scale, of the X axis of all |
|
---|
Mouse behavior, i.e. the drag scale, of the Y axis of all |
|
---|
Sets the way 0: Clicks anywhere other than on a cursor are ignored. Clicking on a cursor and dragging, sets new values respecting the usual 1: Clicks anywhere on the XY pad are registered but don't change the values. Clicking anywhere and dragging, sets new values; the cursor moves parallel to the mouse cursor with distances scaled based on the 2: Clicks anywhere on the XY pad are registered and immediately change the values, with the cursor immediately matching the mouse cursor. Clicking anywhere and dragging has a similar effect; the |
|
---|
Sets and gets the index of the active 0 and 1: The active cursor can only be changed manually by setting this control parameter. Inactive cursors don't receive any clicks. 2: Active cursor is set automatically based on the last clicked cursor. Setting it manually within The index can only be an even number (with the exception of the -1 value) that matches the index of the X axis of the cursor in the main array representing the XY control, e.g. the first cursor has an index of 0, the second one has an index of 2, etc. |
|
---|
Sets the cursor image. Each cursor can have its own image set using the Using The cursor images can have up to 6 frames, corresponding to the following states. Frame selection is automatic, exactly like with 1: Inactive 2: Active 3: Inactive pressed 4: Active pressed 5: Inactive mouse over 6: Active mouse over |
|
---|
When used with if ($hide = 1) set_control_par_arr($id, $CONTROL_PAR_HIDE, $HIDE_PART_CURSOR, $index) else set_control_par_arr($id, $CONTROL_PAR_HIDE, $HIDE_PART_NOTHING, $index) end if The index should be an even number that matches the index of the X axis of the cursor in the main array representing the XY control, so the first cursor has an index of 0, the second has an index of 2, and so on. |
|
---|
Returns the index of the cursor that triggered the |
|
---|
Returns the type of mouse event that triggered the The following mouse event types are available:
|