Page tree
Skip to end of metadata
Go to start of metadata


Voice Groups are managed through a special 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.


.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


-- 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 -- Set the max polyphony to 4.
	voiceGroups[i].exclusiveGroup = 0 -- Set the exclusive group to "Off".
	voiceGroups[i].stealMode = StealMode.lastNotePriority -- Set the steal mode to "Last Note Priority".
layer:setParameter("VoiceManager.VoiceGroupsData", voiceGroups)

1 Comment