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


The alternations in the Alternation List of the Layer Alternate MIDI module are managed through a predefined table: the AlternateData table. This table can be obtained by making a call to getParameter with "AlternateData" as parameter. The alternations are referenced by their index. Each alternate has the fields .keyswitch and .layer. You can change the 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.


.keyswitchKey switches allow you to switch to a particular layerYou set the key switch with the corresponding MIDI note number . Set this to -1 to deactivate the keyswitch.number
.layerThe layer for the alternation is defined by the corresponding Layer object.Layer object


-- Add a Layer Alternate MIDI module.
this.parent:appendMidiModule(MidiModule("Layer Alternate"))
layerAlternate = this.parent:getMidiModule("")
layerAlternate:setName("Layer Alternate")
altdata = layerAlternate:getParameter("AlternateData")
-- Create three layers with a synth zone and add them to the alternation list.
for i = 1, 3 do
	local alternateLayer = this.parent:getLayer(i)
	alternateLayer:setName("Alt "..i)
	local zone = alternateLayer:getZone()
	zone:setName("Zone "..i)
	altdata[#altdata+1] = { keyswitch = -1, layer = alternateLayer }
layerAlternate:setParameter("AlternateData", altdata)

1 Comment