mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
Add some example Lua scripts
This commit is contained in:
parent
2579e70f46
commit
756c5a5ee1
2 changed files with 174 additions and 0 deletions
14
scripts/_tempo_map_dump.lua
Normal file
14
scripts/_tempo_map_dump.lua
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue