tempo map: slight reorganization of ::get_grid
This avoids resetting beats based on superclocks in case where we already do the opposite.
This commit is contained in:
parent
7dbf2445f5
commit
180c1d7759
|
@ -1954,7 +1954,11 @@ TempoMap::get_grid (TempoMapPoints& ret, superclock_t start, superclock_t end, u
|
||||||
|
|
||||||
if (bar_mod == 0) {
|
if (bar_mod == 0) {
|
||||||
|
|
||||||
/* Advance by the meter note value size */
|
/* Advance beats by the meter note value size, and
|
||||||
|
* then recompute the BBT and superclock
|
||||||
|
* position corresponding to that musical time
|
||||||
|
*/
|
||||||
|
|
||||||
beats += metric.tempo().note_type_as_beats ();
|
beats += metric.tempo().note_type_as_beats ();
|
||||||
bbt = metric.bbt_at (beats);
|
bbt = metric.bbt_at (beats);
|
||||||
start = metric.superclock_at (beats);
|
start = metric.superclock_at (beats);
|
||||||
|
@ -2886,8 +2890,8 @@ double
|
||||||
TempoMap::quarters_per_minute_at (timepos_t const & pos) const
|
TempoMap::quarters_per_minute_at (timepos_t const & pos) const
|
||||||
{
|
{
|
||||||
TempoPoint const & tp (tempo_at (pos));
|
TempoPoint const & tp (tempo_at (pos));
|
||||||
|
cerr << "Get gpm using " << tp << " where sc-per-nt at " << pos << " = " << tp.superclocks_per_note_type_at (pos) << endl;
|
||||||
const double val = tp.note_types_per_minute_at_DOUBLE (pos) * (4.0 / tp.note_type());
|
const double val = tp.note_types_per_minute_at_DOUBLE (pos) * (4.0 / tp.note_type());
|
||||||
std::cerr << "qpm @ " << pos << " using " << tp << " = " << val << std::endl;
|
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user