4 author = "Ardour Lua Task Force",
6 Example Ardour Session Script.
7 Session scripts are called at the beginning of every process-callback (before doing any audio processing).
8 This example stops the transport after rolling for a configurable time which can be set when instantiating the script.]]
11 function sess_params ()
14 ["print"] = { title = "Debug Print (yes/no)", default = "no", optional = true },
15 ["time"] = { title = "Timeout (sec)", default = "90", optional = false },
19 function factory (params)
20 return function (n_samples)
21 local p = params["print"] or "no"
22 local timeout = params["time"] or 90
24 if p ~= "no" then print (a, n_samples, Session:frame_rate (), Session:transport_rolling ()) end -- debug output (not rt safe)
25 if (not Session:transport_rolling()) then
30 if (a > timeout * Session:frame_rate()) then
31 Session:request_transport_speed(0.0, true)