Is it possible to load a plugin on the selected track by using a lua script? I tried to do this for some time now with deepseek but it’s not working. Unfortunately i am not a programmer. My goal was to get a bit closer to FX Racks by creating a script that loads, LSP Param EQ, ACE Compressor, LSP Clipper and Draggonfly Room Reverb with just one click. I use this combination a lot and it would save a lot of time for me to have a script for that.
Maybe someone allready has a script, that does similar things? ![]()
I just found this. https://github.com/Ardour/ardour/blob/master/share/scripts/_channelstrip.lua
I am going to look into it and hope i can manage to get to the desired result.
Would a track template accomplish what you need? The Ardour Manual - Track Templates (I guess that doesn’t help with existing tracks.)
Good tip! Thanks! I am using track templates allready. But very often i decide to use this group of plugins later on.
No help needed anymore! Thanks! I do not know how to close this. But i am at a state where i can manage to create the script i need. I will post it here if somebody needs something similar. ![]()
Though you said “case closed”, to me it sounds as if saving mixer strips is what might help:
It is a new feature in 9, if i understand correct.
Same as with tracktemplates: This is helpfull regarding quickly reproducing the same setup used before. What i am looking for is being more flexible and adding the plugins later on in the process. But thanks! ![]()
ardour {
["type"] = "EditorAction",
name = "add_EQ_Comp_Reverb",
license = "MIT",
author = "Ardour Team (modified by erojahn)",
description = [[Adds EQ, Compressor and Reverb]]
}
function factory (params)
return function ()
-- helper functions
function plugin_uri (proc)
return proc:to_plugininsert():plugin(0):get_info().unique_id
end
function add_lv2_plugin (route, pluginname, position)
local p = ARDOUR.LuaAPI.new_plugin (Session, pluginname, ARDOUR.PluginType.LV2, "")
if not p:isnil () then
route:add_processor_by_index (p, position, nil, true)
end
function add_VST3_plugin (route, pluginname, position)
local p = ARDOUR.LuaAPI.new_plugin (Session, pluginname, ARDOUR.PluginType.VST3, "")
if not p:isnil () then
route:add_processor_by_index (p, position, nil, true)
end
end
end
-- Iterate over all selected Track/Bus
-- http://manual.ardour.org/lua-scripting/class_reference/#ArdourUI:TrackSelection
local sel = Editor:get_selection ()
for route in sel.tracks:routelist ():iter () do
local have_eq = false
-- skip master-bus
if route:is_master() then goto next end
-- plugins are inserted at the top (pos = 0).
-- So they have to be added in reverse order:
-- If the compressor is not yet present (comp_pos == 0),
-- first add the EQ, and then the compressor before the EQ.
-- Otherwise add the EQ after the compressor.
if not have_eq then
add_lv2_plugin (route, "/usr/lib/vst3/VST3/lsp-plugins.vst3/Contents/x86_64-linux/lsp-plugins.so", 0)
add_lv2_plugin (route, "urn:dragonfly:room", 0)
add_lv2_plugin (route, "urn:ardour:a-comp#stereo", 0)
add_lv2_plugin (route, "http://lsp-plug.in/plugins/lv2/para_equalizer_x16_stereo", 0)
end
::next::
end
end
end
function icon (params) return function (ctx, width, height, fg)
function rnd (x) return math.floor (x + 0.5) end
local wc = rnd (width * 0.5) - 0.5
local wl = wc - math.floor (width * .25)
local wr = wc + math.floor (width * .25)
local h0 = height * 0.2
local h1 = height * 0.8
local fw = math.floor (width * .1)
local fl = rnd (height * .35) - 1
local fc = rnd (height * .65) - 1
local fr = rnd (height * .45) - 1
ctx:set_source_rgba (ARDOUR.LuaAPI.color_to_rgba (fg))
ctx:set_line_width (1)
ctx:move_to (wl, h0)
ctx:line_to (wl, h1)
ctx:move_to (wc, h0)
ctx:line_to (wc, h1)
ctx:move_to (wr, h0)
ctx:line_to (wr, h1)
ctx:stroke ()
ctx:set_line_width (2)
ctx:move_to (wl - fw, fl)
ctx:line_to (wl + fw, fl)
ctx:move_to (wc - fw, fc)
ctx:line_to (wc + fw, fc)
ctx:move_to (wr - fw, fr)
ctx:line_to (wr + fw, fr)
ctx:stroke ()
end end
This is what i am using now. if anybody finds use for this: Just look up the URI of your LV2 Plugins in the pluginmanager and switch it inside the script. ![]()
Unfortunately this works only for LV2 so far. I have no clue how to add VST3 Plugins.
I would have searched in vain for this feature in Mixbus 32C v9.2 if it is only now included in Ardour v.9.
Is this function now also available in a newer Mixbus?