Some more frame -> sample changes (in scripts)
This commit is contained in:
parent
9ddc47204a
commit
79db200bdb
|
@ -7,7 +7,7 @@ function factory () return function ()
|
|||
if mr:isnil () then goto next end
|
||||
|
||||
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 ())
|
||||
for n in nl:iter () do
|
||||
print (" Note @", bfc:to (n:time ()),
|
||||
|
@ -18,4 +18,3 @@ function factory () return function ()
|
|||
::next::
|
||||
end
|
||||
end end
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@ function factory (params)
|
|||
io.output (file)
|
||||
io.write (string.format ("Region: '%s' pos-changed: %s, length-changed: %s\n",
|
||||
obj:name (),
|
||||
tostring (pch:containsFramePos (ARDOUR.Properties.Start)),
|
||||
tostring (pch:containsFramePos (ARDOUR.Properties.Length))
|
||||
tostring (pch:containsSamplePos (ARDOUR.Properties.Start)),
|
||||
tostring (pch:containsSamplePos (ARDOUR.Properties.Length))
|
||||
))
|
||||
io.close (file)
|
||||
end
|
||||
|
|
|
@ -44,8 +44,8 @@ function factory (params)
|
|||
obj,pch = ...
|
||||
tx:send ("/region_property_changed", "sTTiii",
|
||||
obj:name (),
|
||||
(pch:containsFramePos (ARDOUR.Properties.Start)),
|
||||
(pch:containsFramePos (ARDOUR.Properties.Length)),
|
||||
(pch:containsSamplePos (ARDOUR.Properties.Start)),
|
||||
(pch:containsSamplePos (ARDOUR.Properties.Length)),
|
||||
obj:position (), obj:start (), obj:length ())
|
||||
end
|
||||
end
|
||||
|
|
|
@ -95,7 +95,7 @@ function factory () return function ()
|
|||
|
||||
-- MIDI events are timestamped in "bar-beat" units, we need to convert those
|
||||
-- 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
|
||||
for av in ec:list ():events ():iter () do
|
||||
|
|
|
@ -274,7 +274,7 @@ function factory (params) return function ()
|
|||
Session:abort_reversible_command ()
|
||||
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::
|
||||
end -- end of anonymous action script function
|
||||
end -- end of script factory
|
||||
|
|
Loading…
Reference in New Issue