mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 05:36:31 +01:00
correct math for setting SMF-imported tempo/meter positions
This commit is contained in:
parent
bda4d195f1
commit
59f58946a9
1 changed files with 4 additions and 1 deletions
|
|
@ -760,9 +760,12 @@ SMF::tempo_map (bool& provided) const
|
|||
|
||||
Temporal::BBT_Argument bbt; /* 1|1|0 which is correct for the no-meter case */
|
||||
|
||||
uint64_t b = t->time_pulses / (uint64_t) ppqn();
|
||||
uint64_t tk = ((t->time_pulses % (uint64_t) ppqn()) * Temporal::ticks_per_beat) / ppqn();
|
||||
|
||||
if (have_initial_meter) {
|
||||
|
||||
bbt = new_map->bbt_at (Temporal::timepos_t (Temporal::Beats (int_div_round (t->time_pulses, (size_t) ppqn()), 0)));
|
||||
bbt = new_map->bbt_at (Temporal::timepos_t (Temporal::Beats (b, tk)));
|
||||
new_map->set_tempo (tempo, bbt);
|
||||
|
||||
if (!(meter == last_meter)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue