From b209827d10f0d332c3d05d823f5eb839e49b94fa Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 26 Sep 2021 00:03:52 +0200 Subject: [PATCH] Lua script button to immediately record For all guests who do not like keyboard shortcuts :) --- share/scripts/record_now.lua | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 share/scripts/record_now.lua diff --git a/share/scripts/record_now.lua b/share/scripts/record_now.lua new file mode 100644 index 0000000000..d4ba831418 --- /dev/null +++ b/share/scripts/record_now.lua @@ -0,0 +1,35 @@ +ardour { + ["type"] = "EditorAction", + name = "Record Now", + license = "MIT", + author = "Ardour Team", + description = [[Engage Global Record-Arm and Play (record - roll)]] +} + +function factory () return function () + Editor:access_action ("Transport", "record-roll") +end end + +function icon (params) return function (ctx, width, height) + local x = width * .5 + local y = height * .5 + local r = math.min (x, y) * .45 + local p = math.min (x, y) * .65 + + ctx:move_to (x - p, y - p) + ctx:line_to (x - p, y + p) + ctx:line_to (x, y) + ctx:close_path () + ctx:set_source_rgba (.3, .9, .3, 1.) + ctx:fill_preserve () + ctx:set_source_rgba (0, 0, 0, .8) + ctx:set_line_width (1) + ctx:stroke () + + ctx:arc (x + r, y, r, 0, 2 * math.pi) + ctx:set_source_rgba (.9, .3, .3, 1.0) + ctx:fill_preserve () + ctx:set_source_rgba (0, 0, 0, .8) + ctx:set_line_width (1) + ctx:stroke () +end end