13
0
Commit Graph

157 Commits

Author SHA1 Message Date
8f147f273a add new debug bit for Temporal grid stuff 2021-08-13 12:51:32 -06:00
7ec5af0b60 libtemporal: fix/improve TempoMap::move_meter() for audio-time case 2021-08-13 12:51:32 -06:00
84f53e3dc9 libtemporal: return value from function 2021-08-13 12:51:32 -06:00
fbb8a562fd libtemporal: fix implementation of TempoMetric::bbt_at() to deal with cases where the beats value is not in quarter notes e.g. 7/8 time 2021-08-13 12:51:32 -06:00
68f6bff258 libtemporal: improve implementation/accuracy of Meter::round_to_bar() 2021-08-13 12:51:32 -06:00
be0a68c610 libtemporal: the TempoMap::_points list serves no purpose, so remove it 2021-08-13 12:51:32 -06:00
261c46e0f7 libtemporal: fix meter/tempo API so that we always put a heap-allocated object in the tempos/meters lists 2021-08-13 12:51:32 -06:00
9a2ec93a74 libtemporal: fix bug with placement of new MeterPoint 2021-08-13 12:51:32 -06:00
8737603d93 libtemporal: add abort_update() API to header 2021-08-13 12:51:32 -06:00
d5bfbe1cf4 libtemporal: provide API to abort TempoMap RCU update step 2021-08-13 12:51:32 -06:00
2c80aab912 libtemporal: do not emit MapChanged from methods that change TempoMap, only when we use RCU to switch ptrs 2021-08-13 12:51:32 -06:00
37399f7d50 libtemporal: move TempoMap::update() into .cc, add debug output and emit relevant signal at end 2021-08-13 12:51:32 -06:00
6a9330b2b0 libtemporal: fix TempoMap::fetch_writable() so that it actually does what its name describes 2021-08-13 12:51:32 -06:00
364fffd458 temporal: TempoMap::Changed is now a static member named TempoMap::MapChanged 2021-08-13 12:51:32 -06:00
657350455e temporal: implement copy operator and operator= for TempoMap 2021-08-13 12:51:32 -06:00
146b432c51 temporal: extend debug output 2021-08-13 12:51:32 -06:00
4b52e1bf23 temporal: slightly reduce overflow risk (see comment) 2021-08-13 12:51:32 -06:00
279d1aa5dc temporal: catch a special case when converting between superclock and beats 2021-08-13 12:51:32 -06:00
016aada4df libtemporal: fix/improve/correct parsing of timecnt_t from string 2021-08-13 12:51:32 -06:00
d165c492af temporal: fix/simplify/improve parsing of time values from strings 2021-08-13 12:51:32 -06:00
e590598dcf libtemporal: move DEBUG::Beats into correct location 2021-08-13 12:51:32 -06:00
f015c08dd9 libtemporal: move Beats operator<< and operator>> to .cc and add exceptions for input 2021-08-13 12:51:32 -06:00
78233b343f libtemporal: add operator<<() for ratio_t 2021-08-13 12:51:32 -06:00
209908f700 libtemporal: improve/fix implementation of timepos_t::operator+=(timepos_t) 2021-08-13 12:51:32 -06:00
9438295607 libtemporal: fix implementation of timecnt_t::operator+ (timecnt_t) 2021-08-13 12:51:32 -06:00
13f4ee2c1e temporal: remove unnecessary TempoMap::dump_locked() method 2021-08-13 12:51:32 -06:00
47aa232f60 temporal: fix up creating/resetting tempo map state via XML 2021-08-13 12:51:32 -06:00
fa67e07d87 temporal: remove debug output 2021-08-13 12:51:32 -06:00
1e9e02e42f temporal: fix setting tempos and meters from XML state 2021-08-13 12:51:32 -06:00
3eac6ac7dc Temporal: remove last (?) double-based method 2021-08-13 12:51:32 -06:00
3e8f4d80fb remove (almost) all floating point operations from Beats, add DoubleableBeats
The latter is a "wrapper" around Beats that provides ::to_double() for those times when we
absolutely need a floating point representation
2021-08-13 12:51:32 -06:00
80986b9445 libtemporal: add (commented) debug output for timepos_t::distance() methods 2021-08-13 12:51:31 -06:00
6fe4394c54 fix parameter name in comment 2021-08-13 12:51:31 -06:00
8c22ade428 libtemporal: fix Beats::round_to_subdivision() 2021-08-13 12:51:31 -06:00
0fa56402be move DEBUG::SnapBBT into libtemporal 2021-08-13 12:51:31 -06:00
df0ac42f54 Temporal: cleanup for explicit Beats::operator bool() 2021-08-13 12:51:31 -06:00
05740e7069 Temporal: mark Beats::operator bool() as explicit, to avoid unintended/accidental use when implicitly casting to int/float types 2021-08-13 12:51:31 -06:00
5e0cf747bb Temporal: removed unused std::numeric_limits<> definitions for timeline types
There can be no single ::max() or ::min() value for these types because the time domain matters. With a given
tempo map, a certain beat value represent a time before or after the maximum possible audio domain value
2021-08-13 12:51:31 -06:00
de3eb54958 Temporal: in an update to the previous commit, actually remove timepos_t::compute_ticks() rather than claim to implement it 2021-08-13 12:51:31 -06:00
400018e121 Temporal: implement timepos_t::compute_ticks() 2021-08-13 12:51:31 -06:00
0ce40fc648 Temporal: fix timepos_t (Beats) constructor
flag bit was set incorrectly
2021-08-13 12:51:31 -06:00
747281a244 Temporal: fix implementation of timecnt_t::operator= (timecnt_t const &)
It is OK now to have inconsistent time domains inside a timecnt_t
2021-08-13 12:51:31 -06:00
3900537fcf split Beats::round_to_subdivision() into source module
Rounding to bar requires access to the tempo map, and we don't want this in
the beats.h header
2021-08-13 12:51:31 -06:00
5bef968069 Temporal: replace thread_local sample rate with callback to get sample rate 2021-08-13 12:51:31 -06:00
6e9f57d2ad Temporal: remove scope braces left over from when we used a lock to protect the tempo map 2021-08-13 12:51:31 -06:00
b6f2e39ed4 Temporal: remove BarTime 2021-08-13 12:51:31 -06:00
5987376afc Temporal: avoid recursive descent in TempoMap::quarters_at (timepos_t) 2021-08-13 12:51:31 -06:00
43d84620e0 Temporal: clean up API to remove ambiguity about ::quarter*_at_*
superclock_t and samplepos_t have the same underlying C++ type, so methods that accept one or the
other as an argument need to be named to make it clear which type they accept. We do not need
the superclock_t variant publically, but it turns out to be useful within TempoMap.
2021-08-13 12:51:31 -06:00
bed76798f3 manual fixups after rebase against master (general libs edition) 2021-08-13 12:51:31 -06:00
afea443419 remove API from Temporal:timecnt_t that used superclock_t
Not possible for a compiler to differentiate superclock_t and sample(pos|cnt)_t, which can lead to
subtle but major errors
2021-08-13 12:51:31 -06:00