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 5 Next »

removeMidiModule(moduleOrPosition)

Description

Function to remove a MIDI module in a container. For example, this.parent defines the parent layer of the script module as container. The MIDI module to be removed is specified through its element object or its position. The position is the ordinal number of the MIDI modules in the container.

Available in: Controller.

Arguments

moduleOrPositionThe element object or position of the desired bus.userdata or number

Example

-- remove all MIDI modules from the program except the script module
     
-- find the MIDI modules in the program
modules = this.program:findMidiModules(true)
     
-- and remove them
for i, module in ipairs(modules) do
	if module ~= this then -- exclude script module
    	module.parent:removeMidiModule(module)
	end
end

  • No labels