/ HALion Developer Resource / HALion Script / Class Reference / Element /

MidiModule

The MidiModule class inherits all properties and methods of the Element class.


On this page:

MidiModule Class, MidiModule Constructor


List of inherited members:

Element

Element Class, findChildren, getChild, getParameter, getParameterDefinition, getParameterNormalized, hasParameter, removeFromParent, setName, setParameter, setParameterNormalized


Classes

MidiModule Class

Description

The Element object of a MIDI module can be obtained with findMidiModules or getMidiModule.

Available in: Controller, Processor.

Fields

FieldDescriptionValue Type
.moduleTypeReturns the MIDI module type.string

Example

print(this.moduleType)

Jump to Top

Constructors

MidiModule Constructor

MidiModule(type)

(Since HALion 6.4.0)

Description

Constructor to create a new MidiModule object of the specified type.

Available in: Controller.

Arguments

ArgumentDescriptionValue Type
typeThe type of MIDI module.string

Return Values

Returns a new MidiModule 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()

Jump to Top