summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/tempo.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-12-13 02:46:36 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-12-13 02:46:36 +0000
commite0cf3b6354e2c92a6adabe85cb6d6d3c547c287c (patch)
tree564e24afbcdda3cf67c06b3ac71db3cb5b66023f /libs/ardour/ardour/tempo.h
parent6aaf4ea17a326eb06d81b06cb83048fbdaaa8a52 (diff)
more fun and games with meter and the tempo map: rename Meter::beats_per_bar() to Meter::divisions_per_bar() so that its clear(er) on what it is actually returning; use Meter::divisions_per_bar() in more (all?) places that need it; fix up dragging meter marks by removing the relevant meter section from the map while we drag; operator<< for some tempo-related objects
git-svn-id: svn://localhost/ardour2/branches/3.0@10995 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/tempo.h')
-rw-r--r--libs/ardour/ardour/tempo.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h
index 631b709a28..281f42443e 100644
--- a/libs/ardour/ardour/tempo.h
+++ b/libs/ardour/ardour/tempo.h
@@ -45,7 +45,7 @@ class Tempo {
double beats_per_minute () const { return _beats_per_minute;}
double note_type () const { return _note_type;}
- double frames_per_beat (framecnt_t sr, const Meter& meter) const;
+ double frames_per_beat (framecnt_t sr) const;
protected:
double _beats_per_minute;
@@ -54,23 +54,23 @@ class Tempo {
class Meter {
public:
- Meter (double bpb, double bt)
- : _beats_per_bar (bpb), _note_type (bt) {}
+ Meter (double dpb, double bt)
+ : _divisions_per_bar (dpb), _note_type (bt) {}
- double beats_per_bar () const { return _beats_per_bar; }
+ double divisions_per_bar () const { return _divisions_per_bar; }
double note_divisor() const { return _note_type; }
double frames_per_bar (const Tempo&, framecnt_t sr) const;
double frames_per_division (const Tempo&, framecnt_t sr) const;
protected:
- /** The number of beats in a bar. This is a real value because
+ /** The number of divisions in a bar. This is a floating point value because
there are musical traditions on our planet that do not limit
themselves to integral numbers of beats per bar.
*/
- double _beats_per_bar;
+ double _divisions_per_bar;
- /** The type of "note" that a beat represents. For example, 4.0 is
+ /** The type of "note" that a division represents. For example, 4.0 is
a quarter (crotchet) note, 8.0 is an eighth (quaver) note, etc.
*/
double _note_type;
@@ -297,4 +297,8 @@ class TempoMap : public PBD::StatefulDestructible
}; /* namespace ARDOUR */
+std::ostream& operator<< (std::ostream&, const ARDOUR::Meter&);
+std::ostream& operator<< (std::ostream&, const ARDOUR::Tempo&);
+std::ostream& operator<< (std::ostream&, const ARDOUR::MetricSection&);
+
#endif /* __ardour_tempo_h__ */