5dbbac0bc2
temporal: operator<< for Range and RangeList
2023-03-24 14:19:16 -06:00
393929a55b
tempo twisting: various fixes and improvements to core logic
2023-03-24 14:19:16 -06:00
7040ad1b74
temporal: API changes and implementation to support new twist operation
...
this includes using two different omega members for tempo objects,
a change that likely will not persist beyond the merge back to master.
2023-03-24 14:19:16 -06:00
b36a0493df
tempomap: use muldiv_round() not int_div_round to avoid errors
2023-03-24 14:19:16 -06:00
45490bf43f
more functional tempo mapping
2023-03-24 14:19:16 -06:00
d513653912
API development for time domain flipping
2023-03-24 14:19:15 -06:00
b35518e212
switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
...
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
73bc7e6cb7
temporal: fix ::get_tempo_and_meter() for BBT arguments
2023-03-19 10:13:06 -06:00
27205c7639
midi clock: provide option to quantize incoming BPM values
2023-02-23 12:15:26 -07:00
c1c913be9d
Fix MClk generator position
2023-02-19 18:08:58 +01:00
5b6bc3f358
Revert "tempo map: use lookup tables to speed up time conversions"
...
This reverts commit 644ebe37a8
.
Adding entries to the lookup table is (a) not thread safe (b) not appropriate
from RT context.
2023-02-16 18:25:23 -07:00
31a3c3c6f3
temporal: fix bad escape sequence in test source code
2023-02-15 18:36:23 -07:00
a59059c15e
temporal: map used for ::reftime() must be the one pointed at by TempoMetric
2023-02-15 18:36:23 -07:00
ee64390c48
fix libtemporal tests after API changes to the library
2023-02-15 17:51:28 -07:00
644ebe37a8
tempo map: use lookup tables to speed up time conversions
2023-02-15 16:02:56 -07:00
6f095b91ce
tempo map: add data structure and methods for (fast?) lookup tables
...
As of this commit, none of the data structures are used.
2023-02-15 16:02:56 -07:00
92bd8461ca
tempomap: provide improved reftime() method for TempoMetric
...
This now looks backwards in time for a BBT_Marker or the start of the
tempo map, whichever comes first.
2023-02-15 16:02:56 -07:00
6cde958480
BBT_Time: provide conversion to/from integer format
...
This is not guaranteed to be lossless, but with 44 bits for bars,
256 beats per bar and up to 4095 ticks per beat, it should be fine.
2023-02-15 16:02:56 -07:00
259499fc5f
require use of BBT_Argument as both parameter and return type from most methods (libs edition)
2023-02-15 16:02:56 -07:00
f033b5717d
tempo map: fix lookup of tempo/meter for a BBT time
...
Find the first point/tempo/meter after the reference time of the BBT argument
2023-02-15 16:02:56 -07:00
43c8fae709
initial addition and use of BBT_Argument
...
Currently this is interchangeable with BBT_Time, but soon will
be handled differently
2023-02-15 16:02:56 -07:00
62d4e0789a
tempo map: fix error in TempoMap::copy_points() that fails to reset _map ptr
...
This left the _map ptr of all points in a copy of a map pointing
to an old/dead TempoMap.
2023-02-14 10:14:55 -07:00
Marijn Kruisselbrink
b0f5fea53a
Fix minor errors in temporal/wscript
2023-01-12 20:58:24 +01:00
6407ca51cd
Fix region-fade, time-stretch and other scaling operations ( #9057 )
...
This resolves an ambiguity between abs(int) and std::abs(T) which
depends on context and compiler version and optimization.
In context of #9057 , (gcc-6.3 -O3) math.h `abs(int)` was used. This
truncated the superclock value to 31 bit in ControlList::extend_to.
2023-01-12 16:17:39 +01:00
34e12a5d78
Fix grid when tempo marker is not on a mod_bar/beat_div
...
Previously the current iterator bbt was moved to p->bbt().
From then on, no grid line is reached if the point p is not on
a bar and mod_bar != 0 or the point is not on an expected beat_div.
e.g. when using bbt += mod_bar, and a tempo-change is at 5|2|0.
iterations continues 6|2|0 7|2|0 is_bar() is always false
and no more grid-lines were added.
Rather than trying
bbt = round-up-to-next-grid-mod-div
and then finding the metric for that position, this
approach only does the latter using the already incremented
BBT position.
2023-01-11 00:25:23 +01:00
b0a679a1af
Fix grid after last tempo-marker when showing bars
...
This is a copy/paste bug, compare to d77db816de
2023-01-11 00:06:43 +01:00
ac30964d67
remove debug output
2022-12-26 14:03:32 -06:00
b2a6fb70b4
remove debug output
2022-12-20 22:01:41 -07:00
818c30a98d
temporal: add optional with_reset arg to all map ::remove_*() methods
2022-12-20 21:54:05 -07:00
0ee0226776
temporal: no stretching a tempo that is the last one or precedes a BBT marker
2022-12-20 21:33:13 -07:00
d3dd865093
temporal: NOOP - add helpful comment
2022-12-20 21:31:31 -07:00
ae36f8e445
temporal: provide TempoMap::replace_tempo()
2022-12-20 21:31:02 -07:00
033b4c5152
temporal: fix implementation of TempoMap::copy_points()
...
This could re-order the map in the presence of BBT markers
2022-12-20 21:29:44 -07:00
39c324b620
temporal: fix ::get_grid() crash condition
...
We cannot call TempoMetric::superclock_at (BBT_Time) if the BBT time is beyond
the range of the current TempoMetric. We must discover that *before* we make
that call, not as part of the test to see if we've exceeded the range.
2022-12-10 22:59:58 -07:00
db3e87a7e4
do nothing gracefully if asked to remove only tempo
2022-12-10 14:14:12 -07:00
4beca98e28
temporal: fix various incorrect uses of ::samples() in audio time arithmetic
...
It is a wonder that this has not caused more visible issues since 7.0
2022-12-07 11:13:49 -07:00
c505024a4b
temporal: when resetting the map, position BBT markers in beat time (and stop reset there)
2022-12-05 10:01:49 -07:00
12b672492e
tempomap: fix and improve efficiency and readability in ::get_grid()
2022-12-05 10:01:49 -07:00
d77db816de
temporal: reimplement and tweak API of TempoMap::get_grid()
...
There were many logical errors in the previous implementation. This one is
simpler to read, and appears to work much better.
It also allows the caller to specify the quarter-note subdivision to use when
generating the grid, rather than choosing only between some bar modulo or
quarter notes.
2022-11-29 10:09:39 -07:00
a124062fa2
temporal: move_tempo() must use beats (timesig dependent) not quarters
2022-11-29 10:09:39 -07:00
1f4717d93b
temporal: reset map requires a BBT-sorted map, not audio time
2022-11-29 10:09:39 -07:00
a817142676
NO-OP: extend debug trace output in superclock_at (BBT_Time)
2022-11-29 10:09:39 -07:00
8299778d26
temporal: slightly change internal API for omega (ramp) computation
2022-11-29 10:09:39 -07:00
d9ed0f0d2e
temporal: use muldiv_round to avoid overflow in TempoMetric::superclocks_per_grid()
2022-11-29 10:09:39 -07:00
883527ba3e
temporal: add Meter::round_to_beat()
2022-11-29 10:09:39 -07:00
d0fb7ae18a
avoid duplicate BBT points in grid
2022-11-22 18:09:46 -07:00
fe386e51b1
incomplete comments - just say no
2022-11-21 18:34:13 -07:00
c7cf4d96e0
confusing comments - just say no
2022-11-21 18:33:17 -07:00
a84d3e04c4
tests: add new test to check that tempo map reset changes beat time correctly
2022-11-21 18:18:21 -07:00
f5887b978d
tempo map: when resetting, set beat/quarter positions as well as audio positions
...
introducing a new time signature that uses non-quarter notes as the denominator
will move the beat position a given BBT time (since the middle "B" of BBT
refers to "beats" given by the denominator, not quarters).
2022-11-21 18:18:21 -07:00