13
0
Commit Graph

308 Commits

Author SHA1 Message Date
6a8946a746 NOOP: whitespace fix 2023-09-17 20:38:34 -06:00
75e12993c6 temporal: fix grid generation in trivial case (1 tempo, 1 meter at zero)
We need to do the same "round up to bar/beat" trick that we do when we reach a BBT
marker
2023-09-17 20:38:23 -06:00
eca4c83b7b temporal: remove concept of inactive tempos 2023-09-11 10:26:54 -06:00
58b667c6c0 temporal: fix crash caused by unsafe use of tempo map iterators 2023-09-06 14:46:24 -06:00
269699c340 temporal: fix get_grid() to work in the presence of "weird" BBT markers 2023-09-04 19:41:25 -06:00
13bdfda81a temporal: add Meter::round_up_to_beat_div()
reimplement round_up_to_beat() in terms of round_up_to_beat_div()
2023-09-04 19:41:25 -06:00
7c5e7ddf59 temporal: improve operator<<() for MusicTimePoint (BBT markers) 2023-09-04 19:41:25 -06:00
0266d98a3b temporal: add TempoMap::{max,min}_notes_per_minute() API 2023-08-31 18:23:40 -06:00
cda0d6ce9f temporal: fix totally broken implementation of TempoMap::shift (timepos...) 2023-08-31 18:22:59 -06:00
c778a6df67 ripple backwards when cutting a section 2023-08-31 18:22:25 -06:00
c4cb8dbda9 arithmetic simplification 2023-08-30 16:07:48 -06:00
6c44dbf9d6 temporal: a guess at how to use BBT markers from within TempoMap::paste()
Basically, if the paste position is not zero and not on a bar line, we will a BBT marker there,
using the existing tempo & meter at that position before the paste.

If the end of the paste is not on a bar line, we will place a BBT marker there,
using the tempo & meter that existed before the paste.

TempoMap::paste() now also accepts an optional final argument that if provided is
used to name the BBT markers, if they are created
2023-08-30 15:21:55 -06:00
7aa1863c0f somewhat working tempo map cut/copy/paste 2023-08-30 14:16:21 -06:00
a5055a2227 various changes related to tempo map copy/cut/paste section
Tempo map is currently still excluded from the editor operation
2023-08-30 14:16:21 -06:00
32ef2d5a0f temporal: add a music-time (BBT) point at the cut site 2023-08-25 17:39:00 -06:00
4d8ba938f1 temporal: during cut(), break out of loop once we pass the end time 2023-08-25 17:39:00 -06:00
076cb86912 next iteration of changes to handle time domain bounces as undoable 2023-08-14 23:42:08 -06:00
ada7fc16aa temporal: another place to ensure that a BBT marker defines a beat position 2023-08-02 15:23:43 -06:00
ca348ce0d9 temporal: add TempoMap::replace_bartime() 2023-08-02 15:23:43 -06:00
fa225846af new Temporal API to allow keeping MIDI notes in position after a map-tempo operation 2023-08-02 14:11:06 -06:00
7fbe17c802 BBT markers must define an on-beat position 2023-07-24 16:20:38 -06:00
c31c1906f7 temporal: fix dangling confusion about "omega"
Remove all reference to "omega_sc" and rename "omega_beats" as omega
2023-07-15 21:45:11 -06:00
ea2d2b4760 temporal: rename ::get_grid_with_iterator()
Because I like polymorphism
2023-07-15 11:23:45 -06:00
422fa7255b temporal: further extensions to GridIterator API to handle bar_mod/beat_div parameters
Also try to comment class definition to add a little clarity
2023-07-15 11:08:45 -06:00
cbaa335946 temporal: some cleanup of the GridIterator API 2023-07-14 21:32:40 -06:00
509efdb290 temporal: refactor ::get_grid() for performance reasons
the API now provides the option to call ::get_grid() with an iterator which may
be re-used on subsequent calls. This avoids unbounded O(N) "walks" from the
marker preceding the start point of the grid to the start point.

This commit also includes "fast-path" code for the common case of a single
tempo and single meter
2023-07-14 13:03:36 -06:00
81384537ef temporal: remove useless _floating member and API from TempoMapPoint 2023-07-14 13:03:36 -06:00
039f2d5d0e remove TempoMap::count_bars()
It's the only place in libtemporal that would require
a TempoMapPoints allocation, and there's no reason to do
this inside the library.
2023-07-14 13:03:36 -06:00
52f1b88749 temporal: remove ill-conceived lookup tables from tempo map (never publically visible)
These were not thread safe, and could not be: to be useful, a thread looking up a time
conversion could cache the result, but it would be using the global (shared) copy
of the map (because lookup is read-only, and so no write-copy is required). But
inserting into the lookup table wasn't lock protected (and shouldn't be because otherwise
that defeats the point of RCU).

So just drop it.
2023-07-14 13:03:26 -06:00
20e1b6b287 temporal: add API to clear tempos in various ways 2023-06-30 15:50:25 -06:00
3307dcfcb2 temporal: reference time for BBT_Argument is always superclocks 2023-06-30 12:10:50 -06:00
16c9d91641 temporal: remove impossible get_tempo_and_meter (..., bbt, ...) method 2023-06-30 12:10:50 -06:00
a591fb64a3 temporal: rework ::get_grid() to avoid get_tempo_and_meter (..., bbt, ...) 2023-06-30 12:10:50 -06:00
3513debba8 temporal: NO-OP (tiny variable rename) 2023-06-30 12:10:50 -06:00
bb97ade440 temporal: special case editing of the initial tempo (#9339) 2023-06-12 16:46:13 -06:00
1cf4f9293c temporal: paste needs to add to _points 2023-06-08 14:01:17 -06:00
24f6c51de6 temporal: more nuances for ::cut_copy() 2023-06-08 14:01:17 -06:00
a09a37049b temporal: get guard point values before altering the tempo map 2023-06-08 14:01:17 -06:00
d761ccb59b temporal: the second variant of shift() (untested) 2023-06-07 11:25:44 -06:00
e6b6340f3e temporal: more nuances for shift() 2023-06-07 11:25:44 -06:00
ad45778edc temporal: shift() with BBT must allow negative motion 2023-06-07 11:25:44 -06:00
a456a10cdf temporal: first guess at a TempoMap::shift() implementation 2023-06-07 11:25:44 -06:00
9d3ae4fc8d temporal: fix position of end guard points during map paste 2023-06-06 09:52:29 -06:00
9e4b1d59a7 temporal: do something when pasting the cut buffer guard points
Don't think this is quite right yet - we get guard points even when
they are not really necessary
2023-06-06 09:04:34 -06:00
f5f87f86d4 temporal: adjust cut buffer API to better deal with start/end "guard points" 2023-06-05 17:27:12 -06:00
11157d9bd9
Fix some Wunused-variable 2023-05-22 21:26:26 +02:00
c452a4816c tempo mapping: Re-implement tempo-twist with constant and ramped varieties (lib part) 2023-05-22 13:32:53 -05:00
54969d8aab fix thinko resulting in duplicate bar-names after a tempo-mapping op 2023-05-14 09:05:08 -05:00
b9e5621e03 during map reset, force meter to bars, and tempo to beats 2023-05-05 20:53:23 -06:00
32a3591018 remove #warning 2023-05-05 18:57:16 -06:00