Fix importing tempo-maps for non-integer pulsed time-signatures
This commit is contained in:
parent
ea8d089e3c
commit
c5c4cd0246
@ -290,9 +290,9 @@ Editor::import_smf_tempo_map (Evoral::SMF const & smf, samplepos_t pos)
|
||||
Timecode::BBT_Time bbt; /* 1|1|0 which is correct for the no-meter case */
|
||||
|
||||
if (have_initial_meter) {
|
||||
new_map.add_tempo (tempo, (t->time_pulses/smf.ppqn()) / 4.0, 0, MusicTime);
|
||||
new_map.add_tempo (tempo, t->time_pulses/ (double)smf.ppqn() / 4.0, 0, MusicTime);
|
||||
if (!(meter == last_meter)) {
|
||||
bbt = new_map.bbt_at_quarter_note ((t->time_pulses/smf.ppqn()));
|
||||
bbt = new_map.bbt_at_quarter_note (t->time_pulses/(double)smf.ppqn());
|
||||
new_map.add_meter (meter, bbt, 0, MusicTime);
|
||||
}
|
||||
|
||||
@ -305,7 +305,7 @@ Editor::import_smf_tempo_map (Evoral::SMF const & smf, samplepos_t pos)
|
||||
|
||||
last_meter = meter;
|
||||
|
||||
cerr << "@ " << t->time_pulses/smf.ppqn() << " ("
|
||||
cerr << "@ " << t->time_pulses/(double)smf.ppqn() << " ("
|
||||
<< t->time_seconds << ") Add T " << tempo << " M " << meter << endl;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user