Commit graph

32709 commits

Author SHA1 Message Date
Paul Davis
4c6d6b14e5 Temporal: add new TempoMap implementation source 2021-08-13 12:51:28 -06:00
Paul Davis
f42bd3fe47 add per-thread sample rate variable and libardour method to update it 2021-08-13 12:51:28 -06:00
Paul Davis
1f0d9159a7 Temporal: use, don't fetch tempo map pointer 2021-08-13 12:51:28 -06:00
Paul Davis
8ec81c2308 Temporal: correctly construct return timepos_t for * and / 2021-08-13 12:51:28 -06:00
Paul Davis
e89d727939 Temporal: remove the final #warning from timeline.cc 2021-08-13 12:51:28 -06:00
Paul Davis
b87c855240 Temporal: add string_to/to_string methods for timecnt_t 2021-08-13 12:51:28 -06:00
Paul Davis
974196b7d2 Temporal: add timeline.cc 2021-08-13 12:51:28 -06:00
Paul Davis
5a0969a5c2 Temporal: remove last bit of floating point API from timepos_t 2021-08-13 12:51:28 -06:00
Paul Davis
9fe9658e8a Temporal: add clarifying comment 2021-08-13 12:51:28 -06:00
Paul Davis
ead17ed35c Temporal: add ratio_t type (currently boost::rational<int64_T> 2021-08-13 12:51:28 -06:00
Paul Davis
b1271a491e Temporal: add TempoMap::use() which returns the per-thread ptr-to-tempo-map without updating the pointer 2021-08-13 12:51:28 -06:00
Paul Davis
7446de72b1 Temporal: improve timepos_t::distance() implementations 2021-08-13 12:51:28 -06:00
Paul Davis
2c69a1425f Temporal: fundamental changes to get timeline.cc to compile 2021-08-13 12:51:28 -06:00
Paul Davis
35d0519109 make superclock_t signed, to match signedness of int62_t 2021-08-13 12:51:28 -06:00
Paul Davis
709df7a08f add operators for self-typed arithmetic 2021-08-13 12:51:28 -06:00
Paul Davis
cb78984c63 add new int62.h header, which implements a generic 62bit-int-plus-flagbit type 2021-08-13 12:51:28 -06:00
Paul Davis
f4490f54c5 change Timecode::BBT_Time to use Temporal namespace, plus a couple of other minor changes to enable compilation
This still uses the tempo map object in libs/ardour, not the new one in libs/temporal, and isn't likely to be functional
(though it could be)
2021-08-13 12:51:28 -06:00
Paul Davis
9abf90c9d5 add the new timepos_t/timecnt_t header 2021-08-13 12:51:28 -06:00
Paul Davis
a80960468d first pass at integrating nutempo v1 with new 64 bit superclock/ticks representation
This compiles libtemporal, but nothing more
2021-08-13 12:51:28 -06:00
Paul Davis
e0b5b12129 basic work on a Tempo object that avoids (almost) all floating point arithmetic
Basic conversions between superclock and Beats are provided
2021-08-13 12:51:28 -06:00
Paul Davis
4c4e4e545a remove unnecessary file/tool 2021-08-13 12:51:28 -06:00
Paul Davis
c043156089 new header with an efficient implementation of integer division-rounding-to-nearest 2021-08-13 12:51:28 -06:00
Paul Davis
f245992186 updated Temporal::Beats ... scripts edition 2021-08-13 12:51:28 -06:00
Paul Davis
0a469527f1 updated Temporal::Beats ... GUI edition 2021-08-13 12:51:28 -06:00
Paul Davis
4dc048b28a update Temporal::Beats to merge master/nutempo versions, notably with private from-double constructor
This is the libraries-only edition. It still features liberal use of Beats::from_double() but this is now
explicit and will be easier to locate the calls and remove them. Several classes that were using
Beats::to_double() have been (temporarily) made friends of Beats to allow them to keep using it,
pending the much more widespread redesigns of several structures. Once this is done, the friend
relationships can (mostly) be removed. It is expected the ARDOUR::Variant will need to continue
as a friend because it is used to pass beat counts to LV2 as doubles
2021-08-13 12:51:28 -06:00
Paul Davis
ecf2028c7a Revert "NO-OP: code formatting and cleanup, thanks clang-format"
Widespread minor changes cause conflicts when rebasing nutempo2; will
reapply formatting later.

This reverts commit 548db7a9a4.
2021-08-13 12:51:28 -06:00
Paul Davis
32b77f549f fix marker positions after an aborted ripple drag 2021-08-13 12:51:28 -06:00
Paul Davis
23aa663f9d when doing a ripple-all drag, move relevant markers during the drag too
Note that this is purely GUI-level: the ARDOUR::Locations are changed at the end of the drag
in Editor::ripple_marks()
2021-08-13 12:51:28 -06:00
Paul Davis
140c5e818f somewhat simplify ripple-all by just grabbing all regions-at-or-after as the drag starts.
This means that we actually explicitly reposition all regions as part of the drag, and do not need to call
Editor::do_ripple(). We do still need to call Editor::ripple_marks() though
2021-08-13 12:51:28 -06:00
Paul Davis
7afc45ac5c helpful comment 2021-08-13 12:51:28 -06:00
Paul Davis
12b536d8f2 add API to fetch all regionviews after a given position 2021-08-13 12:51:28 -06:00
Paul Davis
a1ef870866 prevent ripple drag from passing earlier region starts 2021-08-13 12:51:28 -06:00
Paul Davis
068cace22c fix semantics of Playlist::find_prev_region_start() 2021-08-13 12:51:28 -06:00
Paul Davis
311db08cc3 manual fixups for rebase-on-master issues 2021-08-13 12:51:28 -06:00
Paul Davis
a95b1d2cd1 for RegionMotionDrag, set _earliest_time_limit if rippling (not yet used) 2021-08-13 12:51:28 -06:00
Paul Davis
7e3b22e519 add Playlist::find_prev_region_start() 2021-08-13 12:51:27 -06:00
Paul Davis
b04ea33f18 move Drag::_earliest_time_limit to be protected, not private 2021-08-13 12:51:27 -06:00
Paul Davis
fbd6c7eaee add earliest_time_limit for Drag class 2021-08-13 12:51:27 -06:00
Paul Davis
ac1d5bac0a improve rippling of marks to include any in the gap between the primary-dragged region and the one before it 2021-08-13 12:51:27 -06:00
Paul Davis
fc5143772b fix deadlock-inducing failure-to-thaw during region drag (no copy) 2021-08-13 12:51:27 -06:00
Paul Davis
1ccf272d58 ripple-all now moves markers too 2021-08-13 12:51:27 -06:00
Paul Davis
0b06c4dc2b manually fix rebase error 2021-08-13 12:51:27 -06:00
Paul Davis
3ab65dc62d keep session range correct when rippling markers 2021-08-13 12:51:27 -06:00
Paul Davis
78a9e29507 fix deadlock and direction error in Locations::ripple() 2021-08-13 12:51:27 -06:00
Paul Davis
ddbe0747a9 add whitespace 2021-08-13 12:51:27 -06:00
Paul Davis
93982614c4 remove debug output 2021-08-13 12:51:27 -06:00
Paul Davis
ff85496b03 we should clear property changes recursively for a region drag, not just toplevel properties 2021-08-13 12:51:27 -06:00
Paul Davis
989408626d at end of no-copy region drag, do ripple if appropriate 2021-08-13 12:51:27 -06:00
Paul Davis
6896f7228d fill ripple-excluded region container (non-copy drag) 2021-08-13 12:51:27 -06:00
Paul Davis
4a1d09d474 determine potential ripple range for non-copy drag 2021-08-13 12:51:27 -06:00