5 author = "Robin Gareus",
6 email = "robin@gareus.org",
7 site = "http://gareus.org",
9 Example Ardour Session Script.
10 Session scripts are called at the beginning of every process-callback (before doing any audio processing).
11 This example stops the transport after rolling for a configurable time which can be set when instantiating the script.]]
14 function sess_params ()
17 ["print"] = { title = "Debug Print (yes/no)", default = "no", optional = true },
18 ["time"] = { title = "Timeout (sec)", default = "90", optional = false },
22 function factory (params)
23 return function (n_samples)
24 local p = params["print"] or "no"
25 local timeout = params["time"] or 90
27 if p ~= "no" then print (a, n_samples, Session:frame_rate (), Session:transport_rolling ()) end -- debug output (not rt safe)
28 if (not Session:transport_rolling()) then
33 if (a > timeout * Session:frame_rate()) then
34 Session:request_transport_speed(0.0, true)