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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Current »

Classes

Effect Class

Description

The Element object of an effect can be obtained with findEffects or getEffect.

Available in: Controller, Processor.

Fields

.moduleTypeReturns the effect type.string

Example

effects = this.program:findEffects(true)
for i , effect in ipairs(effects) do
    print(effect.moduleType)
end

Jump toTop

Constructors

Effect Constructor


Effect(type)

Description

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

Available in: Controller.

Arguments

typeThe type of effect.string

Return Values

Returns a new Effect object of the specified type.


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 toTop

  • No labels