A/B a group of plugins among multiple tracks

I’d like to be able to switch between two version of a mix on the fly by disabling/enabling a pre-defined group of plugins.

FIltering by name would do, as I want to A/B all compressors and deessers only.

Is there a way to do this with a LUA script?

How would you imagine identifying compressors and deessers? Or any plugin, for that matter? Some plugin APIs, like AudioUnits, have no real plugin type information at all.

yes you can script this. For each Track, for each Plugin on that track: check name + bypassed status. toggle bypass.

for t in Session:get_tracks():iter() do -- use Session:get_routes():iter() to iterate over all tracks+busses
  local i = 0
    proc = t:nth_plugin (i)
    if not proc:isnil () then
      -- see http://manual.ardour.org/lua-scripting/class_reference/#ARDOUR:Processor
      local name = proc:display_name ()
      if name:find ("Calf") then
        if proc:active () then proc:deactivate() else  proc:activate() end
      if name == "a-Reverb" then
        if proc:active () then proc:deactivate() else  proc:activate() end
      i = i + 1
  until proc:isnil()

Paste it in Menu > Window > Scripting. Press “Run” there… Edit to you needs and then make an Action Script (Button/Keyboard shortcut) out of it by adding a boilerplate header to the script.

Apologies for resurrecting an old thread.

I was able to edit the script for the plugin I needed and it works when pressing run. However, I’m a bit lost on what “boilerplate” is needed in order to save it.

I’ve read over Lua Scripting in the manual but was unable to grok what was needed to save it.

Any assistance would be appreciated.