13
0

Lua script button to immediately record

For all guests who do not like keyboard shortcuts :)
This commit is contained in:
Robin Gareus 2021-09-26 00:03:52 +02:00
parent 5287bbb31e
commit b209827d10
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -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