summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_rulers.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2016-03-04 10:32:08 +1100
committernick_m <mainsbridge@gmail.com>2016-05-27 23:38:11 +1000
commita0558694dfdb2a89d54e22d30916ea0118b39301 (patch)
tree1bbc60ae798eb747d1f8b3cc13888c9aa70fdaaf /gtk2_ardour/editor_rulers.cc
parent6ecef52d76f398cb134a94f38d264675270be198 (diff)
Tempo ramps - audio-locked meters have a bbt of 1|1|0
- possibly lots going wrong with this due to multiple occurences of 1|1|0.
Diffstat (limited to 'gtk2_ardour/editor_rulers.cc')
-rw-r--r--gtk2_ardour/editor_rulers.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc
index ca450594e6..067c05f593 100644
--- a/gtk2_ardour/editor_rulers.cc
+++ b/gtk2_ardour/editor_rulers.cc
@@ -1109,11 +1109,15 @@ Editor::compute_bbt_ruler_scale (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
i--;
/* XX ?? */
+ /*
if ((*i).beat >= (*grid.begin()).beat) {
bbt_bars = (*i).bar - (*grid.begin()).bar;
} else {
bbt_bars = (*i).bar - (*grid.begin()).bar;
}
+ */
+ /*XXX totally wrong */
+ bbt_bars = (floor (_session->tempo_map().beat_at_frame (upper)) - floor (_session->tempo_map().beat_at_frame (lower))) / 4;
beats = distance (grid.begin(), grid.end()) - bbt_bars;
@@ -1123,7 +1127,7 @@ Editor::compute_bbt_ruler_scale (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
}
if (bbt_bars > 8192) {
- bbt_ruler_scale = bbt_show_many;
+ bbt_ruler_scale = bbt_show_many;
} else if (bbt_bars > 1024) {
bbt_ruler_scale = bbt_show_64;
} else if (bbt_bars > 256) {