diff options
author | nick_m <mainsbridge@gmail.com> | 2016-03-29 02:23:29 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2016-05-27 23:38:12 +1000 |
commit | daa07ce6e0303b27fb396be26007c18267ffb867 (patch) | |
tree | 6319f02b22f33d45c5e0987cbebcf47f8217d28c /gtk2_ardour/tempo_lines.cc | |
parent | 59df9880a4639aea00d88f2ceb2b04d424b574a6 (diff) |
Tempo ramps - tempos now musically snap to their future.
Diffstat (limited to 'gtk2_ardour/tempo_lines.cc')
-rw-r--r-- | gtk2_ardour/tempo_lines.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk2_ardour/tempo_lines.cc b/gtk2_ardour/tempo_lines.cc index 370ee4aac1..7a5be311ed 100644 --- a/gtk2_ardour/tempo_lines.cc +++ b/gtk2_ardour/tempo_lines.cc @@ -59,7 +59,6 @@ TempoLines::draw_ticks (std::vector<ARDOUR::TempoMap::BBTPoint>& grid, framecnt_t leftmost_frame, framecnt_t frame_rate) { - const double fpb = grid.begin()->tempo.frames_per_beat(frame_rate); const uint32_t base = UIConfiguration::instance().color_mod("measure line beat", "measure line beat"); for (unsigned l = 1; l < divisions; ++l) { @@ -82,7 +81,8 @@ TempoLines::draw_ticks (std::vector<ARDOUR::TempoMap::BBTPoint>& grid, grid.begin()->tempo.pulses_per_minute()) + 1) / grid.begin()->c; f = grid.begin()->frame + (framecnt_t) floor ((time_at_pulse * 60.0 * frame_rate) + 0.5); } else { - f = grid.begin()->frame + (l * (fpb / (double)divisions)); + const double fpb = grid.begin()->tempo.frames_per_beat (frame_rate); + f = grid.begin()->frame + (l * (fpb / (double) divisions)); } if (f > leftmost_frame) { |