mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
Some more frame -> sample changes (in scripts)
This commit is contained in:
parent
9ddc47204a
commit
79db200bdb
5 changed files with 7 additions and 8 deletions
|
|
@ -7,7 +7,7 @@ function factory () return function ()
|
||||||
if mr:isnil () then goto next end
|
if mr:isnil () then goto next end
|
||||||
|
|
||||||
print (r:name (), "Pos:", r:position (), "Start:", r:start ())
|
print (r:name (), "Pos:", r:position (), "Start:", r:start ())
|
||||||
local bfc = ARDOUR.BeatsFramesConverter (Session:tempo_map (), r:position ())
|
local bfc = ARDOUR.BeatsSamplesConverter (Session:tempo_map (), r:position ())
|
||||||
local nl = ARDOUR.LuaAPI.note_list (mr:model ())
|
local nl = ARDOUR.LuaAPI.note_list (mr:model ())
|
||||||
for n in nl:iter () do
|
for n in nl:iter () do
|
||||||
print (" Note @", bfc:to (n:time ()),
|
print (" Note @", bfc:to (n:time ()),
|
||||||
|
|
@ -18,4 +18,3 @@ function factory () return function ()
|
||||||
::next::
|
::next::
|
||||||
end
|
end
|
||||||
end end
|
end end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@ function factory (params)
|
||||||
io.output (file)
|
io.output (file)
|
||||||
io.write (string.format ("Region: '%s' pos-changed: %s, length-changed: %s\n",
|
io.write (string.format ("Region: '%s' pos-changed: %s, length-changed: %s\n",
|
||||||
obj:name (),
|
obj:name (),
|
||||||
tostring (pch:containsFramePos (ARDOUR.Properties.Start)),
|
tostring (pch:containsSamplePos (ARDOUR.Properties.Start)),
|
||||||
tostring (pch:containsFramePos (ARDOUR.Properties.Length))
|
tostring (pch:containsSamplePos (ARDOUR.Properties.Length))
|
||||||
))
|
))
|
||||||
io.close (file)
|
io.close (file)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@ function factory (params)
|
||||||
obj,pch = ...
|
obj,pch = ...
|
||||||
tx:send ("/region_property_changed", "sTTiii",
|
tx:send ("/region_property_changed", "sTTiii",
|
||||||
obj:name (),
|
obj:name (),
|
||||||
(pch:containsFramePos (ARDOUR.Properties.Start)),
|
(pch:containsSamplePos (ARDOUR.Properties.Start)),
|
||||||
(pch:containsFramePos (ARDOUR.Properties.Length)),
|
(pch:containsSamplePos (ARDOUR.Properties.Length)),
|
||||||
obj:position (), obj:start (), obj:length ())
|
obj:position (), obj:start (), obj:length ())
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ function factory () return function ()
|
||||||
|
|
||||||
-- MIDI events are timestamped in "bar-beat" units, we need to convert those
|
-- MIDI events are timestamped in "bar-beat" units, we need to convert those
|
||||||
-- using the tempo-map, relative to the region-start
|
-- using the tempo-map, relative to the region-start
|
||||||
local bfc = ARDOUR.DoubleBeatsFramesConverter (Session:tempo_map (), r:start ())
|
local bfc = ARDOUR.DoubleBeatsSamplesConverter (Session:tempo_map (), r:start ())
|
||||||
|
|
||||||
-- iterate over CC-events
|
-- iterate over CC-events
|
||||||
for av in ec:list ():events ():iter () do
|
for av in ec:list ():events ():iter () do
|
||||||
|
|
|
||||||
|
|
@ -274,7 +274,7 @@ function factory (params) return function ()
|
||||||
Session:abort_reversible_command ()
|
Session:abort_reversible_command ()
|
||||||
end
|
end
|
||||||
|
|
||||||
print ("bounced " .. n_regions_created .. " regions from loop range (" .. loop:length() .. " frames) to playhead @ frame # " .. playhead)
|
print ("bounced " .. n_regions_created .. " regions from loop range (" .. loop:length() .. " samples) to playhead @ sample # " .. playhead)
|
||||||
::errorout::
|
::errorout::
|
||||||
end -- end of anonymous action script function
|
end -- end of anonymous action script function
|
||||||
end -- end of script factory
|
end -- end of script factory
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue