Commit Graph

33130 Commits

Author SHA1 Message Date
Paul Davis
fed449d54d various fixes to get time stretching basically working again
Time domains are not well respected at present, so more work is needed here
2021-08-13 12:51:35 -06:00
Paul Davis
76e5aaea44 remove another NUTEMPO #warning by using TempoMap::count_bars() 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
f05b2ed93b remove another NUTEMPO #warning by allow grab starts in rubber band selection to use the default time domain 2021-08-13 12:51:35 -06:00
Paul Davis
162d36ffc8 remove some debug output 2021-08-13 12:51:35 -06:00
Paul Davis
6bc8a7347f improve drag behavior on AudioClock 2021-08-13 12:51:35 -06:00
Paul Davis
3a94b45b23 rework handling of scroll and drag on AudioClock by using timepos_t rather than samples 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
6effcc7723 reimplement quantization without (much) floating point (GUI edition) 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
fb66695081 fix (and improve) drawing of "ghost note" drawn while mouse pointer moves in MidiRegionView in draw mode 2021-08-13 12:51:35 -06:00
Paul Davis
1868c4cac5 fix drawing percussive notes in MidiRegionView following nutempo SNAFU with relative time calc. 2021-08-13 12:51:35 -06:00
Paul Davis
7244b03385 convert NoteCreateDrag::grid_aligned_beats() into a proxy for Editor::snap_to_bbt() 2021-08-13 12:51:35 -06:00
Paul Davis
831c085b2e remove MidiRegionView::snap_sample_to_grid_underneath() and replace with calls directly into Editor snap method 2021-08-13 12:51:35 -06:00
Paul Davis
37eea1da29 fix brace style 2021-08-13 12:51:35 -06:00
Paul Davis
b2655d13f1 make Editor::snap_to_bbt() public 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
0ddfd7c873 force drag-created regions to use beat time for position 2021-08-13 12:51:34 -06:00
Paul Davis
49424ab0e3 Region::_start should be a timepos_t not a timecnt_t (GUI edition) 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
485b74e0b9 rename EditorSummary::Position as Editor::SummaryPosition 2021-08-13 12:51:34 -06:00
Paul Davis
e5d505365f rename ProcessorBox::Position as ProcessorBox::ProcessorPosition 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
dad56af802 remove another 3 NUTEMPO #warnings
These all involve converting between ControlList-relative time and absolute time
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
45a8da77f6 clean up rulers/grid mess 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
0162d3f9d6 GUI changes to *try* to adapt to a world without explicit beats<->samples converter objects (i.e. use AutomationLine::get_origin() instead 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
48ac681b03 fix note-resizing-at-front, change variable names 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
Paul Davis
9a9bc3408f fixups for xrun-marker work, now that Region::sample() and Region::length() so not return sample types 2021-08-13 12:51:34 -06:00
Paul Davis
6536655a0a add explanatory comment 2021-08-13 12:51:34 -06:00
Paul Davis
21e6f1cf50 (mostly) fix note drag creation drawing 2021-08-13 12:51:34 -06:00