Classes
Program Class
Description
The Element object of the program can be obtained with this.program
. It has the following fields.
Available in: Controller, Processor.
Fields
.instance | The Element object of the plug-in instance. | Instance |
---|---|---|
.assignedSlots | An array with the Element objects of the slots to which this program is assigned. | table |
Example
-- print the name of the plug-in instance print(this.program.instance.name) -- print the name of the first slot to which the program is assigned if this.program.assignedSlots[1] then print(this.program.assignedSlots[1].name) end
Constructors
Program Constructor
Program()
Description
Constructor to create a new Program object.
Available in: Controller.
Return Values
Returns a new Program object.
Example
-- This function creates different types of objects in the Program Tree. -- The objects in the Program Tree do not have a name. You will see only their icons. function createProgram() local inst = this.program.instance local prg = Program() local bus = Bus() prg:appendBus(bus) inst:setProgram(prg, 1) local layer = Layer() prg:appendLayer(layer) layer:appendZone(Zone()) local mm = MidiModule('MIDI Player') layer:appendMidiModule(mm) local fx = Effect('Distortion') bus:appendEffect(fx) end createProgram()