Commit graph

56 commits

Author SHA1 Message Date
Paul Davis
c9d3381935 libtemporal: increase DEBUG_TRACE utility for ::get_grid() and related matters 2021-08-13 12:51:33 -06:00
Paul Davis
bd1b6dcda3 libtemporal: start making tempo map work with non-monotonic BBT "bar times" present 2021-08-13 12:51:33 -06:00
Paul Davis
97a3469972 use new Tempo API in two places where Tempo is explicitly constructed 2021-08-13 12:51:33 -06:00
Paul Davis
c32de2355e extra DEBUG_TRACE statement in tempo map grid computation 2021-08-13 12:51:33 -06:00
Paul Davis
eccfc1db10 libtemporal: fix grid generation if we pass additional markers before reaching the end 2021-08-13 12:51:32 -06:00
Paul Davis
3017cd0c1f libtemporal: remove unnecessary debug output 2021-08-13 12:51:32 -06:00
Paul Davis
a9bf1cff81 libtemporal: add and use TempoMap::superclocks_per_grid_at() to return superclock duration of a measure/bar division. This corrects the results of ::get_grid() 2021-08-13 12:51:32 -06:00
Paul Davis
7f19f13ea9 libtemporal: superclocks_per_bar/grid() do not need a sample rate argument, so remove it 2021-08-13 12:51:32 -06:00
Paul Davis
e187752771 libtemporal: use DEBUG::Grid inside TempoMap::get_grid() for slightly easier debugging 2021-08-13 12:51:32 -06:00
Paul Davis
7ec5af0b60 libtemporal: fix/improve TempoMap::move_meter() for audio-time case 2021-08-13 12:51:32 -06:00
Paul Davis
84f53e3dc9 libtemporal: return value from function 2021-08-13 12:51:32 -06:00
Paul Davis
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
Paul Davis
68f6bff258 libtemporal: improve implementation/accuracy of Meter::round_to_bar() 2021-08-13 12:51:32 -06:00
Paul Davis
be0a68c610 libtemporal: the TempoMap::_points list serves no purpose, so remove it 2021-08-13 12:51:32 -06:00
Paul Davis
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
Paul Davis
9a2ec93a74 libtemporal: fix bug with placement of new MeterPoint 2021-08-13 12:51:32 -06:00
Paul Davis
d5bfbe1cf4 libtemporal: provide API to abort TempoMap RCU update step 2021-08-13 12:51:32 -06:00
Paul Davis
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
Paul Davis
37399f7d50 libtemporal: move TempoMap::update() into .cc, add debug output and emit relevant signal at end 2021-08-13 12:51:32 -06:00
Paul Davis
364fffd458 temporal: TempoMap::Changed is now a static member named TempoMap::MapChanged 2021-08-13 12:51:32 -06:00
Paul Davis
657350455e temporal: implement copy operator and operator= for TempoMap 2021-08-13 12:51:32 -06:00
Paul Davis
146b432c51 temporal: extend debug output 2021-08-13 12:51:32 -06:00
Paul Davis
4b52e1bf23 temporal: slightly reduce overflow risk (see comment) 2021-08-13 12:51:32 -06:00
Paul Davis
279d1aa5dc temporal: catch a special case when converting between superclock and beats 2021-08-13 12:51:32 -06:00
Paul Davis
13f4ee2c1e temporal: remove unnecessary TempoMap::dump_locked() method 2021-08-13 12:51:32 -06:00
Paul Davis
47aa232f60 temporal: fix up creating/resetting tempo map state via XML 2021-08-13 12:51:32 -06:00
Paul Davis
fa67e07d87 temporal: remove debug output 2021-08-13 12:51:32 -06:00
Paul Davis
1e9e02e42f temporal: fix setting tempos and meters from XML state 2021-08-13 12:51:32 -06:00
Paul Davis
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
Paul Davis
5bef968069 Temporal: replace thread_local sample rate with callback to get sample rate 2021-08-13 12:51:31 -06:00
Paul Davis
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
Paul Davis
b6f2e39ed4 Temporal: remove BarTime 2021-08-13 12:51:31 -06:00
Paul Davis
5987376afc Temporal: avoid recursive descent in TempoMap::quarters_at (timepos_t) 2021-08-13 12:51:31 -06:00
Paul Davis
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
Paul Davis
9402548677 Temporal: add lots more DEBUG::TemporalMap output to tempo.cc 2021-08-13 12:51:31 -06:00
Paul Davis
793579cf3f Temporal: expand displayed info for Tempo's operator<< 2021-08-13 12:51:31 -06:00
Paul Davis
a0b9030e3c Temporal: fix logic during ::get_grid that ignored if rounding did nothing 2021-08-13 12:51:31 -06:00
Paul Davis
f1bb135013 Temporal: fix computation of ::quarters_at() 2021-08-13 12:51:31 -06:00
Paul Davis
c3d325b56a Temporal: clean up API for timepos_t to remove unneeded duplicates and remove ambiguity 2021-08-13 12:51:31 -06:00
Paul Davis
f8a0ba246c move superclock_ticks_per_second declaration 2021-08-13 12:51:30 -06:00
Paul Davis
02b98290c5 set uninitialized _time_domain member of TempoMap in constructor 2021-08-13 12:51:30 -06:00
Paul Davis
8dbbc1df54 library changes to get libtemporal setup at application startup 2021-08-13 12:51:30 -06:00
Paul Davis
49781e3b80 nominally fix up TempoMarkerDrag implementation for new TempoMap 2021-08-13 12:51:30 -06:00
Paul Davis
cfac6ad254 comment code added in previous commit 2021-08-13 12:51:30 -06:00
Paul Davis
44ff395ec8 move tempo map memento binder into .cc and actuall implement the RCU version 2021-08-13 12:51:30 -06:00
Paul Davis
60d1c5f722 remove tempo map from Session 2021-08-13 12:51:30 -06:00
Paul Davis
9f866a6bbe consolidate some TempoMap modifier methods 2021-08-13 12:51:30 -06:00
Paul Davis
c434289973 remove lock, _dirty and _generation nonsense from TempoMap (pre-RCU management) 2021-08-13 12:51:30 -06:00
Paul Davis
1098b27b35 new tempo map API for almost all of the GUI now 2021-08-13 12:51:30 -06:00
Paul Davis
e7d84a7c47 get further at runtime 2021-08-13 12:51:29 -06:00