Add some example Lua scripts

This commit is contained in:
Robin Gareus 2020-01-14 16:52:42 +01:00
parent 2579e70f46
commit 756c5a5ee1
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
2 changed files with 174 additions and 0 deletions

View file

@ -0,0 +1,14 @@
ardour { ["type"] = "Snippet", name = "Tempo Map Dump" }
function factory () return function ()
local tm = Session:tempo_map ()
local ts = tm:tempo_section_at_sample (0)
while true do
print ("TS @", ts:sample(), " | ", ts:to_tempo():note_types_per_minute (), "..", ts:to_tempo():end_note_types_per_minute (), "bpm")
ts = tm:next_tempo_section (ts)
if not ts then break end
end
end end