temporal: move implementation of quarters_per_minute_at() into .cc file
This commit is contained in:
parent
a0e134e1b3
commit
e7e44351cc
@ -2774,14 +2774,20 @@ TempoMap::previous_tempo (TempoPoint const & point) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
double
|
||||
TempoMap::quarters_per_minute_at (timepos_t const & pos) const
|
||||
{
|
||||
TempoPoint const & tp (tempo_at (pos));
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
TempoPoint const &
|
||||
TempoMap::tempo_at (timepos_t const & pos) const
|
||||
{
|
||||
if (pos.is_beats()) {
|
||||
return tempo_at (pos.beats());
|
||||
}
|
||||
|
||||
return tempo_at (pos.superclocks());
|
||||
return pos.is_beats() ? tempo_at (pos.beats()) : tempo_at (pos.superclocks());
|
||||
}
|
||||
|
||||
TempoPoint const &
|
||||
|
@ -772,10 +772,7 @@ class /*LIBTEMPORAL_API*/ TempoMap : public PBD::StatefulDestructible
|
||||
/* convenience function that hides some complexities behind fetching
|
||||
* the bpm at position
|
||||
*/
|
||||
LIBTEMPORAL_API double quarters_per_minute_at (timepos_t const & pos) const {
|
||||
TempoPoint const & tp (tempo_at (pos));
|
||||
return tp.note_types_per_minute_at_DOUBLE (pos) * (4.0 / tp.note_type());
|
||||
}
|
||||
LIBTEMPORAL_API double quarters_per_minute_at (timepos_t const & pos) const;
|
||||
|
||||
/* convenience function */
|
||||
LIBTEMPORAL_API BBT_Time round_to_bar (BBT_Time const & bbt) const {
|
||||
|
Loading…
Reference in New Issue
Block a user