Add some example Lua scripts
[ardour.git] / scripts / _tempo_map_dump.lua
1 ardour { ["type"] = "Snippet", name = "Tempo Map Dump" }
2
3 function factory () return function ()
4
5         local tm = Session:tempo_map ()
6         local ts = tm:tempo_section_at_sample (0)
7
8         while true do
9                 print ("TS @", ts:sample(), " | ", ts:to_tempo():note_types_per_minute (), "..", ts:to_tempo():end_note_types_per_minute (), "bpm")
10                 ts = tm:next_tempo_section (ts)
11                 if not ts then break end
12         end
13
14 end end