VST3, Lua: fix barPositionMusic
"last bar start position, in quarter notes", starts at zero to match projectTimeMusic.
This commit is contained in:
parent
34789ff22f
commit
ebcaffd19f
@ -718,7 +718,7 @@ LuaProc::connect_and_run (BufferSet& bufs,
|
||||
lua_time["musicTime"] = DoubleableBeats (metric.tempo ().quarters_at_sample (start)).to_double ();
|
||||
lua_time["musicTimeEnd"] = DoubleableBeats (metric_end.tempo ().quarters_at_sample (end)).to_double ();
|
||||
|
||||
lua_time["barPositionMusic"] = bbt.bars * 4;
|
||||
lua_time["barPositionMusic"] = (bbt.bars - 1) * 4;
|
||||
lua_time["timeSigNumerator"] = metric.meter ().divisions_per_bar ();
|
||||
lua_time["timeSigDenominator"] = metric.meter ().note_value ();
|
||||
|
||||
|
@ -725,7 +725,7 @@ VST3Plugin::connect_and_run (BufferSet& bufs,
|
||||
context.timeSigNumerator = metric.meter ().divisions_per_bar ();
|
||||
context.timeSigDenominator = metric.meter ().note_value ();
|
||||
context.projectTimeMusic = DoubleableBeats (metric.tempo ().quarters_at_sample (start)).to_double ();
|
||||
context.barPositionMusic = bbt.bars * 4; // PPQN, NOT tmap.metric_at(bbt).meter().divisions_per_bar()
|
||||
context.barPositionMusic = (bbt.bars - 1) * 4; // PPQN, NOT tmap.metric_at(bbt).meter().divisions_per_bar()
|
||||
}
|
||||
|
||||
const double tcfps = _session.timecode_frames_per_second ();
|
||||
|
Loading…
Reference in New Issue
Block a user