03-09-2020, 02:02 PM
(This post was last modified: 03-09-2020, 02:08 PM by Perry Warren.)
Here's a script I came up with by modifying the Bypass Plugins script from the Ardour Team. The original script bypassed the plugins of a selected track. Mine selects all tracks (using the select all tracks action) and bypasses the plugins. It then goes through each mixbus one by one (because there is no select all busses action) and the master channel and bypasses their plugins. Note: If you have hidden any busses, then the script will loop back around and disable some track plugins again. They are already disabled so this doesn't change the plugin state. This happens because the script loops 13 times to disable the bus plugins. So if you only have 8 busses showing then it will loop back around through 4 tracks, groups, or a combination thereof. This happens because I used the "select-next-route" action and apparently a route is a single non-grouped track or a group.
ardour {
["type"] = "EditorAction",
name = "Bypass All Plugins",
license = "MIT",
author = "Perry Warren / Ardour Team",
description = [[Bypass All Plugins]]
}
function factory () return function ()
Editor:access_action("Common","select-all-tracks")
local sel = Editor:get_selection ()
for r in sel.tracks:routelist ():iter () do
local i = 0;
while 1 do -- iterate over all plugins/processors
local proc = r:nth_plugin (i)
if proc:isnil () then
break
end
proc:to_insert():enable (false)
i = i + 1
end
end
local x = 0
while x < 13 do
Editor:access_action("Editor","select-next-route")
local sel = Editor:get_selection ()
for r in sel.tracks:routelist ():iter () do
local i = 1;
while 1 do -- iterate over all plugins/processors
local proc = r:nth_plugin (i)
if proc:isnil () then
break
end
proc:to_insert():enable (false)
i = i + 1
end
end
x = x + 1
end
Editor:access_action("Main","Escape")
Editor:access_action("Editor","select-next-route")
Editor:access_action("Main","Escape")
end end
Here's a script to enable all plugins again:
ardour {
["type"] = "EditorAction",
name = "Enable All Plugins",
license = "MIT",
author = "Perry Warren / Ardour Team",
description = [[Enable All Plugins]]
}
function factory () return function ()
Editor:access_action("Common","select-all-tracks")
local sel = Editor:get_selection ()
for r in sel.tracks:routelist ():iter () do
local i = 0;
while 1 do -- iterate over all plugins/processors
local proc = r:nth_plugin (i)
if proc:isnil () then
break
end
proc:to_insert():enable (true)
i = i + 1
end
end
local x = 0
while x < 13 do
Editor:access_action("Editor","select-next-route")
local sel = Editor:get_selection ()
for r in sel.tracks:routelist ():iter () do
local i = 1;
while 1 do -- iterate over all plugins/processors
local proc = r:nth_plugin (i)
if proc:isnil () then
break
end
proc:to_insert():enable (true)
i = i + 1
end
end
x = x + 1
end
Editor:access_action("Main","Escape")
Editor:access_action("Editor","select-next-route")
Editor:access_action("Main","Escape")
end end
ardour {
["type"] = "EditorAction",
name = "Bypass All Plugins",
license = "MIT",
author = "Perry Warren / Ardour Team",
description = [[Bypass All Plugins]]
}
function factory () return function ()
Editor:access_action("Common","select-all-tracks")
local sel = Editor:get_selection ()
for r in sel.tracks:routelist ():iter () do
local i = 0;
while 1 do -- iterate over all plugins/processors
local proc = r:nth_plugin (i)
if proc:isnil () then
break
end
proc:to_insert():enable (false)
i = i + 1
end
end
local x = 0
while x < 13 do
Editor:access_action("Editor","select-next-route")
local sel = Editor:get_selection ()
for r in sel.tracks:routelist ():iter () do
local i = 1;
while 1 do -- iterate over all plugins/processors
local proc = r:nth_plugin (i)
if proc:isnil () then
break
end
proc:to_insert():enable (false)
i = i + 1
end
end
x = x + 1
end
Editor:access_action("Main","Escape")
Editor:access_action("Editor","select-next-route")
Editor:access_action("Main","Escape")
end end
Here's a script to enable all plugins again:
ardour {
["type"] = "EditorAction",
name = "Enable All Plugins",
license = "MIT",
author = "Perry Warren / Ardour Team",
description = [[Enable All Plugins]]
}
function factory () return function ()
Editor:access_action("Common","select-all-tracks")
local sel = Editor:get_selection ()
for r in sel.tracks:routelist ():iter () do
local i = 0;
while 1 do -- iterate over all plugins/processors
local proc = r:nth_plugin (i)
if proc:isnil () then
break
end
proc:to_insert():enable (true)
i = i + 1
end
end
local x = 0
while x < 13 do
Editor:access_action("Editor","select-next-route")
local sel = Editor:get_selection ()
for r in sel.tracks:routelist ():iter () do
local i = 1;
while 1 do -- iterate over all plugins/processors
local proc = r:nth_plugin (i)
if proc:isnil () then
break
end
proc:to_insert():enable (true)
i = i + 1
end
end
x = x + 1
end
Editor:access_action("Main","Escape")
Editor:access_action("Editor","select-next-route")
Editor:access_action("Main","Escape")
end end