diff options
author | nick_m <mainsbridge@gmail.com> | 2015-12-20 04:41:45 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2016-05-27 23:38:09 +1000 |
commit | 7fc3b0c34c552d7be862897bd0aaa542453e9973 (patch) | |
tree | 35898328a86aefec5ac18a00c56c8577f4779d1f /gtk2_ardour/tempo_lines.h | |
parent | 94187e66a2ae2bc2ab082ef614c25b35ec0d5e24 (diff) |
Initial stab at tempo ramps.
Replaces the list of points in TempoMap with TempoSection functions, which
compute tempo-at or tick-at time relative to tempo section start.
TempoMap consults them additively to determine things like bbt_time(),
frame_time() get_grid() etc.
This has a marked effect on scrolling speed along with the code simplification
in the places it has been attempted.
Several things are broken here.
Currently every ramp except the last one is an exponential ramp. this may
be simple to fix :).
Mouse-over midi grid doesn't match mouse click grid. should also be simple.
Many things seem to work, but their accuracy should be in question until
each area has been addressed.
Diffstat (limited to 'gtk2_ardour/tempo_lines.h')
-rw-r--r-- | gtk2_ardour/tempo_lines.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gtk2_ardour/tempo_lines.h b/gtk2_ardour/tempo_lines.h index 6d40a2d1a7..7096028981 100644 --- a/gtk2_ardour/tempo_lines.h +++ b/gtk2_ardour/tempo_lines.h @@ -29,9 +29,8 @@ public: void tempo_map_changed(); - void draw (const ARDOUR::TempoMap::BBTPointList::const_iterator& begin, - const ARDOUR::TempoMap::BBTPointList::const_iterator& end, - unsigned divisions, + void draw (std::vector<ARDOUR::TempoMap::BBTPoint>& grid, + unsigned divisions, ARDOUR::framecnt_t leftmost_frame, ARDOUR::framecnt_t frame_rate); @@ -39,8 +38,8 @@ public: void hide(); private: - void draw_ticks (const ARDOUR::TempoMap::BBTPointList::const_iterator& b, - unsigned divisions, + void draw_ticks (std::vector<ARDOUR::TempoMap::BBTPoint>& grid, + unsigned divisions, ARDOUR::framecnt_t leftmost_frame, ARDOUR::framecnt_t frame_rate); |