13
0

Add example script to list Playlists

This commit is contained in:
Robin Gareus 2019-03-19 05:32:12 +01:00
parent 1172ff4948
commit 842faa5b6e
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -0,0 +1,27 @@
ardour { ["type"] = "Snippet", name = "Dump Playlists" }
function factory () return function ()
print ("Number of playlists:", Session:playlists():n_playlists())
print ()
print ("Used playlists:")
for p in Session:playlists():get_used():iter() do
print ("-", p:name(), p:n_regions())
end
print ()
print ("Unused playlists:")
for p in Session:playlists():get_unused():iter() do
print ("-", p:name(), p:n_regions())
end
print ()
print ("Playlists by Track:")
for r in Session:get_tracks():iter() do
print ("*", r:name())
for p in Session:playlists():playlists_for_track (r:to_track()):iter() do
print (" -", p:name(), p:n_regions())
end
end
end end