Group
Constants
group_playback_modes
group_playback_modes: table
“beat_machine”
“dfd”
“mpc60_machine”
“s1200_machine”
“sampler”
“time_machine_1”
“time_machine_2”
“time_machine_pro”
“tone_machine”
“wavetable”
group_start_conditions
group_start_conditions: table
“controller”
“key”
“random”
“round_robin”
“slice_trigger”
group_start_operators
group_start_operators: table
“and”
“and_not”
“or”
max_num_group_start_criteria
max_num_group_start_criteria: integer
As of Kontakt 7.5, this constant returns 4.
max_num_groups
max_num_groups: integer
As of Kontakt 7.5, this constant returns 4096.
voice_group_modes
voice_group_modes: table
“any”
“highest”
“lowest”
“newest”
“oldest”
Get Property
get_group_name
get_group_name(instrument_idx: integer, group_idx: integer) -> string
Returns the name of the specified group.
get_group_pan
get_group_pan(instrument_idx: integer, group_idx: integer) -> float
Returns the amplifier panorama of the specified group.
get_group_playback_mode
get_group_playback_mode(instrument_idx: integer, group_idx: integer) -> string
Returns the playback mode of the specified group’s Source module. See group_playback_modes.
get_group_start_options
get_group_start_options(instrument_idx: integer, group_idx: integer) -> table
Returns specified group’s start options as a table with a maximum of 4 sub-tables:
A certain group start option condition can be defined by passing a table. This table has different entries based on condition type:
Start On Key
mode
: “key”key_min
: integer (default: 24)key_max
: integer (default: 24)next
: group_start_operators (default: “and”)
Start On Controller
mode
: “controller”controller
: (default: 1)cc_min
: (default: 0)cc_max
: (default: 64)next
: group_start_operators (default: “and”)
Cycle Round Robin
mode
: “round_robin”position
: integer (default: 1)next
: group_start_operators (default: “and”)
Cycle Random
mode
: “random”next
: group_start_operators (default: “and”)
Slice Trigger
mode
: “slice_trigger”zone
: integer (default: nil)slice
: integer (default: nil)internal
: boolean (default: false)next
: group_start_operators (default: “and”)
Individual entries of this table can be omitted. In that case the default value is used. See also: group_start_conditions
get_group_tune
get_group_tune(instrument_idx: integer, group_idx: integer) -> float
Returns the tuning of the specified group in semitones.
get_group_volume
get_group_volume(instrument_idx: integer, group_idx: integer) -> float
Returns the amplifier volume of the specified group in dB.
get_num_groups
get_num_groups(instrument_idx: integer) -> integer
Returns the total number of groups in the specified instrument.
get_voice_group
get_voice_group(instrument_idx: integer, group_idx: integer) -> integer?
Returns the voice group assigned to a group. If no voice group is assigned, the returned value is nil.
Set Property
set_group_name
set_group_name(instrument_idx: integer, group_idx: integer, name: string)
Sets the name of the specified group.
set_group_pan
set_group_pan(instrument_idx: integer, group_idx: integer, pan: float)
Sets the amplifier panorama of the specified group. Range is -100.0 … 100.0.
set_group_playback_mode
set_group_playback_mode(instrument_idx: integer, group_idx: integer, mode: string)
Sets the playback mode of the specified group’s Source module. See group_playback_modes.
set_group_start_options
set_group_start_options(instrument_idx: integer, group_idx: integer, options: table)
Start On Key
mode
: “key”key_min
: integer (default: 24)key_max
: integer (default: 24)next
: group_start_operators (default: “and”)
Start On Controller
mode
: “controller”controller
: (default: 1)cc_min
: (default: 0)cc_max
: (default: 64)next
: group_start_operators (default: “and”)
Cycle Round Robin
mode
: “round_robin”position
: integer (default: 1)next
: group_start_operators (default: “and”)
Cycle Random
mode
: “random”next
: group_start_operators (default: “and”)
Slice Trigger
mode
: “slice_trigger”zone
: integer (default: nil)slice
: integer (default: nil)internal
: boolean (default: false)next
: group_start_operators (default: “and”)
Individual entries of this table can be omitted. In that case the default value is used. See also: group_start_conditions
set_group_tune
set_group_tune(instrument_idx: integer, group_idx: integer, tune: float)
Sets the tuning of the specified group in semitones. Range is -36.0 … 36.0.
set_group_volume
set_group_volume(instrument_idx: integer, group_idx: integer, volume: float)
Sets the amplifier volume of the specified group in dB. Range is -math.huge … 12.0.
set_voice_group
set_voice_group(instrument_idx: integer, group_idx: integer, voice_group: integer)
Assign a voice group to a group. In order to reset the assignment pass nil.
Modifiers
add_group
add_group(instrument_idx: integer) -> integer
Returns the index of the new group. Pass this index to functions taking group_idx
as an argument.
remove_group
remove_group(instrument_idx: integer, group_idx: integer) -> bool
Removes the specified group from the specified instrument.
File I/O
load_group
load_group(instrument_idx: integer, group_idx: integer, filename: string, options: table)
Options table currently has a single entry:
replace_zones
: boolean (default: false)
save_group
save_group(instrument_idx: integer, group_idx: integer, 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.