13
0
livetrax/share/scripts/_region_transients.lua

15 lines
492 B
Lua
Raw Normal View History

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
for t in trans:iter() do
2022-09-27 12:58:53 -04:00
print (ref + Temporal.timecnt_t(t), ref:samples () + t)
end
print ("----")
end
end end