/ HALion Developer Resource / HALion Script / Reference /

VoiceGroupsData Table

(Since HALion 6.4.10)

Description

Voice Groups are managed via a predefined table: the VoiceGroupsData table. This table can be obtained by making a call to getParameter with "VoiceManager.VoiceGroupsData" as parameter. The voice groups are referenced by their index. Each voice group has the fields .maxPolyphony, .exclusiveGroup and .stealMode. You can change the correspondig values, but the structure of this table must remain unaltered. The values are set by making a call to setParameter. See the example below for more details.

Available in: Controller.

Fields

FieldDescriptionValue Type
.maxPolyphonyThe maximum polyphony of the voice group. The value range is from 1 to 128.number
.exclusiveGroupThe exclusive group of the voice group. The value range is from 0 to 32. Set this to 0 to switch the exclusive group off.number
.stealModeThe steal mode of the voice group. See Voice Group Steal Modes for details.number

Example

-- Activate the voice groups for the parent layer.

layer = this.parent
layer:setParameter("VoiceManager.Voice Management", 1) -- Set Voice Manager to "On".
layer:setParameter("VoiceManager.VoiceGroups", true) -- Activate the Voice Groups.

voiceGroups = layer:getParameter("VoiceManager.VoiceGroupsData")

for i = 1, 128 do
    voiceGroups[i].maxPolyphony = 4
    voiceGroups[i].exclusiveGroup = 0 -- Set exclusive group to "Off".
    voiceGroups[i].stealMode = StealMode.lastNotePriority
end

layer:setParameter("VoiceManager.VoiceGroupsData", voiceGroups)

See also: Voice Group Steal Modes