2017-03-17 13:13:16 -04:00
|
|
|
ardour { ["type"] = "Snippet", name = "Region Transient List" }
|
|
|
|
|
|
|
|
function factory () return function ()
|
|
|
|
local sel = Editor:get_selection ()
|
|
|
|
for r in sel.regions:regionlist ():iter () do
|
2022-09-27 12:58:53 -04:00
|
|
|
local ref = r:position() - r:start()
|
|
|
|
print (r:name(), r:position(), r:start(), r:position():samples(), r:start():samples())
|
|
|
|
local trans = r:transients() -- list of samplepos_t
|
2017-03-17 13:13:16 -04:00
|
|
|
for t in trans:iter() do
|
2022-09-27 12:58:53 -04:00
|
|
|
print (ref + Temporal.timecnt_t(t), ref:samples () + t)
|
2017-03-17 13:13:16 -04:00
|
|
|
end
|
|
|
|
print ("----")
|
|
|
|
end
|
|
|
|
end end
|