Add example Lua script to print region transients
This commit is contained in:
parent
6c1051024c
commit
96a3e4d321
16
scripts/_region_transients.lua
Normal file
16
scripts/_region_transients.lua
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
ardour { ["type"] = "Snippet", name = "Region Transient List" }
|
||||||
|
|
||||||
|
function factory () return function ()
|
||||||
|
local sel = Editor:get_selection ()
|
||||||
|
for r in sel.regions:regionlist ():iter () do
|
||||||
|
local region_pos = r:position()
|
||||||
|
local region_off = r:start()
|
||||||
|
print (r:name(), r:position(), r:start())
|
||||||
|
local trans = r:transients()
|
||||||
|
for t in trans:iter() do
|
||||||
|
-- print absolute timeline position of transients
|
||||||
|
print (t + region_pos - region_off)
|
||||||
|
end
|
||||||
|
print ("----")
|
||||||
|
end
|
||||||
|
end end
|
Loading…
Reference in New Issue
Block a user