Commit graph

17911 commits

Author SHA1 Message Date
Paul Davis
a7535ae8aa clang knows that we cannot use printf() to print Evoral::Event::time() ...
(why doesn't gcc?)
2021-08-13 12:51:35 -06:00
Paul Davis
8c23d6955d new timeline types for AudioUnits and CoreAudioSource 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
153164c803 remove debug output 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
8d67be784a remove #ifdef'ed out initialization from session.cc (possible rebase leftover, but redundant no matter the origin 2021-08-13 12:51:35 -06:00
Paul Davis
bcca1ad289 minor fixups post-rebase 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
552484978c fix call to ::bbt_at() inside LV2 plugin 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
af4ba1cc01 fix start, length/position for recorded MIDI regions
Note that we should really set the position value as part of the
length, but then Playlist::add_region() would need to drop its
second argument (position). Maybe in a future commit
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
b276254551 reimplement quantization without (much) floating point 2021-08-13 12:51:35 -06:00
Paul Davis
48e68de180 remove another NUTEMPO warning by actually setting region time domain 2021-08-13 12:51:35 -06:00
Paul Davis
5f0ba5b404 fix recently added Location API to use timeline types 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
b42727b92a temporal: fix use of std::abs on 64 bit value 2021-08-13 12:51:34 -06:00
Paul Davis
97e4a4f04a change semantics of Region::set_length() to preserve current position
Before the nutempo changes, a call to Region::set_length() only set the length
of the region.  Now that Region::_length is a duple of (duration,position),
maintain thesame semantics so that the call only affects the duration part of
the duple.  Theoretically we might at some point want/need
Region::set_length_and_position() but that is not the case at this point,
2021-08-13 12:51:34 -06:00
Paul Davis
56cde042cd Region::_start should be a timepos_t not a timecnt_t
It is an offset from an *implicit* origin (the source zero), not from an explicit origin,
and this fits with the concept underlying timepos_t. A timecnt_t requires an explicit origin,
which makes no sense in this context (just as it doesn't for the timeline as a whole).
2021-08-13 12:51:34 -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
3bf6e013ee get rid of Region _last_position member, since the _last_length member has its own position 2021-08-13 12:51:34 -06:00
Paul Davis
c0343a5a1a get rid of Region _position member, since the _length member has its own position 2021-08-13 12:51:34 -06:00
Paul Davis
a71ba473f7 fix up post-rebase issues after rebase on master 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
9a53ef4020 libevoral: fix some existing or potential issues with time domains 2021-08-13 12:51:34 -06:00
Paul Davis
e11ecd56a9 libevoral: avoid use of std::numeric_limits<timepos_t> which does not (or should not) exist 2021-08-13 12:51:34 -06:00
Paul Davis
87e56f28e9 libevoral: remove semi-shadow local variable 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
3021038976 libardour: remove beats<->samples converter objects; provide a virtual get_origin() method instead to use with timepos_t/timecnt_t 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
6d154c14b4 libevoral: add a new method to set the time domain that can be used from ::set_state(), when the event list is not (yet) empty 2021-08-13 12:51:34 -06:00
Paul Davis
9d7d158abd add comment to help explain Region::source_beats_to_absolute_beats() 2021-08-13 12:51:34 -06:00