summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-03-07 00:32:19 +0100
committerRobin Gareus <robin@gareus.org>2017-03-07 00:32:19 +0100
commit7bada83a3f4dccefc10a7e6f3627189654e85a41 (patch)
treee6c2e396262727394ca5609c3949443485021e8d /scripts
parente1095310a8186bbd977534285df0ab29423d3aa3 (diff)
two new action scripts (no icons yet)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/bypass_all_plugins.lua22
-rw-r--r--scripts/mute_all_tracks.lua21
2 files changed, 43 insertions, 0 deletions
diff --git a/scripts/bypass_all_plugins.lua b/scripts/bypass_all_plugins.lua
new file mode 100644
index 0000000000..913228101f
--- /dev/null
+++ b/scripts/bypass_all_plugins.lua
@@ -0,0 +1,22 @@
+ardour {
+ ["type"] = "EditorAction",
+ name = "Bypass Plugins",
+ license = "MIT",
+ author = "Ardour Team",
+ description = [[Bypass Plugins on selected tracks]]
+}
+
+function factory () return function ()
+ 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():deactivate()
+ i = i + 1
+ end
+ end
+end end
diff --git a/scripts/mute_all_tracks.lua b/scripts/mute_all_tracks.lua
new file mode 100644
index 0000000000..e15c0530c0
--- /dev/null
+++ b/scripts/mute_all_tracks.lua
@@ -0,0 +1,21 @@
+ardour {
+ ["type"] = "EditorAction",
+ name = "Mute All Tracks",
+ license = "MIT",
+ author = "Ardour Team",
+ description = [[Mute All Tracks in the Session]]
+}
+
+function factory () return function ()
+ local ctrls = ARDOUR.ControlListPtr () -- create a list of controls to change
+
+ for r in Session:get_tracks ():iter () do -- iterate over all tracks in the session
+ ctrls:push_back (r:mute_control()) -- add the track's mute-control to the list of of controls to be changed
+ end
+
+ -- of more than one control is to be changed..
+ if ctrls:size() > 0 then
+ -- do it (queue change in realtime-context) set to "1" ; here 'muted'
+ Session:set_controls (ctrls, 1, PBD.GroupControlDisposition.NoGroup)
+ end
+end end