mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
prefix no-inst script with an underscore and skip install
This commit is contained in:
parent
2b7a89ecff
commit
a8143ea44e
10 changed files with 2 additions and 1 deletions
34
scripts/_session_test.lua
Normal file
34
scripts/_session_test.lua
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
ardour {
|
||||
["type"] = "session",
|
||||
name = "Good Night",
|
||||
author = "Ardour Lua Task Force",
|
||||
description = [[
|
||||
Example Ardour Session Script.
|
||||
Session scripts are called at the beginning of every process-callback (before doing any audio processing).
|
||||
This example stops the transport after rolling for a configurable time which can be set when instantiating the script.]]
|
||||
}
|
||||
|
||||
function sess_params ()
|
||||
return
|
||||
{
|
||||
["print"] = { title = "Debug Print (yes/no)", default = "no", optional = true },
|
||||
["time"] = { title = "Timeout (sec)", default = "90", optional = false },
|
||||
}
|
||||
end
|
||||
|
||||
function factory (params)
|
||||
return function (n_samples)
|
||||
local p = params["print"] or "no"
|
||||
local timeout = params["time"] or 90
|
||||
a = a or 0
|
||||
if p ~= "no" then print (a, n_samples, Session:frame_rate (), Session:transport_rolling ()) end -- debug output (not rt safe)
|
||||
if (not Session:transport_rolling()) then
|
||||
a = 0
|
||||
return
|
||||
end
|
||||
a = a + n_samples
|
||||
if (a > timeout * Session:frame_rate()) then
|
||||
Session:request_transport_speed(0.0, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue