This resulted in a Lua script which runs on startup and i think it might be too early in the startup process.
Can somebody change this script, so that i can run it whenever i want it?
ardour {
["type"] = "EditorHook",
name = "Reset Dragonfly Reverbs on Session Load",
license = "MIT",
author = "Ccee",
description = "Disables and re-enables all Dragonfly Reverb plugins on session load"
}
function signals ()
return LuaSignal.Set():add ({
[LuaSignal.SetSession] = true
})
end
function factory ()
return function (signal, ref, ...)
print("Resetting Dragonfly Reverbs...")
for route in Session:get_routes():iter() do
local i = 0
repeat
local p = route:nth_processor(i)
if not p:isnil() then
local name = p:display_name() or ""
if name:lower():find("dragonfly") then
print("Resetting plugin: " .. name .. " on track: " .. route:name())
p:deactivate()
p:activate()
end
end
i = i + 1
until p:isnil()
end
print("Done resetting Dragonfly Reverbs.")
end
end
Just change the script type from “EditorHook” to → “EditorAction”, then erase the first bit (“function signals ()”… -which establishes the ‘trigger’ for running the script, in this case on session-startup), and then also “signal, ref, …” (-which is now unnecessary).
(…I also changed the name/description for you.)
ardour {
["type"] = "EditorAction",
name = "Reset Dragonfly Reverbs",
license = "MIT",
author = "Ccee",
description = "Disables and re-enables all Dragonfly Reverb plugins"
}
function factory ()
return function ()
print("Resetting Dragonfly Reverbs...")
for route in Session:get_routes():iter() do
local i = 0
repeat
local p = route:nth_processor(i)
if not p:isnil() then
local name = p:display_name() or ""
if name:lower():find("dragonfly") then
print("Resetting plugin: " .. name .. " on track: " .. route:name())
p:deactivate()
p:activate()
end
end
i = i + 1
until p:isnil()
end
print("Done resetting Dragonfly Reverbs.")
end
end
I just downloaded the Dragonfly plugins so I could test this script, and it definitely is finding and deactivating and activating them appropriately. I first --muted the line of the code that re-activates them, just to prove that deactivation does in fact work:
So you’re correct. This script does “work” in and of itself. But I’m sorry to hear it’s not actually solving your plugin issue…
What version of the plugins are you using? LV2 ones?
You might want to try others.
Also, for me the Hall, Plate, and Room reverbs seem to work just fine (-all LV2).
-But “Dragonfly Early Reflections” freezes Ardour every single time I try to open it…
Hmm…
Presumably since when you do it manually there is a delay between deactivation and reactivation. Perhaps you want to introduce that delay into the script?
Lua doesn’t have a sleep or wait function, but see here for options: