mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Contributing example LUA scripts
This commit is contained in:
parent
97fe05e4de
commit
dab85fd309
9 changed files with 280 additions and 0 deletions
20
share/scripts/add_MIDI_monitor.lua
Normal file
20
share/scripts/add_MIDI_monitor.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
ardour {
|
||||
["type"] = "EditorAction",
|
||||
name = "Add ACE MIDI Monitor",
|
||||
license = "MIT",
|
||||
author = "Vincent Tassy",
|
||||
description = [[Adds an ACE MIDI Monitor on the current track]]
|
||||
}
|
||||
|
||||
function factory () return function ()
|
||||
local sel = Editor:get_selection ()
|
||||
-- for each selected track/bus
|
||||
for r in sel.tracks:routelist ():iter () do
|
||||
if not r:to_track ():isnil () and not r:to_track ():to_midi_track ():isnil () then
|
||||
local proc = ARDOUR.LuaAPI.new_plugin(Session, "ACE MIDI Monitor", ARDOUR.PluginType.Lua, "");
|
||||
assert (not proc:isnil())
|
||||
r:add_processor_by_index(proc, 0, nil, true)
|
||||
proc = nil;
|
||||
end
|
||||
end
|
||||
end end
|
||||
Loading…
Add table
Add a link
Reference in a new issue