diff options
author | nick_m <mainsbridge@gmail.com> | 2016-10-09 03:46:50 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2016-10-09 03:46:50 +1100 |
commit | 2f72b4238544261fbb40e17189706d3fcdd52b7d (patch) | |
tree | 1e44a0d87618c5e38d17993673e5c9fd857264c6 /gtk2_ardour/tempo_curve.cc | |
parent | b1df56d531869ef737268b2152d79e71c817e27b (diff) |
TempoSection methods deal in beats rather than pulses per minute.
- removes note type from curve function for a slightly more
accurate result.
Diffstat (limited to 'gtk2_ardour/tempo_curve.cc')
-rw-r--r-- | gtk2_ardour/tempo_curve.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk2_ardour/tempo_curve.cc b/gtk2_ardour/tempo_curve.cc index 6cc0fbc7fd..6a9a20727b 100644 --- a/gtk2_ardour/tempo_curve.cc +++ b/gtk2_ardour/tempo_curve.cc @@ -121,7 +121,7 @@ TempoCurve::set_position (framepos_t frame, framepos_t end_frame) points->push_back (ArdourCanvas::Duple (0.0, curve_height)); if (end_frame == UINT32_MAX) { - const double tempo_at = _tempo.tempo_at_frame (frame, editor.session()->frame_rate()) * _tempo.note_type(); + const double tempo_at = _tempo.tempo_at_frame (frame, editor.session()->frame_rate()); 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)); @@ -133,7 +133,7 @@ TempoCurve::set_position (framepos_t frame, framepos_t end_frame) framepos_t current_frame = frame; while (current_frame < (end_frame - frame_step)) { - const double tempo_at = _tempo.tempo_at_frame (current_frame, editor.session()->frame_rate()) * _tempo.note_type(); + const double tempo_at = _tempo.tempo_at_frame (current_frame, editor.session()->frame_rate()); const double y_pos = max ((curve_height) - (((tempo_at - _min_tempo) / (_max_tempo - _min_tempo)) * curve_height), 0.0); points->push_back (ArdourCanvas::Duple (editor.sample_to_pixel (current_frame - frame), min (y_pos, curve_height))); @@ -141,7 +141,7 @@ TempoCurve::set_position (framepos_t frame, framepos_t end_frame) current_frame += frame_step; } - const double tempo_at = _tempo.tempo_at_frame (end_frame, editor.session()->frame_rate()) * _tempo.note_type(); + const double tempo_at = _tempo.tempo_at_frame (end_frame, editor.session()->frame_rate()); const double y_pos = max ((curve_height) - (((tempo_at - _min_tempo) / (_max_tempo - _min_tempo)) * curve_height), 0.0); points->push_back (ArdourCanvas::Duple (editor.sample_to_pixel ((end_frame - 1) - frame), min (y_pos, curve_height))); |