diff options
author | Robin Gareus <robin@gareus.org> | 2017-08-24 02:56:33 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-08-24 02:56:33 +0200 |
commit | aacb2d7be7f9c34b39f1acf9a408e05addab409e (patch) | |
tree | fd6f4372b02fd3cdf620d88338a8472591c5869f /scripts | |
parent | 08e564dc2e65e3c80b362024ffe5ca89962dc00f (diff) |
Lua Script Example to toggle monitor section
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/_toggle_monitor_section.lua | 12 |
1 files changed, 12 insertions, 0 deletions
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 |