Skip to content

Kontakt

Kontakt

Import

import "_IVLS/std-library/nodes/components/kontakt.ksp"

Node: Stl.Kontakt

Uses: Init

Overview

Kontakt

Shorthand macros, engine-parameter properties, and modulation parameter registration for the Kontakt scripting environment.

Provides PAR, GPAR, and MPAR macro families for reading and writing engine parameters at different routing levels (instrument, group, insert, send, main, bus). Defines shorthand ENGINE_PAR_ prefix aliases (EP), instrument-level limit constants, and the Stl.Kontakt node which declares the Filter_Type, Filter_KT, LFO_Type, and WT_Form enumerations, registers all standard modulation parameters as scoped properties, and exposes utility functions for modulator lookup and flex-segment length calculation.

API

Nodes

Name Description
node Stl.Kontakt Declares the Filter_Type, Filter_KT, LFO_Type, and WT_Form enumerations, the fil...

Defines

Name Description
define EP(#par#) Expands to the full ENGINE_PAR_#par# constant.
define GPAR.DISP(#par#, #group#, #slot#) Returns the display string of a group-level engine parameter.
define GPAR.DISP_EXT(#par#, #group#, #slot#, #value#) Returns the display string of a group-level engine parameter computed against an...
define GPAR.GET(#par#, #group#, #slot#) Returns the integer value of a group-level engine parameter.
define GPAR.SET(#par#, #group#, #slot#, #value#) Sets a group-level engine parameter at the specified group and slot.
define KONTAKT.MAX_ARRAY_SIZE Maximum number of array elements supported by Kontakt's array system.
define KONTAKT.MAX_GROUPS Maximum number of groups addressable within a Kontakt instrument.
define KONTAKT.MAX_ZONES Maximum number of zones addressable within a Kontakt instrument.
define MPAR.DISP(#par#) Returns the display string of a main instrument-level engine parameter.
define MPAR.DISP_EXT(#par#, #value#) Returns the display string of a main instrument-level engine parameter computed ...
define MPAR.GET(#par#) Returns the integer value of a main instrument-level engine parameter.
define MPAR.SET(#par#, #value#) Sets a main instrument-level engine parameter (group, slot, and chain all -1).
define PAR.DISP(#par#, #chain#, #slot#) Returns the display string of an engine parameter at the specified chain and slo...
define PAR.DISP_EXT(#par#, #chain#, #slot#, #value#) Returns the display string of an engine parameter computed against an external v...
define PAR.GET(#par#, #chain#, #slot#) Returns the integer value of an engine parameter at the specified chain and slot...
define PAR.SET(#par#, #chain#, #slot#, #value#) Sets an engine parameter at the specified chain and slot, targeting the instrume...

Const Blocks

Name Description
const Filter_KT Enumeration grouping filter types into circuit-topology categories for kit-level...
const Filter_Type Enumeration of all filter types available in Kontakt (Mogue, Obie, Clean, Daft, ...
const LFO_Type Enumeration of LFO waveform types available in Kontakt (Sine, Triangle, Sawtooth...
const WT_Form Enumeration of wavetable segment shape forms used by Kontakt's wavetable oscilla...

Properties

Name Description
property bus.slot.par Gets or sets an engine parameter in a numbered bus at a specified slot.
property bus.slot.par.disp Gets the display string of an engine parameter in a numbered bus at a specified ...
property group.mods.#prop# Gets or sets a modulator parameter on a group modulator.
property group.mods.#prop#.disp Gets the display string of a modulator parameter on a group modulator.
property group.mods.target.#prop# Gets or sets a modulation target parameter on a group modulator.
property group.mods.target.#prop#.disp Gets the display string of a modulation target parameter on a group modulator.
property group.par Gets or sets a group-level engine parameter (slot and chain fixed to -1).
property group.par.disp Gets the display string of a group-level engine parameter (slot and chain fixed ...
property group.slot.generic.par Gets or sets any engine parameter at a fully specified group, slot, and generic ...
property group.slot.generic.par.disp Gets the display string of any engine parameter at a fully specified group, slot...
property group.slot.par Gets or sets an engine parameter at a specified group and slot (chain fixed to -...
property group.slot.par.disp Gets the display string of an engine parameter at a specified group and slot (ch...
property insert.slot.par Gets or sets an engine parameter in the instrument insert bus at a specified slo...
property insert.slot.par.disp Gets the display string of an engine parameter in the instrument insert bus at a...
property main.slot.par Gets or sets an engine parameter in the main bus at a specified slot.
property main.slot.par.disp Gets the display string of an engine parameter in the main bus at a specified sl...
property master.par Gets or sets a main instrument-level engine parameter (group, slot, and chain al...
property master.par.disp Gets the display string of a main instrument-level engine parameter (group, slot...
property send.slot.par Gets or sets an engine parameter in the send bus at a specified slot.
property send.slot.par.disp Gets the display string of an engine parameter in the send bus at a specified sl...

Macros

Name Description
kontakt.PopulateFilterTypeMenu(#menu#) Populates a UI menu with all Kontakt filter type names and their corresponding i...

Functions

Name Description
Kontakt.find_mod(group, mods) -> return Returns the internal modulator index for a modulator within a group.
Kontakt.find_target(group, mods, target) -> return Returns the internal target index for a modulation target within a group and mod...
Kontakt.get_flex_segment_length(mod_intensity) -> return Returns the flex segment length percentage for a given modulator intensity.

Nodes

node Stl.Kontakt

Callbacks: Init

Declares the Filter_Type, Filter_KT, LFO_Type, and WT_Form enumerations, the filter-kit selection and flex-segment lookup arrays, the pitch-bend amount table, FX chain index constants, and all standard modulation parameters as typed properties scoped to group and modulator indices.

Side effects:

Name Type Purpose
FX.GROUP_CHAIN integer Chain index constant for the group insert chain (-1)
FX.MASTER_CHAIN integer Chain index constant for the master chain (-1)
FX.BUS_CHAIN integer Chain index constant for the bus chain (NI_BUS_OFFSET)
FX.INSERT_CHAIN integer Chain index constant for the insert chain (NI_INSERT_BUS)
FX.SEND_CHAIN integer Chain index constant for the send chain (NI_SEND_BUS)
FX.MAIN_CHAIN integer Chain index constant for the main chain (NI_MAIN_BUS)
kontakt.Filter_Type array Enumeration mapping filter type names to ENGINE_PAR constants
kontakt.Filter_KT array Enumeration grouping filter types into kit categories
kontakt.LFO_Type array Enumeration mapping LFO type names to LFO_TYPE_ constants
kontakt.WT_Form array Enumeration mapping wavetable form names to NI_WT_FORM_ constants
kontakt.filter_kt_sel array Per-filter-type kit category lookup table
kontakt.flex_segment_length array Flex segment length percentages scaled by 10000, indexed by modulator intensity steps of 50000
kontakt.pb_amt array Pitch-bend amount lookup table mapping bend semitone counts to scaled values

Defines

define EP(#par#)

Expands to the full ENGINE_PAR_#par# constant.

Parameter Description
#par# ENGINE_PAR suffix to expand

define GPAR.DISP(#par#, #group#, #slot#)

Returns the display string of a group-level engine parameter.

Parameter Description
#par# ENGINE_PAR suffix, expanded to ENGINE_PAR_#par#
#group# group index
#slot# slot index within the group chain

define GPAR.DISP_EXT(#par#, #group#, #slot#, #value#)

Returns the display string of a group-level engine parameter computed against an external value.

Parameter Description
#par# ENGINE_PAR suffix, expanded to ENGINE_PAR_#par#
#group# group index
#slot# slot index within the group chain
#value# value to compute the display string for

define GPAR.GET(#par#, #group#, #slot#)

Returns the integer value of a group-level engine parameter.

Parameter Description
#par# ENGINE_PAR suffix, expanded to ENGINE_PAR_#par#
#group# group index
#slot# slot index within the group chain

define GPAR.SET(#par#, #group#, #slot#, #value#)

Sets a group-level engine parameter at the specified group and slot.

Parameter Description
#par# ENGINE_PAR suffix, expanded to ENGINE_PAR_#par#
#group# group index
#slot# slot index within the group chain
#value# integer value to assign

define KONTAKT.MAX_ARRAY_SIZE

Maximum number of array elements supported by Kontakt's array system.


define KONTAKT.MAX_GROUPS

Maximum number of groups addressable within a Kontakt instrument.


define KONTAKT.MAX_ZONES

Maximum number of zones addressable within a Kontakt instrument.


define MPAR.DISP(#par#)

Returns the display string of a main instrument-level engine parameter.

Parameter Description
#par# ENGINE_PAR suffix, expanded to ENGINE_PAR_#par#

define MPAR.DISP_EXT(#par#, #value#)

Returns the display string of a main instrument-level engine parameter computed against an external value.

Parameter Description
#par# ENGINE_PAR suffix, expanded to ENGINE_PAR_#par#
#value# value to compute the display string for

define MPAR.GET(#par#)

Returns the integer value of a main instrument-level engine parameter.

Parameter Description
#par# ENGINE_PAR suffix, expanded to ENGINE_PAR_#par#

define MPAR.SET(#par#, #value#)

Sets a main instrument-level engine parameter (group, slot, and chain all -1).

Parameter Description
#par# ENGINE_PAR suffix, expanded to ENGINE_PAR_#par#
#value# integer value to assign

define PAR.DISP(#par#, #chain#, #slot#)

Returns the display string of an engine parameter at the specified chain and slot, targeting the instrument level (group index -1).

Parameter Description
#par# ENGINE_PAR suffix, expanded to ENGINE_PAR_#par#
#chain# chain index constant
#slot# slot index within the chain

define PAR.DISP_EXT(#par#, #chain#, #slot#, #value#)

Returns the display string of an engine parameter computed against an external value rather than the stored parameter value, at the instrument level.

Parameter Description
#par# ENGINE_PAR suffix, expanded to ENGINE_PAR_#par#
#chain# chain index constant
#slot# slot index within the chain
#value# value to compute the display string for

define PAR.GET(#par#, #chain#, #slot#)

Returns the integer value of an engine parameter at the specified chain and slot, targeting the instrument level (group index -1).

Parameter Description
#par# ENGINE_PAR suffix, expanded to ENGINE_PAR_#par#
#chain# chain index constant
#slot# slot index within the chain

define PAR.SET(#par#, #chain#, #slot#, #value#)

Sets an engine parameter at the specified chain and slot, targeting the instrument level (group index -1).

Parameter Description
#par# ENGINE_PAR suffix, expanded to ENGINE_PAR_#par#
#chain# chain index constant (e.g. NI_INSERT_BUS)
#slot# slot index within the chain
#value# integer value to assign to the parameter

Const Blocks

const Filter_KT

Enumeration grouping filter types into circuit-topology categories for kit-level switching.


const Filter_Type

Enumeration of all filter types available in Kontakt (Mogue, Obie, Clean, Daft, Pro-53, Phaser, Vowel).


const LFO_Type

Enumeration of LFO waveform types available in Kontakt (Sine, Triangle, Sawtooth, Pulse, Random, Custom).


const WT_Form

Enumeration of wavetable segment shape forms used by Kontakt's wavetable oscillator.


Properties

property bus.slot.par

Gets or sets an engine parameter in a numbered bus at a specified slot.

  • get(bus, slot, par) -> result
  • set(bus, slot, par, value)

property bus.slot.par.disp

Gets the display string of an engine parameter in a numbered bus at a specified slot.

  • get(bus, slot, par) -> result

property group.mods.#prop#

Gets or sets a modulator parameter on a group modulator.


property group.mods.#prop#.disp

Gets the display string of a modulator parameter on a group modulator.


property group.mods.target.#prop#

Gets or sets a modulation target parameter on a group modulator.


property group.mods.target.#prop#.disp

Gets the display string of a modulation target parameter on a group modulator.


property group.par

Gets or sets a group-level engine parameter (slot and chain fixed to -1).

  • get(group, par) -> result
  • set(group, par, value)

property group.par.disp

Gets the display string of a group-level engine parameter (slot and chain fixed to -1).

  • get(group, par) -> result

property group.slot.generic.par

Gets or sets any engine parameter at a fully specified group, slot, and generic (chain) index.

  • get(group, slot, generic, par) -> result
  • set(group, slot, generic, par, value)

property group.slot.generic.par.disp

Gets the display string of any engine parameter at a fully specified group, slot, and generic (chain) index.

  • get(group, slot, generic, par) -> result

property group.slot.par

Gets or sets an engine parameter at a specified group and slot (chain fixed to -1).

  • get(group, slot, par) -> result
  • set(group, slot, par, value)

property group.slot.par.disp

Gets the display string of an engine parameter at a specified group and slot (chain fixed to -1).

  • get(group, slot, par) -> result

property insert.slot.par

Gets or sets an engine parameter in the instrument insert bus at a specified slot.

  • get(slot, par) -> result
  • set(slot, par, value)

property insert.slot.par.disp

Gets the display string of an engine parameter in the instrument insert bus at a specified slot.

  • get(slot, par) -> result

property main.slot.par

Gets or sets an engine parameter in the main bus at a specified slot.

  • get(slot, par) -> result
  • set(slot, par, value)

property main.slot.par.disp

Gets the display string of an engine parameter in the main bus at a specified slot.

  • get(slot, par) -> result

property master.par

Gets or sets a main instrument-level engine parameter (group, slot, and chain all -1).

  • get(par) -> result
  • set(par, value)

property master.par.disp

Gets the display string of a main instrument-level engine parameter (group, slot, and chain all -1).

  • get(par) -> result

property send.slot.par

Gets or sets an engine parameter in the send bus at a specified slot.

  • get(slot, par) -> result
  • set(slot, par, value)

property send.slot.par.disp

Gets the display string of an engine parameter in the send bus at a specified slot.

  • get(slot, par) -> result

Macros

kontakt.PopulateFilterTypeMenu(#menu#)

Populates a UI menu with all Kontakt filter type names and their corresponding integer indices.

Parameter Description
#menu# variable name of the ui_menu to populate

Functions

Kontakt.find_mod(group, mods) -> return

Returns the internal modulator index for a modulator within a group.

Parameter Type Description
group integer group index to search within
mods integer modulator identifier

Returns: return — index of the modulator within the group


Kontakt.find_target(group, mods, target) -> return

Returns the internal target index for a modulation target within a group and modulator.

Parameter Type Description
group integer group index
mods integer modulator identifier
target integer modulation target identifier

Returns: return — index of the target within the modulator


Kontakt.get_flex_segment_length(mod_intensity) -> return

Returns the flex segment length percentage for a given modulator intensity.

Parameter Type Description
mod_intensity integer ENGINE_PAR value of the modulator intensity

Returns: return — segment length percentage scaled by 10000 (100% = 1000000)


Example

// TODO: Add usage example

See Also