From 7bada83a3f4dccefc10a7e6f3627189654e85a41 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 7 Mar 2017 00:32:19 +0100 Subject: two new action scripts (no icons yet) --- scripts/mute_all_tracks.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 scripts/mute_all_tracks.lua (limited to 'scripts/mute_all_tracks.lua') 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 -- cgit v1.2.3