/ HALion Developer Resource / HALion Script / Class Reference / Element /
Effect
The Effect class inherits all properties and methods of the Element class.
On this page:
Effect Class, Effect Constructor
List of inherited members:
Element
Element Class, findChildren, getChild, getParameter, getParameterDefinition, getParameterNormalized, hasParameter, removeFromParent, setName, setParameter, setParameterNormalized
Classes
Effect Class
Description
The Element object of an effect can be obtained with findEffects or getEffect. It has the following fields.
Available in: Controller, Processor.
Fields
Field | Description | Value Type |
---|---|---|
.moduleType | Returns the effect type. | string |
.bypassMask | Determines if an effect follows the global inserts and Aux bypass buttons. See Bypass Masks for details. | number |
Example
effects = this.program:findEffects(true)
for i , effect in ipairs(effects) do
print(effect.moduleType)
end
Constructors
Effect Constructor
Effect(type)
(Since HALion 6.4.0)
Description
Constructor to create a new Effect object of the specified type.
Available in: Controller.
Arguments
Argument | Description | Value Type |
---|---|---|
type | The type of effect. | string |
Return Values
Returns a new Effect object of the specified type.
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()