mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
temporal: tempo changes must be on meter-provided grid, not quarter notes
This commit is contained in:
parent
207cd9ae5f
commit
5ebf8152ec
1 changed files with 4 additions and 3 deletions
|
|
@ -1364,11 +1364,12 @@ TempoMap::set_tempo (Tempo const & t, timepos_t const & time)
|
|||
|
||||
/* tempo changes are required to be on-beat */
|
||||
|
||||
Beats on_beat = time.beats().round_to_beat();
|
||||
TempoMetric metric (metric_at (time.beats(), false));
|
||||
Beats on_beat = time.beats().round_to_multiple (Beats::ticks (metric.meter().ticks_per_grid()));
|
||||
superclock_t sc;
|
||||
BBT_Time bbt;
|
||||
|
||||
TempoMetric metric (metric_at (on_beat, false));
|
||||
metric = metric_at (on_beat, false);
|
||||
|
||||
bbt = metric.bbt_at (on_beat);
|
||||
sc = metric.superclock_at (on_beat);
|
||||
|
|
@ -1386,7 +1387,7 @@ TempoMap::set_tempo (Tempo const & t, timepos_t const & time)
|
|||
|
||||
/* tempo changes must be on beat */
|
||||
|
||||
beats = tm.quarters_at_superclock (sc).round_to_beat ();
|
||||
beats = tm.quarters_at_superclock (sc).round_to_multiple (Beats::ticks (tm.meter().ticks_per_grid()));
|
||||
bbt = tm.bbt_at (beats);
|
||||
|
||||
/* recompute superclock position of rounded beat */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue