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
21
share/scripts/_add_gx_tuner.lua
Normal file
21
share/scripts/_add_gx_tuner.lua
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue