/ HALion Developer Resource / HALion Script / Class Reference / Element / Layer /
Program
The Program class inherits all properties and methods of the Layer class.
On this page:
Program Class, Program Constructor
List of inherited members:
Layer
appendBus, appendLayer, appendLayerAsync, appendMidiModule, appendZone, findBusses, findEffects, findLayers, findMidiModules, findZones, getBus, getLayer, getMidiModule, getZone, insertBus, insertLayer, insertLayerAsync, insertMidiModule, insertZone, removeBus, removeLayer, removeMidiModule, removeZone, addQCAssignment, removeQCAssignment, getNumQCAssignments, getQCAssignmentParamId, getQCAssignmentScope, getQCAssignmentMin, getQCAssignmentMax, getQCAssignmentCurve, getQCAssignmentMode, getQCAssignmentBypass, setQCAssignmentParamId, setQCAssignmentScope, setQCAssignmentMin, setQCAssignmentMax, setQCAssignmentCurve, setQCAssignmentMode, setQCAssignmentBypass
Element
Element Class, findChildren, getChild, getParameter, getParameterDefinition, getParameterNormalized, hasParameter, removeFromParent, setName, setParameter, setParameterNormalized
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
Field | Description | Value Type |
---|---|---|
.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()
(Since HALion 6.4.0)
Description
Constructor to create a new Program object.
Available in: Controller.
Return Values
Returns a new Program object.
Example
-- The following 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()