mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 19:56:31 +01:00
temporal: move implementation of quarters_per_minute_at() into .cc file
This commit is contained in:
parent
a0e134e1b3
commit
e7e44351cc
2 changed files with 12 additions and 9 deletions
|
|
@ -2774,14 +2774,20 @@ TempoMap::previous_tempo (TempoPoint const & point) const
|
||||||
return 0;
|
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 &
|
TempoPoint const &
|
||||||
TempoMap::tempo_at (timepos_t const & pos) const
|
TempoMap::tempo_at (timepos_t const & pos) const
|
||||||
{
|
{
|
||||||
if (pos.is_beats()) {
|
return pos.is_beats() ? tempo_at (pos.beats()) : tempo_at (pos.superclocks());
|
||||||
return tempo_at (pos.beats());
|
|
||||||
}
|
|
||||||
|
|
||||||
return tempo_at (pos.superclocks());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TempoPoint const &
|
TempoPoint const &
|
||||||
|
|
|
||||||
|
|
@ -772,10 +772,7 @@ class /*LIBTEMPORAL_API*/ TempoMap : public PBD::StatefulDestructible
|
||||||
/* convenience function that hides some complexities behind fetching
|
/* convenience function that hides some complexities behind fetching
|
||||||
* the bpm at position
|
* the bpm at position
|
||||||
*/
|
*/
|
||||||
LIBTEMPORAL_API double quarters_per_minute_at (timepos_t const & pos) const {
|
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());
|
|
||||||
}
|
|
||||||
|
|
||||||
/* convenience function */
|
/* convenience function */
|
||||||
LIBTEMPORAL_API BBT_Time round_to_bar (BBT_Time const & bbt) const {
|
LIBTEMPORAL_API BBT_Time round_to_bar (BBT_Time const & bbt) const {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue