These were being drawn in a way that failed to really convey relative
tempos very well. This is now better, though perhaps there are other
improvements possible
Draw regular tempo/meter markers for BBT markers, and move them when BBT marker is dragged
This will (does) allow regular editing workflow for the tempo/meter at at BBT marker
the API now provides the option to call ::get_grid() with an iterator which may
be re-used on subsequent calls. This avoids unbounded O(N) "walks" from the
marker preceding the start point of the grid to the start point.
This commit also includes "fast-path" code for the common case of a single
tempo and single meter
This fixes several callsites that were passing samplepos_t to get a TempoMetric,
some of them somewhat significant (e.g. VST plugins that want tempo information).
Bad API design on my part, apologies.
This commit combines libs/ and gtk2_ardour because the new private status
of the ::metric_at() call would be a blocking point for git bisect
Old code use the TempoMetric (Tempo + Meter) in effect at the old
location of the tempo/meter to compute the position of the edited tempo/meter,
using a BBT time from the dialog.
But this TempoMetric uses the very tempo/meter that we're editing!
So we have to use previous_tempo() or previous_meter() to construct
the relevant TempoMetric, and if it is the first tempo or meter, then
obviously it cannot move position at all.
Use the new map that is being edited for lookups while changing
the map in the in the GUI. This can changes directly visible
as the map is being edited.
This used to be done directly with the fetch_writable() API
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
Tempo Map updates can change a region's position/length, in which case
region-automation may follow the region, and DiskReader:: playlist_ranges_moved
will save additional undo information.
These MementoCommand(s) need to be included in the undo operation.
When a tempo map change originates from a drag, we know the required redraws have
already been done. Use a new bool member, ignore_map_change, to tell the Editor
to ignore the map change signal. For all other map changes, do the full reset.