diff options
-rw-r--r-- | gtk2_ardour/tempo_lines.cc | 6 | ||||
-rw-r--r-- | libs/ardour/ardour/tempo.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/gtk2_ardour/tempo_lines.cc b/gtk2_ardour/tempo_lines.cc index 7a5be311ed..6bc0e435c5 100644 --- a/gtk2_ardour/tempo_lines.cc +++ b/gtk2_ardour/tempo_lines.cc @@ -76,7 +76,7 @@ TempoLines::draw_ticks (std::vector<ARDOUR::TempoMap::BBTPoint>& grid, framepos_t f = 0; if (grid.begin()->c != 0.0) { - const double pulses_per_div = l * (grid.begin()->tempo.note_type() / grid.begin()->meter->note_divisor()) / (double) divisions; + const double pulses_per_div = l * (grid.begin()->tempo.note_type() / grid.begin()->meter.note_divisor()) / (double) divisions; const double time_at_pulse = log (((grid.begin()->c * (pulses_per_div / grid.begin()->tempo.note_type())) / 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); @@ -86,6 +86,7 @@ TempoLines::draw_ticks (std::vector<ARDOUR::TempoMap::BBTPoint>& grid, } if (f > leftmost_frame) { + lines.add (PublicEditor::instance().sample_to_pixel_unrounded (f), 1.0, c); } } @@ -151,8 +152,7 @@ TempoLines::draw (std::vector<ARDOUR::TempoMap::BBTPoint>& grid, /* draw subdivisions of this beat */ std::vector<ARDOUR::TempoMap::BBTPoint> vec; vec.push_back (*i); - - draw_ticks(vec, divisions, leftmost_frame, frame_rate); + draw_ticks (vec, divisions, leftmost_frame, frame_rate); } } } diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h index 18c256695e..35bc7295bf 100644 --- a/libs/ardour/ardour/tempo.h +++ b/libs/ardour/ardour/tempo.h @@ -303,7 +303,7 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible struct BBTPoint { framepos_t frame; - const MeterSection* meter; + Meter meter; Tempo tempo; double c; uint32_t bar; @@ -311,7 +311,7 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible BBTPoint (const MeterSection& m, const Tempo& t, framepos_t f, uint32_t b, uint32_t e, double func_c) - : frame (f), meter (&m), tempo (t.beats_per_minute(), t.note_type()), c (func_c), bar (b), beat (e) {} + : frame (f), meter (m.note_divisor(), m.divisions_per_bar()), tempo (t.beats_per_minute(), t.note_type()), c (func_c), bar (b), beat (e) {} Timecode::BBT_Time bbt() const { return Timecode::BBT_Time (bar, beat, 0); } operator Timecode::BBT_Time() const { return bbt(); } |