13
0
livetrax/share/scripts/_add_gx_tuner.lua

22 lines
785 B
Lua
Raw Permalink Normal View History

2022-01-29 08:05:46 -05:00
ardour {
["type"] = "EditorAction",
name = "Add Guitarix Instrument Tuner",
license = "GPL",
author = "Vincent Tassy",
description = [[Adds a tuner on the current track]]
}
function factory () return function ()
local sel = Editor:get_selection ()
if not Editor:get_selection ():empty () and not Editor:get_selection ().tracks:routelist ():empty () then
-- for each selected track
for r in sel.tracks:routelist ():iter () do
if not r:to_track ():isnil () and not r:to_track ():to_audio_track ():isnil () then
local proc = ARDOUR.LuaAPI.new_plugin(Session, "http://guitarix.sourceforge.net/plugins/gxtuner#tuner", ARDOUR.PluginType.LV2, "");
assert (not proc:isnil())
r:add_processor_by_index(proc, 0, nil, true)
end
end
end
end end