Function to remove a MIDI module in a container. For example, Available in: Controller.Description
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.Arguments
moduleOrPosition The 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
See Also: removeBus, removeLayer, removeZone