mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Add method to query sections
This commit is contained in:
parent
6cf2659f8b
commit
46a916f0b4
4 changed files with 87 additions and 0 deletions
18
share/scripts/s_sections.lua
Normal file
18
share/scripts/s_sections.lua
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
ardour { ["type"] = "Snippet", name = "List Sections" }
|
||||
function factory () return function ()
|
||||
|
||||
local s = Temporal.timepos_t(0)
|
||||
local e = Temporal.timepos_t(0)
|
||||
local loc = Session:locations ()
|
||||
|
||||
local l = nil
|
||||
local cnt = 0
|
||||
repeat
|
||||
l, rv = loc:next_section (l, s, e)
|
||||
if l ~= nil then
|
||||
print (l:name (), rv[2], rv[3]);
|
||||
end
|
||||
cnt = cnt + 1
|
||||
until (l == nil or cnt > 10)
|
||||
|
||||
end end
|
||||
Loading…
Add table
Add a link
Reference in a new issue