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

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

.instanceThe Element object of the plug-in instance.Instance
.assignedSlotsAn 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

Jump to Top

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()

Jump to Top

  • No labels