This used to be a distinct kind of drag, but ended up being refactored into
something that happens during a regular drag. Has not been used in quite some time.
This expands significantly the maximum number of Beats that can be represented, which is a good
thing in itself. It slightly speeds up some Beats::operator methods, and slightly slows down
::get_beats() and ::get_ticks().
One minor change in an API user was required, and several tweaks to the unit tests due to the
macros being used by cppunit creating possible type confusion.
Units test pass
Consistently use Tertiary for Group Override on all platforms (and be consistent about it)
Consistently use Primary-mod for Momentary on all platforms (partially reverts 47932f)
Primary modifier is used for fine-adjust on knobs and sliders, with no analogous operation on switches.
The pre-nutemo code used fmod() to calculate the offset into the bar:
`bar_fract = fmod (barbeat, 1.0); // fraction of bar elapsed`
with nutempo, beats start at 1, and the tick offset must also be
taken into account.
The bug was introduced in f67029bd0
PortIndex is sorted by name, and uses port-name as unique identifier.
Ports can be re-named concurrently with processing.
::set_port_name() updates the RCU in the background. The engine
may concurrently process with an old RCU reader value.
In this case valid_port() failed in the process-callback.
and ::get_buffer() returned NULL
We need to delete all existing region views before we redisplay the track. This
was removed as part of an "experimental performance optimization" in 4f7a4cd233
but playlist switching is a rare and non-performance limited operation
is_button2_event() was used to detect the user's desire for a
momentary-click on some buttons (mute, solo, mixer scenes)
is_momentary_push_event() disambiguates this action from is_button2_event()
for the special case of momentary, we can drop the workarounds for
the lack of middle-mouse buttons on Mac, and instead just use
shift+left-click on all platforms.
Note position in samples must be calculated using absolute position
on the timeline. Otherwise the tempo-map is not applied correctly.
Previously this caused issues since the position was first
offset back by _region->position() - time relative to region left
edge - and then the tempo-map was applied.
Another solution identically would be:
(note_start + session_source_start).samples() - _region->position().samples()
When TempoMap::copy_points() is called, the new points are intended to belong
to the (nascent) new map. But the copy constructor for the points leaves the
_map member of a Point unchanged, and so the new points reference the old
map (forever!). ::copy_points() must reset each Point to reference the new map.
Refactored the object that has the _map member, so that we could limit access
to its ::set_map() method to TempoMap.