Skip to main content

Multi

General Information

Multi Structure

The multi is the topmost hierarchy level in Kontakt. It consists of 64 instrument slots. An instrument slot can contain a single insturment, or a single instrument bank, itself consisting of up to 128 instruments . In Kontakt Lua API, this is represented with instrument index, which assumes 128 indices per instrument slot. For example, in order to reference an instrument loaded in third instrument slot, one needs to multiply the 0-based instrument index with 128, which would in this case turns out to be 256.

There is also a command which retrieves all instrument indices in a table. See get_instrument_indices.

Constants

max_num_multi_scripts

max_num_multi_scripts: integer

As of Kontakt 7.5, this constant returns 5.

Get Property

get_multi_name

get_multi_name() -> string

Returns the name of the multi.

get_multi_script_name

get_multi_script_name(multi_script_idx: integer) -> string

Returns the title of the multi script in the specified multi script slot.

get_multi_script_source

get_multi_script_source(multi_script_idx: integer) -> string

Returns the complete multi script contained in the specified multi script slot.

get_num_instruments

get_num_instruments() -> integer

Returns the number of instruments loaded in the multi.

is_multi_script_bypassed

is_multi_script_bypassed(multi_script_idx: integer) -> bool

Returns true if the specified multi script slot is bypassed.

is_multi_script_protected

is_multi_script_protected(multi_script_idx: integer) -> bool

Returns true if the specified multi script slot is protected with a password.

Set Property

set_multi_name

set_multi_name(name: string)

Sets the name of the multi.

set_multi_script_bypassed

set_multi_script_bypassed(script_idx: integer, bypass: bool)

Bypasses the specified script.

set_multi_script_name

set_multi_script_name(script_idx: integer, name: string)

Sets the name of the script.This will be displayed in the script slot header or the script tab if visible in performance view.

set_multi_script_source

set_multi_script_source(script_idx: integer, source: string)

Sets the multi script source by passing an absolute filepath as argument.

Modifiers

reset_multi

reset_multi()

Resets the whole multi to the default state.

File I/O

save_multi

save_multi(filename: string, options: table)

Save options can be defined by passing a table with one or more of the following entries:

  • mode: save_modes (default: patch)

  • absolute_paths: boolean (default: false)

  • compress_samples: boolean (default: false)

  • samples_sub_dir: string

Individual entries of this table can be omitted. In that case the default value is used.

load_multi

load_multi(filename: string)

Loads the specified multi. The whole instrument rack is reset beforehand.