mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
Second round of Lua script API updates
This commit is contained in:
parent
1abf6a77d6
commit
76c0f42ecb
23 changed files with 76 additions and 112 deletions
|
|
@ -3,13 +3,11 @@ 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()
|
||||
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
|
||||
-- print absolute timeline position of transients
|
||||
print (t + region_pos - region_off)
|
||||
print (ref + Temporal.timecnt_t(t), ref:samples () + t)
|
||||
end
|
||||
print ("----")
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue