Commit graph

619 commits

Author SHA1 Message Date
Paul Davis
cdab3a5e8f fix a bunch of missing symbols related to temporal 2021-08-13 12:51:29 -06:00
Paul Davis
749a49c278 incorporating new tempo map API 2021-08-13 12:51:29 -06:00
Paul Davis
f67029bd02 random commit to facilitate trivial move of work from laptop back to main system 2021-08-13 12:51:29 -06:00
Paul Davis
768ce21d9f Temporal: new files, likely to be removed in the final version 2021-08-13 12:51:29 -06:00
Paul Davis
b5c945e211 Temporal: another useful static method 2021-08-13 12:51:29 -06:00
Paul Davis
8fb70885ec changes needed to get audio_clock.cc to work 2021-08-13 12:51:29 -06:00
Paul Davis
169bbf3b08 temporal: more API tweaks as conversions continue in libardour 2021-08-13 12:51:29 -06:00
Paul Davis
bca8e2e8cc libtemporal: changes derived from converting libardour 2021-08-13 12:51:28 -06:00
Paul Davis
e111123b54 Temporal: fix test2.cc now that operator int64_t is private 2021-08-13 12:51:28 -06:00
Paul Davis
ddac0f7651 Temporal: what was that comment about not being able to disambiguate samples and superclocks? 2021-08-13 12:51:28 -06:00
Paul Davis
f06e2dd6d1 Temporal: remove constructors accepting scalar values from timepos_t/timecnt_t and force use of factory methods
This allows us to differentiate between superclock_t and samplepos_t (and related types) which are all typedef'ed to the
same underlying primitive C++ type. Without this, it would be impossible for the compiler or someone reading the code
to know whether a scalar passed to a constructor for a timeline type is in units of samples or superclocks
2021-08-13 12:51:28 -06:00
Paul Davis
c75fc64306 Temporal: various changes to int62_t and timeline types based on code review 2021-08-13 12:51:28 -06:00
Paul Davis
c192c49b65 Temporal: add std::numeric_limits<> for timecnt_t and comment on these in general 2021-08-13 12:51:28 -06:00
Paul Davis
c04b9c2429 Temporal: add Range class from nutempo v1
This will replace Evoral::Range which unfathomably was implemented with inclusive bounds
2021-08-13 12:51:28 -06:00
Paul Davis
b5bf518a0a Temporal: fixes, changes, redesigns, extensions to be able to compile ARDOUR::Region with timepos_t/timecnt_t members 2021-08-13 12:51:28 -06:00
Paul Davis
5285151d08 Temporal: alter which tests are run by test2 2021-08-13 12:51:28 -06:00
Paul Davis
88cf07daa6 Temporal: add standalone compile instruction for test2.cc 2021-08-13 12:51:28 -06:00
Paul Davis
3beffbd3ee Temporal: add test program to evaluate performance of various ways of using int64_t atomically 2021-08-13 12:51:28 -06:00
Paul Davis
56795a97a3 changes required to get ardour to start up (missing vars, incorrect values) 2021-08-13 12:51:28 -06:00
Paul Davis
f5fad809fb Temporal: add decl for thread-local tempo map pointer 2021-08-13 12:51:28 -06:00
Paul Davis
d47d462182 Temporal: add debug bits declaration 2021-08-13 12:51:28 -06:00
Paul Davis
b0a732e636 Temporal: extend timecnt_t API to provide samples() method, using thread-local sample rate 2021-08-13 12:51:28 -06:00
Paul Davis
791e76290d Temporal: extend timepos_t API to provide samples() method, using thread-local sample rate 2021-08-13 12:51:28 -06:00
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
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
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
617fcd660c add operator% and operator%= to Temporal::Beats (taken from nutempo) 2021-08-13 12:51:27 -06:00
Paul Davis
c41c622b37 another BBT comparator fix 2021-08-13 12:51:26 -06:00
Paul Davis
be831c6870 fix logic error in BBT_Time::operator>= 2021-08-13 12:51:26 -06:00
Hector Martin
4b9e46f11d Fix normalization in Temporal::Beats for times between -1 and 0 beats
Also fix normalization of times with negative beats and positive ticks
2020-11-18 13:40:31 -07:00
John Emmas
754f9bba0c Further change needed for 'libtemporal' 2020-05-29 12:28:13 +01:00
John Emmas
1d23e18efe Initial vcproj changes for building Ardour6 / Mixbus6 with MSVC 2020-05-29 08:33:33 +01:00
Paul Davis
70e27e0bf2 fix Beats::operator-() 2020-04-16 21:38:33 -06:00
Robin Gareus
bca825e515
NO-OP: whitespace 2020-01-14 00:52:24 +01:00