Commit graph

19249 commits

Author SHA1 Message Date
Paul Davis
f679da4e1e simplify implementation of Beats::operator%= (Beats) 2022-06-21 14:46:20 -06:00
Paul Davis
5d81535588 remember to use muldiv() when doing a*b/c; also no need to call to_ticks(), just use _ticks 2022-06-21 14:46:20 -06:00
Paul Davis
1be136adbd allow construction of Beats with a beat count that exceeds INT32_MAX 2022-06-21 14:46:20 -06:00
Paul Davis
d6d9792dcb fix construction of Beats from an int64_t that exceeds INT32_MAX 2022-06-21 14:46:20 -06:00
Robin Gareus
71ee12af6a
Add API to format keyboard modifiers for tooltips 2022-06-21 22:11:49 +02:00
Robin Gareus
5b03bf72fa
NO-OP: code style 2022-06-21 22:11:08 +02:00
Robin Gareus
af38528174
Physical modifier abstraction is constant 2022-06-21 22:09:54 +02:00
Robin Gareus
8a5fc65df4
Expose newly added semantic modifiers 2022-06-21 21:38:37 +02:00
Robin Gareus
3266b1acb0
Add API to query currently held modifiers keys 2022-06-21 21:37:14 +02:00
Robin Gareus
f1eb45e129
NO-OP: clang format 2022-06-21 21:37:08 +02:00
Paul Davis
696e05c3e5 convert internal implementation of Temporal::Beats to just use a 64 bit tick value
This expands significantly the maximum number of Beats that can be represented, which is a good
thing in itself. It slightly speeds up some Beats::operator methods, and slightly slows down
::get_beats() and ::get_ticks().

One minor change in an API user was required, and several tweaks to the unit tests due to the
macros being used by cppunit creating possible type confusion.

Units test pass
2022-06-21 12:26:54 -06:00
Robin Gareus
4661957091
Re-establish 47932fb7bf (which was lost in e557245bf7) 2022-06-21 20:17:01 +02:00
Ben Loftis
e557245bf7 implement group_override_modifier() (lib part)
Consistently use Tertiary for Group Override on all platforms (and be consistent about it)

Consistently use Primary-mod for Momentary on all platforms (partially reverts 47932f)
Primary modifier is used for fine-adjust on knobs and sliders, with no analogous operation on switches.
2022-06-21 13:01:30 -05:00
Paul Davis
4dbdaf7fe9 fix possible negative return from TempoPoint::quarters_at_superclock() 2022-06-21 11:39:10 -06:00
Robin Gareus
47932fb7bf
Only special case middle-click modifier for macOS by default 2022-06-20 23:30:45 +02:00
Paul Davis
bbb0b78a50 fetch thread local tempo map in potential peak-building threads 2022-06-20 14:25:40 -06:00
Robin Gareus
4825d67c4a
Fix record w/count-in
The pre-nutemo code used fmod() to calculate the offset into the bar:
`bar_fract = fmod (barbeat, 1.0); // fraction of bar elapsed`
with nutempo, beats start at 1, and the tick offset must also be
taken into account.

The bug was introduced in f67029bd0
2022-06-20 21:15:00 +02:00
Paul Davis
65b7b3f2eb fix unset per-thread tempo map in AutomationWatch thread 2022-06-20 08:43:00 -06:00
Robin Gareus
0f2c3bf9c9
Fix mp3 export on big-endian systems 2022-06-20 16:05:28 +02:00
Robin Gareus
35612d26c6
Unify ::get_buffer, remove debug code 2022-06-18 22:54:09 +02:00
Robin Gareus
32161cf154
Fix valid_port race/crash when ranaming ports
PortIndex is sorted by name, and uses port-name as unique identifier.

Ports can be re-named concurrently with processing.
::set_port_name() updates the RCU in the background. The engine
may concurrently process with an old RCU reader value.

In this case valid_port() failed in the process-callback.
and ::get_buffer() returned NULL
2022-06-18 22:54:08 +02:00
Ben Loftis
fd9a76073b modifiers: add momentary_push_name (for tooltips) 2022-06-17 11:07:58 -05:00
Ben Loftis
12e703414d modifiers: make a new abstraction for momentary-click, instead of button_2 (lib part)
is_button2_event()  was used to detect the user's desire for a
  momentary-click on some buttons (mute, solo, mixer scenes)

is_momentary_push_event() disambiguates this action from is_button2_event()

for the special case of momentary, we can drop the workarounds for
  the lack of middle-mouse buttons on Mac, and instead just use
  shift+left-click on all platforms.
2022-06-17 11:07:49 -05:00
Ben Loftis
71833911a4 modifiers: publish button2_name (for use in tooltips) 2022-06-17 10:52:06 -05:00
Paul Davis
f60b35483d temporal: fix major conceptual error managing Point reference to owner map
When TempoMap::copy_points() is called, the new points are intended to belong
to the (nascent) new map. But the copy constructor for the points leaves the
_map member of a Point unchanged, and so the new points reference the old
map (forever!). ::copy_points() must reset each Point to reference the new map.

Refactored the object that has the _map member, so that we could limit access
to its ::set_map() method to TempoMap.
2022-06-16 22:11:56 -06:00
Ben Loftis
d66bda9f07 mackie send subview: potential fix for send-enable banking (vpot push) 2022-06-16 13:27:30 -05:00
Robin Gareus
7e039d4f3f
Cleanup: retain sources used by triggers in this session
Note that ::find_all_sources_across_snapshots() finds and retains
all sources in the SourceList of other snapshots regardless
if they are used in those snapshots.
2022-06-16 20:03:58 +02:00
Paul Davis
9964f20c63 when creating a session without a template, reset tempo map to default 2022-06-16 10:36:18 -06:00
Paul Davis
32096afc90 temporal: remve debug output 2022-06-16 10:36:02 -06:00
Paul Davis
2cfc013b0c temporal: fix loading tempo map from XML
We need to clear out all 4 intrusive lists before we start, not just the 3 typed ones
2022-06-16 10:18:37 -06:00
Paul Davis
477b136e97 temporal: if requested via -Dtemporalmap, dump tempo map after any update 2022-06-16 10:18:37 -06:00
Robin Gareus
41bce61552
Cleanup bindings key replacement arrays 2022-06-15 15:32:39 +02:00
Robin Gareus
047296060f
Fix printing keybindings #8924 (brace/bracket mismatch) 2022-06-15 15:28:57 +02:00
Robin Gareus
d037dff213
NO-OP: comments and cleanup 2022-06-15 14:16:16 +02:00
Robin Gareus
471330a292
Fix uninitialized variable (leading to crashes when adding routes)
A route may be processed before latency-compensation callback
sets the route's output_latency. In this case a random offset
was added to the start/end position (via latency_offset).
2022-06-15 14:15:24 +02:00
Robin Gareus
b95bb0bdac
Prefer atomic dec_and_test (instead of atomic get+set) 2022-06-14 18:19:52 +02:00
Paul Davis
32b41037b5 libpbd: do not use debug transmitter inside BaseUI::signal_new_request() to avoid recursion 2022-06-13 13:43:31 -06:00
Paul Davis
590b4165e8 use exception-safe inc/dec in TransportFSM::process_events()
Note: the processing guard variable is required because this code could be re-entrant
2022-06-13 10:52:31 -06:00
Paul Davis
20997dfa78 add new exception-safe RAII object, that increments/decrements its argument 2022-06-13 10:51:04 -06:00
Paul Davis
842fa3c708 NOOP: comment terminology update 2022-06-13 10:20:50 -06:00
Paul Davis
5567f30213 triggerbox: output information rather than abort 2022-06-10 13:01:56 -06:00
Paul Davis
6bef80ae60 triggerbox: use regular transport request mechanism to get transport started
if a slot becomes active, and the transport is not rolling, it still
asks the transport to roll. however, (1) there's only 1 request across
all triggerboxen (2) the request will not be handled till the next
process cycle (3) the triggerbox returns after the request i.e. it
waits until the transport is rolling
2022-06-10 11:59:12 -06:00
Robin Gareus
52047e108d
Fix windows builds (amend 01b06906b) 2022-06-09 18:13:33 +02:00
Robin Gareus
c16b7b6dd5
MixerScene: only request actual value changes
This is otherwise only caught later in the rt-thread after
scheduling a RealTimeOperation via AutomationControl::check_rt.

There is no need to schedule cross-thread events when the
value is not about to be changed.

This can greatly reduce the number of signals emitted by
restoring a slot, which improves performance and also prevents
the EventPool from filling up with useless events.
2022-06-09 02:25:51 +02:00
Robin Gareus
01b06906b0
Mitigate "POOL OUT OF MEMORY" when batch changing controllables 2022-06-09 02:25:49 +02:00
Robin Gareus
b1b57571e7
Prevent RealTimeOperation EventQueue clogging
It can happen that the EventQueue fills up with
SessionEvent::RealTimeOperation. Those are to scheduled to be
free()ed later the GUI thread via event_loop->call_slot().

However it can happen that the GUI EventPool is full, so the request
to call Session::rt_cleanup, is never executed.

In this case the SessionEvent pool can fill up with RealTime
Operations which remain there permanently.
2022-06-09 02:25:45 +02:00
Robin Gareus
95aa39d1c4
Update call_slot() API, inform caller if slot cannot be queued
It can happen that ::get_request() returns NULL if the
EventPool is full. In that case the slot is never called.

In this case the caller can now take action.
2022-06-09 01:46:27 +02:00
Robin Gareus
03e0fe0a73
Add API to query Session event pool size 2022-06-09 00:41:23 +02:00
Robin Gareus
fac6d6bf98
Use separate plugin-cache for Apple/M1
Plugins on Apple can be multi-arch (Intel + ARM), or AUs may
be bridged by Rosetta.

A user can also run Intel binary of Ardour or M1 binary on
M1 CPUs on macOS. Each can see different plugins - notably
VST3 plugins that are Intel only can be scanned using the
Intel binary, but are later not available with the M1 build.
2022-06-07 23:49:42 +02:00
Robin Gareus
b8c3f9342a
Fix typo for ARM MIDI ringbuffer alignment 2022-06-07 23:49:42 +02:00