diff options
author | nick_m <mainsbridge@gmail.com> | 2016-11-06 05:14:20 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2016-11-11 03:37:08 +1100 |
commit | 33e95a15778e7fe87c204b0c4f2db039f857b523 (patch) | |
tree | 90678ea8fdf2a8a9532d808fd2efbf5775e5290e /gtk2_ardour/tempo_curve.cc | |
parent | e52f90357e79dac10da2bee0e27d51e8b07d5b83 (diff) |
rename Tempo _beats_per_minute to _note_types_per_minute, provide pulse helpers.
- adds quarter_notes_per_minute(), note_divisions_per_minute (double)
pulses_per_minute() and frames_per_quarter_note()
- this should be a no-op except for the use of tempo by
the vst callback which definitely uses quarter notes per minute.
- the XML node for TempoSection named 'beats-per-minute'
has been renamed.
Diffstat (limited to 'gtk2_ardour/tempo_curve.cc')
-rw-r--r-- | gtk2_ardour/tempo_curve.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gtk2_ardour/tempo_curve.cc b/gtk2_ardour/tempo_curve.cc index 7330e8c129..c9c14e4102 100644 --- a/gtk2_ardour/tempo_curve.cc +++ b/gtk2_ardour/tempo_curve.cc @@ -26,7 +26,7 @@ void TempoCurve::setup_sizes(const double timebar_height) { curve_height = floor (timebar_height) - 2.5; } - +/* ignores Tempo note type - only note_types_per_minute is potentially curved */ TempoCurve::TempoCurve (PublicEditor& ed, ArdourCanvas::Container& parent, guint32 rgba, ARDOUR::TempoSection& temp, framepos_t frame, bool handle_events) : editor (ed) @@ -34,8 +34,8 @@ TempoCurve::TempoCurve (PublicEditor& ed, ArdourCanvas::Container& parent, guint , _curve (0) , _shown (false) , _color (rgba) - , _min_tempo (temp.beats_per_minute()) - , _max_tempo (temp.beats_per_minute()) + , _min_tempo (temp.note_types_per_minute()) + , _max_tempo (temp.note_types_per_minute()) , _tempo (temp) { @@ -44,12 +44,12 @@ TempoCurve::TempoCurve (PublicEditor& ed, ArdourCanvas::Container& parent, guint group = new ArdourCanvas::Container (&parent, ArdourCanvas::Duple (unit_position, 1)); #ifdef CANVAS_DEBUG - group->name = string_compose ("TempoCurve::group for %1", _tempo.beats_per_minute()); + group->name = string_compose ("TempoCurve::group for %1", _tempo.note_types_per_minute()); #endif _curve = new ArdourCanvas::FramedCurve (group); #ifdef CANVAS_DEBUG - _curve->name = string_compose ("TempoCurve::curve for %1", _tempo.beats_per_minute()); + _curve->name = string_compose ("TempoCurve::curve for %1", _tempo.note_types_per_minute()); #endif _curve->set_points_per_segment (3); points = new ArdourCanvas::Points (); @@ -113,14 +113,14 @@ TempoCurve::set_position (framepos_t frame, framepos_t end_frame) points->push_back (ArdourCanvas::Duple (0.0, curve_height)); if (end_frame == (framepos_t) UINT32_MAX) { - const double tempo_at = _tempo.beats_per_minute(); + const double tempo_at = _tempo.note_types_per_minute(); const double y_pos = (curve_height) - (((tempo_at - _min_tempo) / (_max_tempo - _min_tempo)) * curve_height); points->push_back (ArdourCanvas::Duple (0.0, y_pos)); points->push_back (ArdourCanvas::Duple (ArdourCanvas::COORD_MAX - 5.0, y_pos)); } else if (_tempo.type() == ARDOUR::TempoSection::Constant) { - const double tempo_at = _tempo.beats_per_minute(); + const double tempo_at = _tempo.note_types_per_minute(); const double y_pos = (curve_height) - (((tempo_at - _min_tempo) / (_max_tempo - _min_tempo)) * curve_height); points->push_back (ArdourCanvas::Duple (0.0, y_pos)); |