Paul Davis
c09ffd4fcd
triggerbox: consolidate ::start_and_roll_to() across Audio & MIDI triggers
...
This uses a mild trick to pass both the object and ptr-to-member-function from the child class
to the parent class.
Note: before this commit, both instances of ::start_and_roll_to() were identical.
2022-02-15 16:24:01 -07:00
Paul Davis
e75a8ab77c
triggerbox: clarify handling of end-of-clip conditions
...
This doesn't enter Playout state, when the final event matches the predicted
final beat, but also returns the correct number of frames covered
2022-02-15 15:28:01 -07:00
Ben Loftis
9abc4642ed
triggerbox: fix midi timing in the case where a note-off arrives exactly at the end of the clip (amends cbbe5)
2022-02-14 21:30:23 -06:00
Paul Davis
8741c4cc5d
triggerbox: NOOP - rename template parameter for *_run<bool> to be more clear about its purpose
2022-02-14 18:13:06 -07:00
Paul Davis
cb815bf8dd
triggerbox: drop useless computation
2022-02-14 18:09:03 -07:00
Paul Davis
cbbe595162
triggerbox: fix end-handling of MIDI triggers (again)
...
If we reach the last event in a MIDI file, the test to enter Playout
is whether the last event is *before* not at or later to our computed
final beat.
2022-02-14 18:07:54 -07:00
Paul Davis
91e7361e08
triggerbox: ensure _currently_playing reflects fast_forward logic
...
If we decide after fast forwarding that this TriggerBox has no triggers
active at the transport position, we must mark _currently_playing as null,
because otherwise the TB can still start the transport (in error) during
run()
2022-02-14 12:59:24 -07:00
Paul Davis
511b09b3d6
triggerbox: avoid double-accounting for buffer offset in MIDI triggers
...
Because MIDI triggers compute buffer-relative timestamps using
timeline_samples - start_sample, this already takes into account
any offset to the start of the trigger. We still need to use dest_offset
if a non-zero value was passed into ::midi_run(), but we do NOT
want to have it contain the "offset to start of trigger in process
cycle" as well. Instead of trying to special case
::maybe_compute_next_transition(), we just pass a dummy pframes_t
to that method, leaving dest_offset as it was passed into ::midi_run()
2022-02-14 12:56:18 -07:00
Paul Davis
374fa48fad
triggerbox: consolidate position-as-fraction code
...
Both trigger types now use a process_index and final_processed_sample value
to compute their current position-as-fraction
2022-02-14 09:53:00 -07:00
John Emmas
5af43793d3
Modify 'ARDOUR::cue_marker_name()' to be accessible outside of libardour
2022-02-14 10:19:47 +00:00
Paul Davis
c5d7883538
temporal: add skeleton for Timeline (timepos_t/timecnt_t) tests
2022-02-12 22:25:17 -07:00
Paul Davis
baaf332a94
temporal: add skeleton for TempoMap tests
2022-02-12 22:25:17 -07:00
Paul Davis
14ac8fd36b
skeleton for temporal/BBT testing (empty for now)
2022-02-12 17:51:30 -07:00
Paul Davis
f641a0559f
temporal: missing test source
2022-02-12 15:18:19 -07:00
Paul Davis
04bd9187e4
temporal: add (back) first set of unit tests
...
This just uses the old Evoral BeatTest. Some of the tests needed amending
because temporal uses rint() to convert between float and int, not just
a cast.
2022-02-12 15:12:35 -07:00
Ben Loftis
e41729d10c
triggerbox: remove excess debug printouts
2022-02-12 11:14:12 -06:00
Ben Loftis
8a3b5751fb
triggerbox: initialize follow-count more reliably. this way queues a UIState
2022-02-12 11:13:30 -06:00
Ben Loftis
ad7db33666
triggerbox: remove redundant code; set_segment_tempo takes care of this later
2022-02-12 11:12:33 -06:00
Ben Loftis
563dc9ae21
triggerbox: setup_stretcher must be called for stretch_mode to have any effect
2022-02-12 11:12:08 -06:00
Ben Loftis
227815ebab
fix crash introduced in d8b3
2022-02-12 09:34:42 -06:00
Ben Loftis
d8b3fbb94e
beatcnt is a derived property from tempo and segment-length
2022-02-12 09:04:48 -06:00
Paul Davis
b3ec5df8a8
triggerbox: some additional DEBUG_TRACE messages
2022-02-11 15:22:45 -07:00
Ben Loftis
40a1997c0e
triggerbox: reimplement enqueue_trigger_source using a map of UISTate entries
...
* "Range->Bounce to Trigger Clip" needs to set tempo
* Range->bounce can operate on multiple tracks (regions) in one operation
2022-02-11 15:31:54 -06:00
Ben Loftis
742e3659ff
triggerbox: add name, color and tempo to UIState; used for gui operations like d+d
2022-02-11 15:25:59 -06:00
Ben Loftis
37a5edb2cd
triggerbox: initialize values of UIState (c++11 style)
2022-02-11 15:25:59 -06:00
Paul Davis
1777f9af0c
triggerbox: working (?) "stop all cues" cue marker
2022-02-11 13:36:58 -07:00
Paul Davis
98f1b4364d
triggerbox: implement function for translatable marker names
2022-02-11 11:33:27 -07:00
Paul Davis
914b2447b8
triggerbox: a cue marker/event with cue-id < 0 means "stop all"
2022-02-11 11:33:06 -07:00
Paul Davis
a1384d2789
triggerbox; fast-forward should do nothing if we are not use cue markers
2022-02-11 10:33:11 -07:00
Paul Davis
d18426ee95
debug output to show contents of trigger property changes
2022-02-11 10:32:50 -07:00
Paul Davis
f7881af554
do not recurse
2022-02-11 10:21:48 -07:00
Paul Davis
008f0d4e4c
triggerbox: do not send Trigger property updates while fast forwarding
2022-02-11 10:16:04 -07:00
Paul Davis
e14b8a142d
triggerbox: a cue marker that refers to an empty slot ends a previously playing slot (in fast forward)
2022-02-11 09:11:43 -07:00
Paul Davis
9f39cca21f
remove debug output
2022-02-11 08:47:59 -07:00
Paul Davis
3553d56f05
tempo map: fix loading 6000-version or earlier tempo maps
...
Probably a copy-n-paste error meant the reversed logic was used
to decide if we had found an inital tempo and meter
2022-02-11 08:46:49 -07:00
Paul Davis
2bf8b7ce11
triggerbox: mostly working fast-forward for MIDI triggers
2022-02-10 19:59:48 -07:00
Paul Davis
395b759f42
midi state tracker: extend, fix, improve API for flushing state
2022-02-10 19:59:48 -07:00
Robin Gareus
bf273a90ca
Auditioner: collect MIDI Bank/Program changes
...
This will allow to directly set MIDITrigger PC override
from the auditioner.
2022-02-10 02:22:35 +01:00
Paul Davis
771db9e238
NOOP: remove blank lines
2022-02-09 17:26:25 -07:00
Paul Davis
f941041805
triggerbox: use C++11 syntax for iteration
2022-02-09 17:26:25 -07:00
Paul Davis
439e112d32
triggerbox: pay attention to the fact that a trigger may have Stopped while fast-forwarding
2022-02-09 17:26:25 -07:00
Paul Davis
baacd3bb50
triggerbox: no need to call reset_stretcher() explicitly in ::_startuo()
...
Trigger::_startup() calls ::retrigger() and that will call reset_stretcher()
2022-02-09 17:26:25 -07:00
Paul Davis
0b5d449686
triggerbox: slightly improved DEBUG_TRACE output for property setters
2022-02-09 17:26:25 -07:00
Paul Davis
0ad90f826e
triggerbox: handle realtime part of transport stop explicitly in TriggerBox
2022-02-09 17:26:25 -07:00
Paul Davis
19b844e054
triggerbox: sync ui property state with internal for inactive triggers
2022-02-09 16:34:03 -07:00
Paul Davis
baf2323798
add PBD::PropertyChange::dump (std::ostream&) to make it easier to see what changed
2022-02-09 10:08:01 -07:00
Paul Davis
f58b8e3cb4
fix accidental insertion of "x1"
2022-02-09 10:08:01 -07:00
Paul Davis
e77e3b35b8
mackie: fix crash when using thread-local tempo map
...
TempoMap::use() assumes the thread_local pointer has been set up. This
is not the case for the control protocol event loop, so call ::fetch()
instead which does not require this assumption (and sets the thread_local
pointer too, though nothing else in the Mackie code uses it)
2022-02-09 10:08:01 -07:00
Paul Davis
beffc7eb7f
fix another ordering change introduced during a manual rebase fixup
2022-02-08 21:08:15 -07:00
Paul Davis
93e1b77fe2
fix mistake introduced during rebase fixup
2022-02-08 21:07:07 -07:00