From aacb2d7be7f9c34b39f1acf9a408e05addab409e Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 24 Aug 2017 02:56:33 +0200 Subject: [PATCH] Lua Script Example to toggle monitor section --- scripts/_toggle_monitor_section.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 scripts/_toggle_monitor_section.lua diff --git a/scripts/_toggle_monitor_section.lua b/scripts/_toggle_monitor_section.lua new file mode 100644 index 0000000000..f8f32c6467 --- /dev/null +++ b/scripts/_toggle_monitor_section.lua @@ -0,0 +1,12 @@ +ardour { ["type"] = "Snippet", name = "Toggle Monitor Section" } + +function factory () return function () + if Session:monitor_out():isnil() then + Session:add_monitor_section () + ARDOUR.config():set_use_monitor_bus (true) + else + Session:remove_monitor_section () + ARDOUR.config():set_use_monitor_bus (false) + collectgarbage () + end +end end