13
0
Commit Graph

2228 Commits

Author SHA1 Message Date
e94239cc92 Mackie Control Surface: Update the meters even when the transport is stopped 2021-07-02 15:53:20 -05:00
41ac0cb753 Mackie Control Surface: Correctly handle the Monitor section being removed.
Adding a Monitor section updated the surface but removing one did not.
2021-07-02 15:51:53 -05:00
c63918ec68 Clear Mackie Control surfaces once connected.
This gets the surface in a known state. Otherwise a previous application
or run of ardour may have left LEDs on that are not being used.
2021-07-02 15:43:37 -05:00
b35a8f6626
Fix Wsign-compare, consistently use microseconds_t 2021-06-29 02:04:02 +02:00
b20a541d7e change PBD::microseconds_t to a signed type and check for -1 in TimingStats::update
This may help a Windows issue with the return value of QueryPerformanceCounter
2021-06-28 14:47:48 -06:00
b58dfc7f0f
Resolve microseconds_t ambiguity 1/2
This resolves a PBD vs ARDOUR namespace error for some compilers:
```
error: reference to 'microseconds_t' is ambiguous
libs/pbd/pbd/microseconds.h:29:19: error: candidates are: typedef uint64_t PBD::microseconds_t
libs/ardour/ardour/types.h:81:29: error:                  typedef PBD::microseconds_t ARDOUR::microseconds_t
```
2021-06-27 17:33:05 +02:00
9cbaa31c7e libs fix for get_microseconds() move to libpbd 2021-06-26 18:27:39 -06:00
83b9ab1bee
Temporarily revert ongoing varispeed development
This reverts bf88f3fe64
until 35813db0f4

in order to move development into a branch, until after the
upcoming 6.8 release
2021-06-26 18:58:24 +02:00
006055a2ff Default_Play_Speed: prep work (libardour)
* remove unused variables in session.h
* move default play speed (varispeed(sic)) into fsm
* request_transport_speed should -never- set the default_play_speed
2021-06-25 11:51:34 -05:00
db1821a363
Fix crash when removing plugin with mapped controllable #8756
MidiControlUI drops the reference to a given controllable in
its own thread. This can happen after the plugin is already
destroyed (even though the PBD::Controllable still exists).
2021-06-21 05:27:11 +02:00
e7466bddbc Push2: Clean up forward declarations 2021-06-18 13:53:53 -04:00
cc6b58ef00
Fix Windows builds (pthread handle abstraction) 2021-06-17 13:32:10 +02:00
f85bbaa97d
Fix C++11ism 2021-06-16 03:03:26 +02:00
Luciano Iam
04104b68a6 WebSockets: fix surface build for older systems 2021-06-14 14:50:48 +02:00
Luciano Iam
5fffe985bb WebSockets: update some source headers 2021-06-14 14:45:51 +02:00
Luciano Iam
6cc59ad8e6 WebSockets: update some comments in source
Based on feedback from libwebsockets author
https://github.com/warmcat/libwebsockets/issues/2322#issuecomment-860572124
2021-06-14 12:25:29 +02:00
Luciano Iam
f1d7e1759a WebSockets: repeat 8baf275 for JS files
Like ec131fc does
2021-06-14 10:25:45 +02:00
Luciano Iam
ebee3a8010 WebSockets: remove unnecessary code
Leftovers from copy and pasting from test_ui.cc
2021-06-14 10:02:25 +02:00
Luciano Iam
cb73eb350d WebSockets: less invasive version of 5407232
There is no need to connect signals twice, can connect them directly to the
helper UI loop and skip the surface loop. Then let the server decide if it is
necessary to call lws_cancel_service() or not.

Also rename WebsocketsServer::should_request_write() to read_blocks_event_loop()
it makes more sense for the caller now on-demand write logic is completely
implemented by the server class.
2021-06-14 10:02:25 +02:00
Luciano Iam
e3569b6469
WebSockets: notify server there are pending client updates
This is an update to the surface ArdourFeedback class that is needed to support
the new event loop integration method.

The various session event callbacks cannot be queued in the surface event loop
because that would create a delay between the time such events are fired and
the time for writing to clients arrive, due to lws_service() blocking while
it waits to read. To solve this issue a helper AbstractUI is created for
catching events as soon as possible and issuing a call to lws_cancel_service().

See WebsocketsServer::glib_idle_callback()
2021-06-13 22:00:29 +02:00
Luciano Iam
b3661af92a
WebSockets: additional method for event loop integration
Some distro repositories offer versions of libwebsockets that have not been
compiled with LWS_WITH_GLIB or LWS_WITH_EXTERNAL_POLL enabled. For such cases
a different event loop integration method is needed.

True for Ubuntu 20.04 as of Jun '21
2021-06-13 22:00:29 +02:00
Luciano Iam
5f504f23ac
WebSockets: reduce server log verbosity 2021-06-13 22:00:28 +02:00
Luciano Iam
373d905a93
Update websockets surface author email in source files 2021-06-13 22:00:28 +02:00
Luciano Iam
12a7480ea3
Move #include inside header guard 2021-06-13 22:00:28 +02:00
b75a37abdb fix arguemnts to transport call in shared control surface code for transport_play() 2021-06-08 08:32:19 -06:00
74e21e942e Remove unused variables (Wunused-variable) 2021-05-30 20:09:35 -04:00
1b4aaea92a Remove unused private fields (Wunused-private-field) 2021-05-30 20:09:35 -04:00
2e501fd77a ensure the BasicUI implementation of rewind/ffwd is the same as the ARDOUR_UI one 2021-05-19 18:32:00 -06:00
a5a2f111ee Remove debug line 2021-05-18 14:32:38 -07:00
0130f19e26 Fix positions before start and after end 2021-05-18 14:27:20 -07:00
f9557d0d04 Remove unused code 2021-05-17 13:50:18 -07:00
ab7c6e74e0 OSC, update marks list better. 2021-05-17 13:34:19 -07:00
Tobias Kannenberg
e4a6e981d9 fix OSC "/marker" feedback 2021-05-17 13:31:03 -07:00
3a3fcd0d2d Don't crash if master fader is not avaliable.
If the wrong device profile is selected (ex Xtouch One) but another device
is connected (Xtouch), it is possible to have a master fader on the
device, but not in the code. This would then cause a crash when the
master fader was touched.

This just protects from a wrong configuration.
2021-05-13 12:08:09 -05:00
0fc50b9bf2 Mackie Control: set select state correctly during initial setup 2021-05-11 15:55:04 -06:00
57b3df8b22 copy over (boo!) transport control changes to BasicUI (control surfaces) 2021-05-08 09:20:21 -06:00
4d815554dd Various Control Surfaces: Fix one off in calculation of fader position
MIDI pitch bend holds 14 bits (16384) which gives values of 0 to 16383.
2021-05-07 18:02:44 -05:00
5957e14259
Remove unused #include<> (2/2)
PBD::stacktrace() is not used nor needed by default.
It should be used sparingly.
2021-05-05 17:57:16 +02:00
273049a5a1 Mackie Control: if master surface has a jog wheel *and* a scrub button, button toggles between scroll and shuttle behavior 2021-05-04 21:30:22 -06:00
1757cfb8ef use rewind/ffwd option to alter behavior of control surface rewind/ffwd buttons
This does not affect GUI equivalents (yet)
2021-05-04 20:52:01 -06:00
cd4aaa808e use button_varispeed() in BasicUI::rewind() and BasicUI::ffwd() 2021-05-04 16:38:28 -06:00
009e971bfb correct the implementation of BasicUI::button_varispeed() to provide incremental speed shifting (by semitones) in both directions 2021-05-04 16:38:02 -06:00
fbd1221833 move FaderPort8 method "button_varispeed()" into BasicUI for more general use 2021-05-04 16:10:24 -06:00
8e868fc743 remove unnecessary 2nd argument from Session::request_locate() calls (default value is identical) (surfaces edition) 2021-05-03 17:40:41 -06:00
f94aec5a59 fix/improve BasicUI's methods for rewind/ffwd/play (used by various surfaces) 2021-04-19 16:14:09 -06:00
48e5607f7c use Session::request_roll() instead of request_transport_speed (1.0, ...) 2021-04-19 16:14:08 -06:00
52b7e68102 use new Session transport API calls in GUI 2021-04-19 16:14:08 -06:00
e0a6aba28d
Ignore saved port-name when loading ctrl-surface state
In some cases old and/or conflicting port names were saved
with the session (e.g. "Faderport" for FP1,8). Loading old sessions
then merges this state into the config, which could lead to
port-registration failure when the surfaces was enabled.
2021-04-17 02:07:09 +02:00
c212909282
Ctrl-surface: do not name single-channel bundle ports
Follow Session::setup_bundles() lead for single channel
MIDI bundles. This cleans-up the port-matrix display and
removes redundant names. The underlying engine port-name
is not of interest to the user.
2021-04-17 00:43:20 +02:00
72db091619
Fix crash at exit with classic Faderport
FaderPort::~FaderPort () can be called while
FaderPort::map_gain() is called from FaderPort::periodic()

```
Thread 71 Crashed:
0      libardour_faderport.dylib          	0x0000000110539c3a ArdourSurface::FaderPort::map_gain() + 138
1      libardour_faderport.dylib          	0x000000011053996d ArdourSurface::FaderPort::periodic() + 109
2      libglibmm-2.4.1.dylib                  	0x000000010bf21da8 Glib::TimeoutSource::dispatch(sigc::slot_base*) + 56
3      libglibmm-2.4.1.dylib                  	0x000000010bf20c97 Glib::Source::dispatch_vfunc(_GSource*, int (*)(void*), void*) + 39
4      libglib-2.0.0.dylib                      	0x000000010c012496 g_main_context_dispatch + 326
5      libglib-2.0.0.dylib                      	0x000000010c01281a g_main_context_iterate + 474
6      libglib-2.0.0.dylib                      	0x000000010c012b3f g_main_loop_run + 191
7      libpbd.dylib                                    	0x000000010bcee42e BaseUI::main_thread() + 254
8      libglibmm-2.4.1.dylib                  	0x000000010bf16373 (anonymous namespace)::call_thread_entry_slot(void*) + 35
9      libglib-2.0.0.dylib                      	0x000000010c03dd0a g_thread_proxy + 90
10    libsystem_pthread.dylib              	0x00007fff759e42eb _pthread_body + 126
11    libsystem_pthread.dylib              	0x00007fff759e7249 _pthread_start + 66
12    libsystem_pthread.dylib              	0x00007fff759e340d thread_start + 13
```

While the GUI thread has already closed the MIDI ports in ~FaderPort
and proceeded to take down the FP GUI.

```
Thread 0:: Dispatch queue: com.apple.main-thread

47    libgtkmm-2.4.1.dylib                    	0x000000010ca69a56 Gtk::ComboBox::~ComboBox() + 22
48    libardour_faderport.dylib          	0x000000011055a6e5 ArdourSurface::FPGUI::~FPGUI() + 149
49    libardour_faderport.dylib          	0x000000011055a8b5 ArdourSurface::FPGUI::~FPGUI() + 21
50    libardour_faderport.dylib          	0x0000000110551396 ArdourSurface::FaderPort::tear_down_gui() + 70
51    libardour_faderport.dylib          	0x0000000110536507 ArdourSurface::FaderPort::~FaderPort() + 535
52    libardour_faderport.dylib          	0x0000000110536b9e ArdourSurface::FaderPort::~FaderPort() + 14
53    libardour.dylib                              	0x000000010ac13f08 ARDOUR::ControlProtocolManager::drop_protocols() + 168
54    libardour.dylib                              	0x000000010b0ba7e4 ARDOUR::Session::destroy() + 212
55    libardour.dylib                              	0x000000010b0bbe01 ARDOUR::Session::~Session() + 113
56    libardour.dylib                              	0x000000010b0bdb5e ARDOUR::Session::~Session() + 14
2021-04-07 02:25:52 +02:00
Daniel Ceregatti
362b9cb4fa
Maschine Mikro MK2 support 2021-04-01 20:07:55 +02:00
c96462f7bb
maschine2: gtk is an indirect dependency of libgtkmm2ext 2021-03-26 18:44:20 +01:00
345726e223
Get NI maschine surface to compile again 2021-03-26 01:16:30 +01:00
b064b3c136 OSC: fix some compiler warnings 2021-02-28 20:01:06 +01:00
0c3eaf188b OSC: liblo compatibility fix
see also 770fd1519c
2021-02-28 20:00:04 +01:00
770fd1519c
Liblo compat fix
Upstream liblo changed the opaque type `lo_message` from void*
to a custom struct {}.

2c1ef1c682/
2021-02-28 02:25:02 +01:00
John Emmas
d2cb383965 MSVC changes to support the new code modules (Tabbable API stuff) 2021-02-24 14:32:23 +00:00
07c16d38a2 control surfaces: make methods used for transport control (BasicUI) do the right thing w.r.t. default speed 2021-02-12 09:36:52 -07:00
acfa04d700
Update Ctrl-surface MIDI port list when ports change
This is a better variant of bbb6851468, directly using
the GUI context without indirection.
2021-02-04 06:19:37 +01:00
cd524f70dc OSC, strip and select share all main strip functions
Allow blocking strip commands for master or monitor
2021-01-23 21:18:32 -08:00
a9f0f771c1 Reuse the same code for strip and select
Combine Maser and Monitor to reuse code

Started adding query functionality

	Added query functionality to all touchosc fixed commands
2021-01-23 21:17:46 -08:00
eed07770e1
Fix Faderport1 port-connection (amend bbb68514) 2021-01-22 18:46:17 +01:00
8386874a03
OSC: Allow to specify marker name #8543
Patch from atsampson
2021-01-18 23:36:35 +01:00
bbb6851468
Subscribe to pretty-port name changes (surfaces) 2021-01-18 03:18:20 +01:00
1737dc1869
Revert "Fix typo in OSC gain feedback message"
This was not a typo after all, but a way to show the gain in the
name-display, as per manual:
> In the case where Gainmode is set to position, the track name
> will show the dB value while values are changing.

This reverts commit 3290d66a43.
2020-12-17 17:30:24 +01:00
3290d66a43
Fix typo in OSC gain feedback message 2020-12-17 00:58:28 +01:00
ce43161d4e
WebSockets: log hostname and listen-port 2020-11-23 20:12:57 +01:00
7d4cd5c76a
Fix C++11ism 2020-11-20 13:32:20 +01:00
6ca4980e71
FP8: Allow to sort plugin-params by priority 2020-11-20 06:04:32 +01:00
Luciano Iam
9ee828b47b
WS: properly support MIDI strips 2020-11-19 17:03:36 +01:00
ddcf3eb684 Generic Midi encoders fixed 2020-10-24 16:06:04 -07:00
a266a2d5b9
Use session API to set solo
This is required so that ::update_route_solo_state() is called
to propagate solo/mute state
2020-10-18 15:28:10 +02:00
72736289c8
NO-OP: rename API rename
CP selection API is now implemented as functions, not signals.
2020-10-18 14:47:05 +02:00
84bf97aa49
Update ControlProtocol API, use CoreSelection
* replace signal-emission with direct calls to CoreSelecton
  using BaseUI's session pointer
* remove unused leftmost strip API
* use CoreSelection for first-selected strip
* Accessing CoreSelection does not modify the session
  (allow access from const callbacks)
* replace static calls in P2 surface

This removes indirection and dependency on the GUI for
managing strip selection.
2020-10-18 14:44:38 +02:00
dcea35191c
Consolidate code: use API to print plugin-type 1/2 2020-09-15 16:03:33 +02:00
Luciano Iam
9c08c058a3
WS: crash bugfix related to missing strip panner
Surface made Ardour crash when a client connected
and some session track was not a VCA nor had a panner,
like MIDI strips.
2020-09-04 01:59:53 +02:00
63a117bf93
And another boost/C++11 fix
This fixes Undefined symbols:
"ArdourSurface::hash_value(ArdourSurface::NodeState const&)", referenced from:
  boost::hash<ArdourSurface::NodeState>::operator()(ArdourSurface::NodeState const&) constin client.cc.1.o
  boost::hash<ArdourSurface::NodeState>::operator()(ArdourSurface::NodeState const&) constin server.cc.1.o
2020-08-31 08:28:50 +02:00
a9c2350e87
Fix yet another C++11ism 2020-08-31 07:52:48 +02:00
39110463f3
Amend cdd48926d1 use ScopedConnectionList directly 2020-08-31 07:41:11 +02:00
cdd48926d1
Remove more libwebsocket C++11isms
* amend previous commit, fix runtime_error implementation
* Do not copy-construct classes that have a PBD::scoped connection list.
  Replace std::map::emplace[C+11], an store shared pointers the std::map.
* Update ArdourMixerStrip is-a ScopedConnectionList (not has-a)
2020-08-30 22:57:43 +02:00
8eb4dcb675
Fix websocket C++11ism 2020-08-30 21:15:33 +02:00
af79240c81
Namespace libwebsocket surface classes
Using the global names-pace for classes named "Json", "TypedValue",
"ArdourTransport", "ArdourMixerPlugin" etc is not acceptable.
2020-08-30 21:15:07 +02:00
Luciano Iam
665e0686e5
WS: noop use a namespace for JSON utilities
Instead of a class with static methods

Also correct some whitespace to prevent triggering of OCD cycles
2020-08-30 19:29:28 +02:00
Luciano Iam
aa38491b7d
WS: move VCA detection to mixer strip interface
Expose the wrapped Stripable the least as possible
2020-08-30 19:29:28 +02:00
Luciano Iam
e510c0cb75
WS: consistent naming of strip/plugin/param identifiers
Rename all {object}_n variables and arguments to {object}_id

Parts of code were using the former convention, now use the latter everywhere
Another step towards supporting visual position agnostic identifiers in the future
2020-08-30 19:29:28 +02:00
Luciano Iam
c32a5917f3
WS: handle strips and plugins removal 2020-08-30 19:29:27 +02:00
Luciano Iam
a8f917e7e2
WS: prepare for handling object disconnections
Use maps instead of vectors for holding strips and plugins
This allows to deal with "holes" after objects are removed

Also paves the way for a future improved way of identifying
individual strips and plugins
2020-08-30 19:29:27 +02:00
Luciano Iam
7521d8ab6f
WS: add some meaningful error messages 2020-08-30 19:29:27 +02:00
Luciano Iam
3509fe1589
WS: use an object-oriented internal API for the mixer
- This allows to better handle strips & plugins connection lifecycles
- Coherent with the JS client design
2020-08-30 19:29:27 +02:00
Luciano Iam
4a4734fbb1
WebSockets: properly release strips and plugins when removed
This should fix some crashes reported by the beta testing team
2020-08-30 19:29:27 +02:00
87f7dcc5f6 OSC Panner feedback crash with no panner
both select and route feedback now test for both
	route and panner (not VCA)
2020-08-29 17:08:56 -07:00
1cc9573dba OSC toggle roll make return to zero optional 2020-08-20 16:26:07 -07:00
b8da1d0265 fix toggle_roll will only start but not stop PH 2020-08-20 16:26:07 -07:00
dfe2270c9f
Revert "WebSockets: properly release strips and plugins when removed"
This reverts commit f007ba6b46.
2020-08-19 23:59:38 +02:00
Luciano Iam
f007ba6b46
WebSockets: properly release strips and plugins when removed
This should fix some crashes reported by the beta testing team
2020-08-19 19:01:18 +02:00
c8bc9a25b3 Added strip feedback for new automation states
for mute, trim and panner
2020-08-19 09:45:44 -07:00
5ce796f0b5 Added strip feedback for new automation states
for mute, trim and panner
2020-08-19 09:45:44 -07:00
ab0217f3a2 Added touch to more stripable controls
pan azimuth and width
	mute and trim
2020-08-19 09:45:44 -07:00
d5016f80d3 Added automation control to the rest stripable controls
Pan azimuth
	Pan Width
	trim
	mute
2020-08-19 09:45:44 -07:00
fcd347fe0c
Fix --no-nls, i18n include order in libs -- #8361
Ardour's "pbd/i18n.h" needs to be included last,
after any include that may indirectly pull in getext or libintl.

For that reason "pbd/i18n.h" must not be used in header files either.
2020-08-19 17:39:32 +02:00