Commit Graph

38139 Commits

Author SHA1 Message Date
Paul Davis 75802cc47b lppro: momentary mode for all fader layouts 2023-08-30 16:06:14 -06:00
Paul Davis ee0d5cfc40 lppro: working gain faders 2023-08-30 16:06:14 -06:00
Paul Davis bc7f25e52c libpbd: AbstractUI must call & destroy sigc::trackable callbacks in its destructor
AbstractUI IS-A BaseUI IS-A EventLoop
                       IS-A sigc::trackable

If we have sent a call_slot() request to an EventLoop that has not executed
when the object involved in the call_slot() functor is destroyed, we need to
ensure that the request is invalidated.

To do this, We register "notify" callbacks with the sigc::trackable that is a
base class of the object involved in the functor given to
call_slot(). sigc::trackable will call these "notify" callbacks from its
destructor.

So when the call_slot() functor's relevant object dies, and its sigc::trackable
base class is destroyed, it will invoke all of its the "notify" callbacks, which will
in turn call EventLoop::invalidate_request() and this hopefully marks all the
queued call_slot() functors as "do not call".

However, invalidate_request() requires a lock, and access to the lock is
granted via a pure virtual, EventLoop::slot_invalidation_lock(). In the
heirarchy cited above, this is implemented by AbstractUI.

When we destroy an AbstractUI, ~AbstractUI() is called first, and this destroys
the lock and changes the VTT so that ::slot_invalidation_lock() becomes a pure
virtual again.

Eventually we will call ~trackable() which in turns runs all the "notify"
callbacks, and then removes them. But when these callbacks end up in
EventLoop::invalidate_request(), we try to call ::slot_invalidation_lock() and
C++ will abort because of its (now) pure virtual status.

Therefore, we must invoke the "notify" callbacks before the
::slot_invalidation_lock() becomes pure, and that means inside ~AbstractUI, as
an explicit call to trackable::notify_callbacks().

This has not appeared before (remarkably), but became an issue when the
Launchpad Pro support code's main object (derived from MIDISurface and hence
from AbstractUI) "failed" to use sub-objects for its various methods. So when
it connects to, for example, the Session::RouteAddedOrRemoved signal, it is
connecting itself (derived from a sigc::trackable). When the Launchpad Pro
object is destroyed, it tries to invalidate all the call_slot() requests, but
this requires access to an event loop lock - owned by the Launchpad Pro event
loop, which is already destroyed!

Other surfaces have generally avoided this by using other objects to provide
methods of dealing with signals from libardour objects.
2023-08-30 16:06:14 -06:00
Paul Davis 187557df57 midi surfaces: use an event loop invalidator for call_slot() 2023-08-30 16:06:14 -06:00
Paul Davis d5ad9ff033 libpbd/guis: move __invalidator() into PBD::EventLoop
we allow use of/dependency on sigc::trackable there, so this is
both legal but also sensible.

Leave the macro definition of invalidator(x) in gtkmm2ext/gui_thread.h
because it doesn't hurt and makes some sense for it to be there. No
reason for a source module that needs invalidator(x) to load EventLoop
decl.
2023-08-30 16:06:14 -06:00
Paul Davis f5f48b421e lppro: get long press working, add undo/redo/metronome 2023-08-30 16:06:14 -06:00
Paul Davis 9ee7c33737 lppro: solo, mute, rec-enable basics 2023-08-30 16:06:14 -06:00
Paul Davis a6e9d6ecd1 lppro: fix selection button color when "off" 2023-08-30 16:06:14 -06:00
Paul Davis 784fa82081 lppro: selection enabled and displayed 2023-08-30 16:06:13 -06:00
Paul Davis a49c961189 lppro: handle new slots and new routes and improve color display 2023-08-30 16:06:13 -06:00
Paul Davis 5deea0c077 libpbd: change static trigger property change signal to take Trigger*
When we add a region to a slot, we create a new Trigger, set its region,
then arrange for an "atomic" swap with the existing Trigger. This
means that the property change signal is emitted on a Trigger that
does not yet exist inside a TriggerBox, and so cannot be found using
row/col or x,y coordinates. Pass a raw pointer instead (lifetime
management is not an issue ... or is it.
2023-08-30 16:06:13 -06:00
Paul Davis f3861a79b6 lppro: more work on displaying triggers, including return of the color map 2023-08-30 16:06:13 -06:00
Paul Davis f65e0b85a8 libpbd: add operator<< for PropertyChange 2023-08-30 16:06:13 -06:00
Paul Davis 1ea104eac1 lppro: fix invalidators 2023-08-30 16:06:13 -06:00
Paul Davis 5cfa881fa9 lppro: more state tracking, stop clip handling etc. 2023-08-30 16:06:13 -06:00
Paul Davis 9fa2fccb5c lppro: track trigger state changes 2023-08-30 16:06:13 -06:00
Paul Davis 6cf7b89aaf triggerbox: fix argument ordering error in static trigger property signal 2023-08-30 16:06:13 -06:00
Paul Davis fef1cfa83b lppro: pads launch clips 2023-08-30 16:06:13 -06:00
Paul Davis c81027fc84 triggerbox: add static signals to allow an object to watch all trigger state changes 2023-08-30 16:06:13 -06:00
Paul Davis 2f9fd8e288 launchpad pro: basics of pad/button handling, complete with cue launch and transport control 2023-08-30 16:06:13 -06:00
Paul Davis 9438914aca ctrl surfaces: fix logic error in toggle_roll() for surfaces 2023-08-30 16:06:13 -06:00
Paul Davis 7406ad01bd lppro: continuing adventures with shadow ports and pad maps 2023-08-30 16:06:13 -06:00
Paul Davis 88a599816a fix name of port bundle for MIDI surface shadow port 2023-08-30 16:06:13 -06:00
Paul Davis 1d1ba186b9 lppro: reorder x,y <-> note to put upper left at 0,0
This seems like more work than it should be
2023-08-30 16:06:13 -06:00
Paul Davis 8209cb0ab5 launchpad pro: remove color map; implement note/x,y mapping 2023-08-30 16:06:13 -06:00
Paul Davis 860f354e98 continuing to try to debug LPP initialization in DAW mode 2023-08-30 16:06:13 -06:00
Paul Davis 054a09b567 launchpad pro: full communication and note/pad mapping functional 2023-08-30 16:06:13 -06:00
Paul Davis af01a55e48 MIDISurface: minor tweaks to DEBUG_TRACE output 2023-08-30 16:06:13 -06:00
Paul Davis f8ed004be0 make MIDISurface::midi_input_handler() public
It needs to be public to bind it to a signal from a derived class.
Silly C++.
2023-08-30 16:06:13 -06:00
Paul Davis 7130deafdf fix AbstractUI redefine of DEBUG_TRACE to still use PBD::debug_print-ish stuff 2023-08-30 16:06:13 -06:00
Paul Davis 37f859197b use PBD::DEBUG::Threads as a toggle to show thread ID/name with debug output 2023-08-30 16:06:13 -06:00
Paul Davis a59c217205 extend PBD::Debug API to provide a method that doesn't send to debug Transmitter 2023-08-30 16:06:13 -06:00
Paul Davis 36ada549b2 lppro: scroll text method (doesn't seem to work) and new sysex header vector 2023-08-30 16:06:13 -06:00
Paul Davis 599998bd1f midisurface: add a vector constructor for MidByteArry
plus a few minor code tweaks
2023-08-30 16:06:13 -06:00
Paul Davis 7e0315bc5e lppro: working mode setting and control 2023-08-30 16:06:13 -06:00
Paul Davis 45e3408595 minor tweak to MIDISurface API
Allows connecting additional ports to our parsers
2023-08-30 16:06:13 -06:00
Paul Davis 13508efef3 lpp: successfully enter programmer mode 2023-08-30 16:06:13 -06:00
Paul Davis b93385e9ae lppro: steps to an ecology of ... no wait, just some stuff 2023-08-30 16:06:13 -06:00
Paul Davis 9d153af72d image for launchpad pro "gui" 2023-08-30 16:06:13 -06:00
Paul Davis c4529f4654 NO-OP: variable name tweak 2023-08-30 16:06:13 -06:00
Paul Davis 3fa15d9162 skeleton for launchpad pro support 2023-08-30 16:06:13 -06:00
Paul Davis 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
Robin Gareus 7997c83b01
Allow to edit arrangement label in sidebar 2023-08-30 23:04:39 +02:00
Paul Davis 44e1de4261 no warning dialog about tempo map cut/copy/paste
Left in place since it may come back in a different form
2023-08-30 14:16:21 -06:00
Paul Davis 7aa1863c0f somewhat working tempo map cut/copy/paste 2023-08-30 14:16:21 -06:00
Paul Davis 076320430a assert() that the tempo & Meter markers associated with a BBT marker exist 2023-08-30 14:16:21 -06:00
Paul Davis 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
Paul Davis 2e08ff01f5 temporal: add TempoMapCutBuffer::empty() 2023-08-30 14:16:21 -06:00
Robin Gareus 797c362500
Fix segfault when undoing marker deletion
find_location_markers() may return NULL.
This also consolidates code from acc55083e5
2023-08-30 20:46:20 +02:00
Robin Gareus aaff022fd2
Fix typo in dbda07f6b7 2023-08-30 19:40:19 +02:00