13
0
Commit Graph

331 Commits

Author SHA1 Message Date
cd34695944 fix TempoMap::quarters_at_superclock (superclock_t) 2021-08-13 12:51:35 -06:00
74ff3b22b8 fix TempoPoint::superclock_at(Beats) 2021-08-13 12:51:35 -06:00
216945a89c move TempoMap::write_copy() into .cc file instead of .h 2021-08-13 12:51:35 -06:00
ce3fb0507c change return type of Tempo::set_{ramped,clamped} and fix call sites 2021-08-13 12:51:35 -06:00
99c8c0b658 initial, tentative, untested implementation of TempoMap::remove_time() 2021-08-13 12:51:35 -06:00
991a7bf8a7 add TempoMap::count_bars() to allow bar counting even with position (BBT) markers in the tempo map
This just reuses the algorithm in TempoMap::get_grid() by asking for just the bar grid, and counting the
size of the result
2021-08-13 12:51:35 -06:00
0ab2308523 reimplement TempoMap::midi_clock_beat_at_or_after() 2021-08-13 12:51:35 -06:00
daad7b74ae libtemporal: rename TempoMap::full_duration_at() to ::convert_duration() and reorder parameters 2021-08-13 12:51:34 -06:00
7773fc5b64 libtemporal: TempoMap::full_duration_at() returns correct value for unchanged time domain call 2021-08-13 12:51:34 -06:00
b7bc3b1947 libtemporal: expand comment to explain more about what TempoMap::full_duration_at() does 2021-08-13 12:51:34 -06:00
beaa1b3fcb be sure to check the return from the RCU mgr ::update method() inside TempoMap::update() 2021-08-13 12:51:34 -06:00
bbb3ca01fa libtemporal: remove several BBT-related methods that are not used and problematic for BBT/position markers 2021-08-13 12:51:34 -06:00
0667a50a11 libtemporal: improve TempoMap::get_grid()'s decision making about what bar points to include when bar_mod == 1 2021-08-13 12:51:34 -06:00
a49ed5505e libtemporal: no need for a default MusicTimePoint in the tempo map (default tempo+meter points serve same role) 2021-08-13 12:51:34 -06:00
34a3db7eaa use existing (inline) method for updating thread local tempo map after update (avoid code duplication) 2021-08-13 12:51:34 -06:00
901f593af5 avoid unnecessary extra fetch of thread-local tempo map after undo/redo 2021-08-13 12:51:34 -06:00
cffc25a11c libtemporal: make TempoMap::metric_at() variants use all Points, to account for music time points as well as explicit tempo/meter points 2021-08-13 12:51:34 -06:00
c2401c3097 libtemporal: redesign TempoMap::get_grid() to iterate over _points rather than separated _tempos and _meters 2021-08-13 12:51:34 -06:00
8124bec5a1 libtemporal: fix XML node structure for MusicTimePoint 2021-08-13 12:51:34 -06:00
1035f9bd62 libtemporal: fix crash caused by thinko 2021-08-13 12:51:34 -06:00
388fa1b894 libtemporal: when removing tempos/meters/musictime points, remove them from TempoMap::_points also 2021-08-13 12:51:34 -06:00
982ccec7ab libtemporal: when adding tempos/meters/musictime points, add them to TempoMap::_points also 2021-08-13 12:51:34 -06:00
b43eca15b0 Revert "libtemporal: the TempoMap::_points list serves no purpose, so remove it"
This reverts commit edc93fc62b6a36949b3cc37aee333904bc6b97f0.
2021-08-13 12:51:34 -06:00
d6d0eb0d9e libtemporal: MusicTimePoint now IS-A Point,Tempo and Meter, all at once 2021-08-13 12:51:34 -06:00
ffc9ab66b5 libtemporal: remove TempoMap::metric_at_locked() methods
There is no lock anymore, all modifications are done via RCU
2021-08-13 12:51:33 -06:00
c9d3381935 libtemporal: increase DEBUG_TRACE utility for ::get_grid() and related matters 2021-08-13 12:51:33 -06:00
bd1b6dcda3 libtemporal: start making tempo map work with non-monotonic BBT "bar times" present 2021-08-13 12:51:33 -06:00
97a3469972 use new Tempo API in two places where Tempo is explicitly constructed 2021-08-13 12:51:33 -06:00
c32de2355e extra DEBUG_TRACE statement in tempo map grid computation 2021-08-13 12:51:33 -06:00
eccfc1db10 libtemporal: fix grid generation if we pass additional markers before reaching the end 2021-08-13 12:51:32 -06:00
3017cd0c1f libtemporal: remove unnecessary debug output 2021-08-13 12:51:32 -06:00
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
7f19f13ea9 libtemporal: superclocks_per_bar/grid() do not need a sample rate argument, so remove it 2021-08-13 12:51:32 -06:00
e187752771 libtemporal: use DEBUG::Grid inside TempoMap::get_grid() for slightly easier debugging 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
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
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
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
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
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
9402548677 Temporal: add lots more DEBUG::TemporalMap output to tempo.cc 2021-08-13 12:51:31 -06:00
793579cf3f Temporal: expand displayed info for Tempo's operator<< 2021-08-13 12:51:31 -06:00
a0b9030e3c Temporal: fix logic during ::get_grid that ignored if rounding did nothing 2021-08-13 12:51:31 -06:00
f1bb135013 Temporal: fix computation of ::quarters_at() 2021-08-13 12:51:31 -06:00
c3d325b56a Temporal: clean up API for timepos_t to remove unneeded duplicates and remove ambiguity 2021-08-13 12:51:31 -06:00
f8a0ba246c move superclock_ticks_per_second declaration 2021-08-13 12:51:30 -06:00
02b98290c5 set uninitialized _time_domain member of TempoMap in constructor 2021-08-13 12:51:30 -06:00
8dbbc1df54 library changes to get libtemporal setup at application startup 2021-08-13 12:51:30 -06:00
49781e3b80 nominally fix up TempoMarkerDrag implementation for new TempoMap 2021-08-13 12:51:30 -06:00
cfac6ad254 comment code added in previous commit 2021-08-13 12:51:30 -06:00
44ff395ec8 move tempo map memento binder into .cc and actuall implement the RCU version 2021-08-13 12:51:30 -06:00
60d1c5f722 remove tempo map from Session 2021-08-13 12:51:30 -06:00
9f866a6bbe consolidate some TempoMap modifier methods 2021-08-13 12:51:30 -06:00
c434289973 remove lock, _dirty and _generation nonsense from TempoMap (pre-RCU management) 2021-08-13 12:51:30 -06:00
1098b27b35 new tempo map API for almost all of the GUI now 2021-08-13 12:51:30 -06:00
e7d84a7c47 get further at runtime 2021-08-13 12:51:29 -06:00
534c08074d changes to get program to actually run (missing symbols)
Still crashes at startup due to static initialization of initial tempo map.
2021-08-13 12:51:29 -06:00
f67029bd02 random commit to facilitate trivial move of work from laptop back to main system 2021-08-13 12:51:29 -06:00
bca8e2e8cc libtemporal: changes derived from converting libardour 2021-08-13 12:51:28 -06:00
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
f5fad809fb Temporal: add decl for thread-local tempo map pointer 2021-08-13 12:51:28 -06:00
4c6d6b14e5 Temporal: add new TempoMap implementation source 2021-08-13 12:51:28 -06:00