Commit graph

286 commits

Author SHA1 Message Date
John Emmas
d7d966e02b Adapt 'Temporal::TempoMap::tempo_map_p' to be buildable with MSVC
Whenever a variable gets declared using 'thread_local' MSVC requires that it should not be compiled with DLL linkage (i.e. it mustn't be exportable). So for Temporal::TempoMap we'll need to export the required members individually, rather than exporting the entire class.
2021-09-03 10:02:41 +01:00
Paul Davis
7dba843cb4 temporal: fix error in operator>> for BBT_offset 2021-08-31 22:33:33 -06:00
Paul Davis
4eda53c8c9 temporal: add to_string() converters for BBT_Offset 2021-08-31 16:45:44 -06:00
Nil Geisweiller
21c94b23f3 Make BBT_Time::print_padded const
As this method does not modify BBT_Time it can be const.  This allows such
method to be called over a const BBT_Time instance.
2021-08-30 02:24:38 +03:00
John Emmas
d3cd621f7a Initial changes needed for building libtemporal with MSVC
Later I'll need to push some extra changes (to support 'tempo_map_p' and 'boost::intrusive::list' etc) but these initial ones (hopefully!) won't cause any issues for the other builds.
2021-08-29 11:03:58 +01:00
Paul Davis
fee4292bde allow negative superclock -> negative beats computation 2021-08-23 11:36:54 -06:00
Paul Davis
2f4a623c56 remove unnecessary headers 2021-08-13 15:31:43 -06:00
Paul Davis
9c2e4ec6d2 libtemporal: fix timepos_t::set_time_domain()
For legacy reasons, this was going via a sample intermediate representation
2021-08-13 12:51:36 -06:00
Paul Davis
1927e4673b remove StepSequencer, BeatBox and BeatBoxGUI from wscripts and #ifdef code occurences. Files remain 2021-08-13 12:51:36 -06:00
Paul Davis
e7cdca1ea2 remove some debug output 2021-08-13 12:51:36 -06:00
Paul Davis
caba355012 Add required copy constructor for Temporal::Meter 2021-08-13 12:51:35 -06:00
Paul Davis
38aa2560f3 libtemporal: remove unnecessary initialization 2021-08-13 12:51:35 -06:00
Paul Davis
f61adcd738 temporal: knarly template code to consolidate and rationalize duplicated methods 2021-08-13 12:51:35 -06:00
Paul Davis
585346ce56 libtemporal: fix many different issues with tempo ramps
API changes, ensuring omega is computed, saved, and restored, generic methods to get tempo/meter at a position, and lots more
2021-08-13 12:51:35 -06:00
Paul Davis
3256350ef8 libtemporal: needs "OSX" pseudo-lib to pick up required macOS flags 2021-08-13 12:51:35 -06:00
Paul Davis
5895909188 libtemporal: remove unnecessary inclusion of pbd/compose.h from beats.h
this causes breakage in clangs ADL lookup of various operator<<() overloads
2021-08-13 12:51:35 -06:00
Paul Davis
3170f880c2 stop clang from complaining about a missing return after a guaranteed assert() failure 2021-08-13 12:51:35 -06:00
Paul Davis
f721655916 libtemporal: to quote the matrix, there is no lock 2021-08-13 12:51:35 -06:00
Paul Davis
bccdc95f32 libtemporal: fix logic for ::get_tempo_and_meter() if starting point is the timeline start 2021-08-13 12:51:35 -06:00
Paul Davis
1f8290f154 generalize repeated code into a template method, add lots of const-ness to facilitate this 2021-08-13 12:51:35 -06:00
Paul Davis
c5ecd14622 temporal: fix logic errors in setting up TempoMetric objects
will likely revisit this to avoid code-duplication and "optimize" traversal of _points list
2021-08-13 12:51:35 -06:00
Paul Davis
8bada4b5e1 remove public ::bbt_at (INTEGER) methods, because of superclock_t/samplepos_t confusion
libtemporal still needs ::bbt_at (superclock_t) fairly often so retain it as a private method, but public
interfaces take either Beats or timepos_t
2021-08-13 12:51:35 -06:00
Paul Davis
53e411c011 fix logic error in conditional 2021-08-13 12:51:35 -06:00
Paul Davis
6f2fdc2695 functioning loading of older tempo map XML data 2021-08-13 12:51:35 -06:00
Paul Davis
092a454648 fix timepos_t::string_to (wrong argument to samples_to_superclock() 2021-08-13 12:51:35 -06:00
Paul Davis
445ad2e383 rearrange if/else logic to avoid NOTREACHED condition 2021-08-13 12:51:35 -06:00
Paul Davis
b84402f4f8 intial steps for adding legacy (v0-5) tempo map deserialization support 2021-08-13 12:51:35 -06:00
Paul Davis
344dd26788 improved DEBUG_TRACE statements for tempo map 2021-08-13 12:51:35 -06:00
Paul Davis
cd34695944 fix TempoMap::quarters_at_superclock (superclock_t) 2021-08-13 12:51:35 -06:00
Paul Davis
74ff3b22b8 fix TempoPoint::superclock_at(Beats) 2021-08-13 12:51:35 -06:00
Paul Davis
216945a89c move TempoMap::write_copy() into .cc file instead of .h 2021-08-13 12:51:35 -06:00
Paul Davis
ce3fb0507c change return type of Tempo::set_{ramped,clamped} and fix call sites 2021-08-13 12:51:35 -06:00
Paul Davis
99c8c0b658 initial, tentative, untested implementation of TempoMap::remove_time() 2021-08-13 12:51:35 -06:00
Paul Davis
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
Paul Davis
0ab2308523 reimplement TempoMap::midi_clock_beat_at_or_after() 2021-08-13 12:51:35 -06:00
Paul Davis
0b1d44f422 temporal: fix timepos_t::decrement() to not switch domains 2021-08-13 12:51:35 -06:00
Paul Davis
daad7b74ae libtemporal: rename TempoMap::full_duration_at() to ::convert_duration() and reorder parameters 2021-08-13 12:51:34 -06:00
Paul Davis
7773fc5b64 libtemporal: TempoMap::full_duration_at() returns correct value for unchanged time domain call 2021-08-13 12:51:34 -06:00
Paul Davis
b7bc3b1947 libtemporal: expand comment to explain more about what TempoMap::full_duration_at() does 2021-08-13 12:51:34 -06:00
Paul Davis
c0c3fd07c9 libtemporal: add timecnt_t::end() and timecnt_t::set_time_domain() 2021-08-13 12:51:34 -06:00
Paul Davis
beaa1b3fcb be sure to check the return from the RCU mgr ::update method() inside TempoMap::update() 2021-08-13 12:51:34 -06:00
Paul Davis
0877500437 libtemporal: don't compile file removed (too early) in a55df1ad6 2021-08-13 12:51:34 -06:00
Paul Davis
5b3c5d3782 libtemporal: fix implementation of timepos_t::max() to avoid overflow for Beats time 2021-08-13 12:51:34 -06:00
Paul Davis
b2510c0da2 libardour: use appropriate method to set AutomationList time domain from ::set_state() 2021-08-13 12:51:34 -06:00
Paul Davis
2049cc44b2 libtemporal: tweak: don't both with local tempo map ptr 2021-08-13 12:51:34 -06:00
Paul Davis
433a9ebe48 libtemporal: catch attempts to convert max audio time values into beats, early 2021-08-13 12:51:34 -06:00
Paul Davis
d576fc8ca9 libtemporal: when computing Beats from a ticks value, do not try to pass potentially overflowing ticks value 2021-08-13 12:51:34 -06:00
Paul Davis
1af74f7398 libtemporal: correct the definition of std::numeric_limits<Beats>::max(). Comment in code contains details. 2021-08-13 12:51:34 -06:00
Paul Davis
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
Paul Davis
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