Commit Graph

35572 Commits

Author SHA1 Message Date
Robin Gareus 86ddb11b9b
Fix displaying note events across tempo-changes
Note position in samples must be calculated using absolute position
on the timeline. Otherwise the tempo-map is not applied correctly.

Previously this caused issues since the position was first
offset back by _region->position() - time relative to region left
edge - and then the tempo-map was applied.

Another solution identically would be:
(note_start + session_source_start).samples() - _region->position().samples()
2022-06-17 17:07:47 +02:00
Paul Davis 7724af1850 remove debug output 2022-06-16 22:34:59 -06:00
Paul Davis 2f6047e000 tempo display: remove dangling unconditional call to reassociate markers 2022-06-16 22:14:43 -06: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
Paul Davis cdf98a1bd7 tempo display: when the tempo map changes, avoid unnecessary work
If the initial tempo marker is referencing a point in the new map, assume that
all markers have already been associated with the map.
2022-06-16 22:09:53 -06:00
Paul Davis 3482d6db4e tempo display: when reassociating markers, use sclock equivalence
Since we're reconnecting visible marker objects with a new map, there's a good
chance that the map will contain map points that don't correspond to the map
points currently referenced by those markers. Thus, tests for address
equivalence will often fail.

Instead, repeat what has been done elsewhere and use the heuristic that we only
allow one point of a given type at the same superclock position.
2022-06-16 22:07:21 -06:00
Paul Davis 8f7a267900 tempo display: when tempo map changes, metric markers must be reassociated with the new map 2022-06-16 12:58:03 -06:00
Ben Loftis d66bda9f07 mackie send subview: potential fix for send-enable banking (vpot push) 2022-06-16 13:27:30 -05:00
Ben Loftis a992adf0c3 lua reset_mixer script: ignore hidden io processors like "main out"
* fixes a problem in Mixbus where the reset script will kill audio output
2022-06-16 13:22:20 -05:00
Ben Loftis 215acaca2e NO-OP: reset_mixer.lua remove CR at line endings 2022-06-16 13:19:59 -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 2f02b809e7
Fix save/restore of Insert-At position
UIConfig insert-at-position saves/restores the enum as integer.
This is used directly as parameter for insert_at_combo.set_active().
For this to work, the enum needs to match the order of elements
in the dropdown.

It would be preferable to register the enum, and map the
dropdown entries, but for now this does the trick, without
breaking existing UIConfigs.
2022-06-15 02:41:50 +02:00
Robin Gareus 5d10fd84eb
Reduce mixer redraws, and fix scrolling to newly added tracks
PresentationInfo::Change (Properties::selected) is emitted and
handled before Mixer_UI::add_routes() is called. At that point
in time the MixerStrip(s) to be selected may not exist.
Visual selection state was lost.

Furthermore move_stripable_into_view() calling translate_coordinates()
only works after GTK has completed the resize operation.
This lead to the mixer scrolling back to the left edge when creating
new tracks.

Also each selection change caused all tracks to be re-packed.
Now redisplay_track_list() is only called if visibility or order
changes. This signficanly improves performance with large sessions.
2022-06-15 02:41:45 +02:00
Ben Loftis cb2e51808d Lua script: reset_mixer: fix thinko that broke automation state reset 2022-06-14 18:05:12 -05:00
Robin Gareus b95bb0bdac
Prefer atomic dec_and_test (instead of atomic get+set) 2022-06-14 18:19:52 +02:00
Robin Gareus 2e2a4be3b2
Fix windows debug builds (SIGUSR1 is POSIX only) 2022-06-14 17:12:30 +02:00
Robin Gareus b8b899d3d5
Disable AU-GUI debug (revert e81dd6a943) 2022-06-14 15:02:42 +02:00
Paul Davis d060348df0 main: add a SIGUSR1 handler to allow dynamic triggering of debug bits 2022-06-13 13:48:37 -06: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 4296be2c70
Ignore double-middle-click when restoring scenes
Previously rapid middle-clicks could result in creating
a temporary mixer_scene while one is already in use.
2022-06-09 02:25:55 +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 e81dd6a943
Some more AU GUI debug messages 2022-06-07 23:49:42 +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
Ben Loftis e5c19994c9 mixer scenes: reminder for mac trackpad users: Ctrl+Alt is a middle-click 2022-06-07 16:35:14 -05:00
Ben Loftis fed731cb3d add single range marker: fix dialog to ask for a Range not a Location 2022-06-07 16:35:14 -05:00
Ben Loftis ab1d9b0e39 further work on shortcuts...
fix bindings to shifted symbols (see below)
  add shortcuts to recorder, virtual midi keyboard
  change shortcut (secondary+c) from Big Clock to Cue page

(*) shifted symbols like '+' are accessed in a very specific way, like:
<@TERTIARY@>plus
and
<@SECONDARY@><@TERTIARY@>plus
2022-06-07 16:35:08 -05:00
Robin Gareus 2d631688f4
Yet another attempt to debug/fix AU plugin window size on mac/M1 2022-06-07 17:47:07 +02:00
Robin Gareus 5a0b22f8a4
Revert "Debug AU plugin window size issues on macOS/M1"
This reverts commit 81322a4ac9.
2022-06-07 17:45:15 +02:00
Robin Gareus 81322a4ac9
Debug AU plugin window size issues on macOS/M1 2022-06-07 02:56:46 +02:00
Robin Gareus efa2efa221
Fix "muted" indicator (dup on audio-regions, missing on macOS)
RegionView::make_name already adds the prefix, AudioRegionView
does not need to add it again.

Also the font used on macOS (Lucia Grande) has a rather limited
UTF-8 charset and does not support:
 \u20F0 (COMBINING ENCLOSING CIRCLE BACKSLASH)
 \U0001F507 (SPEAKER WITH CANCELLATION STROKE)
so for now we keep using "!" on macOS.
2022-06-07 02:33:55 +02:00
Ben Loftis 828d1245c9 range analysis was only accessible by context-click; add to main menu 2022-06-06 14:17:39 -05:00