13
0
Commit Graph

295 Commits

Author SHA1 Message Date
Mads Kiilerich
6b61b03434 wscript: drop traces of shutdown() handling
autowaf has no real shutdown functionality anyway. The automatic
shutdown function that could have been called wouldn't work anyway, as
it takes an argument.

The only reason it doesn't fail is that the top level wscript has no
shutdown handling and doesn't recurse to other scripts, so it is all
dead code.
2023-10-15 10:47:16 -06:00
Mads Kiilerich
88cecdfaef wscript: drop repeated autowaf.set_options - it is enough to set at top level 2023-10-15 10:47:16 -06:00
Mads Kiilerich
d220f477ed wscript: drop unused "mandatory variables" 'top' and 'out' in libs
Variables by these names are only used from the local wscript and when
running "waf configure", which already for other reasons only can run at
the top-level.

These variables are thus not mandatory and not used.
2023-09-17 07:34:55 -06:00
65346496f5
Refactor Ctrl Surface API
* reserve "probe" to actually probe for devices
* use separate probe for libusb and MIDI port devices
* use "available" to check if surface can be used
* allow both methods to be NULL
* remove unused ControlProtocolDescriptor* argument

Most surface just return `true` for available.
2023-05-03 15:38:42 +02:00
847f1e54c1
Clean up ctrl surface API
Remove unused fields, no mandatory surfaces
2023-05-01 02:22:45 +02:00
f718279949 surfaces & event loops: i really mean no more request buffer factories 2023-04-21 13:55:58 -06:00
2713c40b7d extend midi-controllable params with new well-known-controls 2023-04-06 14:52:09 -05:00
b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
716501defa potential fix for "/bus/... master ..." target in MIDI binding maps failing 2022-12-06 11:11:08 -07:00
a6f8f2dd9e
Consolidate search/file-system paths (fixes vst builds)
Keep file-system paths and PBD::Searchpath mostly separate.
This amends 58c2b0a848 libs/fst directly includes relevant
ardour C++ code, so lib/fst must not link against libardour.

The problem was that 58c2b0a848 introduced additional
dependencies on other libardour functions.
2022-11-19 00:48:11 +01:00
58c2b0a848 move midi maps folders and file extension out of control surfaces library 2022-11-18 14:04:59 -07:00
6813884857
Restore custom generic midi settings #9062
DeviceInfo (bindings file) can include explicit motorized
and threshold settings. These values, when specified, are
used during load_bindings() during set_state and overwrote
any user customization.

Furthermore showing the GUI invalidated any prior setting
by explicitly calling binding_changed, which re-applies.
2022-11-02 17:44:00 +01:00
9a34d15b3c
Fix crash when disabling generic MIDI surface
The event-loop has to be stopped before unregistering ports
and deleting the instance.
2022-09-30 01:58:24 +02:00
luz paz
47c525315d Fix various typos
Found via `codespell -q 3 -S *.po,./.git,./share/patchfiles,./libs,./msvc_extra_headers,./share/web_surfaces,*.patch  -L ba,buss,busses,discreet,doubleclick,hsi,ontop,ro,scrollin,seh,siz,sord,sur,te,trough,ue`
2022-08-03 12:10:01 -06:00
75fe2ce095 generic MIDI: extend select function API and make argument be bank-relative, always 2022-06-05 15:37:04 -06:00
2e027e5894 generic MIDI: re-enable the "select" function 2022-06-05 15:03:48 -06:00
9758e6280f use new event loop callback to ensure that all surface/control protocol threads have tempo map ptr set 2022-05-16 15:24:52 -06:00
7bf89ce109 Constification: make Stateful::get_state() const, with all other required const-ness added (libs) 2022-04-06 21:56:59 -06:00
Mads Kiilerich
8bb91099c5 wscript: drop configure statements already present in the top level wscript
Avoid repeated pointless configure messages like:
Checking for 'g++' (C++ compiler!)                   : /usr/lib64/ccache/g++
Checking for 'gcc' (C compiler)                      : /usr/lib64/ccache/gcc
2022-01-22 22:19:03 +01:00
9ee4c14bce generic MIDI: extend menu options to drop ALL MIDI bindings, not just a binding map 2022-01-15 13:15:38 -07:00
9e763c2672 remove all dangling event-loop-precall code 2021-10-11 17:48:53 -06:00
b866335d8f add glib event loop callback to Generic MIDI surface support 2021-08-13 12:51:30 -06:00
086e48796c surfaces: first round of conversion to use timeline types 2021-08-13 12:51:29 -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
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
74e21e942e Remove unused variables (Wunused-variable) 2021-05-30 20:09:35 -04: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
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
John Emmas
d2cb383965 MSVC changes to support the new code modules (Tabbable API stuff) 2021-02-24 14:32:23 +00: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
bbb6851468
Subscribe to pretty-port name changes (surfaces) 2021-01-18 03:18:20 +01:00
ddcf3eb684 Generic Midi encoders fixed 2020-10-24 16:06:04 -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
9398a6f60a
Fix generic MIDI encoder off by one
Increment for CC values > 0x40, decrement control for values <= 40.
 - 0x41 increment by one
 - 0x40 decrement by one

previously: 0x3f decremented by one, 0x3e by two, .. 0x00 by 64,
but 0x40 also by 64.
2020-06-06 17:10:31 +02:00
43bed39d30
Reset MIDI-control when a given ctrl is not available
This fixes an issue with "/route/eq/freq/0 S1":
When a newly select strip that does not have a EQ
(e.g. mixbus or master), the control from the previously
selected strip is used.  -- Reported by tavasti on IRC.
2020-02-20 19:13:58 +01:00
06b2eb1c27
Explicitly use OSX
Previously this was inherited via PBD.

On MacOS/X,  this adds
  "-undefined dynamic_lookup -flat_namespace"
and various "-framework .." options to linkflags

Without this flag, .dylibs fail to link usually because
of missing `-lintl` (Undefined symbols: "_libintl_dgettext")

On other systems this is a NO-OP:
CFLAGS_OSX, CXXFLAGS_OSX and LINKFLAGS_OSX
are only set on the darwin platform.
2020-01-25 04:07:41 +01:00
d100c92731 convert GenericMIDI into a real control protocol module, with its own event loop and ports 2019-12-31 12:06:14 -07:00
007136cc23 remove MIDI Control input and output ports from session-level objects 2019-12-31 12:06:14 -07:00
365f6d6337
Update plugins/addons GPL boilerplate and (C) from git log 2019-08-03 15:53:18 +02:00
9ac18a8e0f
Generic-MIDI ctrl: tweak pitch-bend message behavior
Add support for smoothing, ignore message when controllers are
not in sync to avoid discontinuous jumps.

This is mainly useful for Mackie-like devices that use pitch-bend
messages for faders.

see also https://discourse.ardour.org/t/feature-lazy-sliders/100961
2019-05-09 16:06:00 +02:00
5bde8f4456
Tweak initial generic-midi sync/smoothing
"last_controllable_value" is using midi value range (0..127).
It is used to compare received midi-value with the actual controllable
for non-motorized surfaces, and this change allows the first
event to already be in_sync.

Previously the first MIDI-event was usually ignored (because
last_controllable_value was out of bounds or didn't match the 0..127
range.
2019-05-05 02:49:53 +02:00
3448f3151e
NO-OP: whitespac 2019-03-23 17:35:26 +01:00
c97116083f
Fix generic-midi controllable race-condition
Continued work after e9b36f2bea. Prefer a shared_ptr<>.

MIDIControllable::write_feedback() runs in realtime context, directly
from the main process-thread. Synchronizing weak-pointers and deletion
across threads does not work reliably. Retaining a shared_ptr<> for
controllables that are in use can solve this.
2019-03-23 16:32:48 +01:00
73029d45ba
Re-add global lookup for generic-midi ctrl state 2019-03-23 04:24:39 +01:00
e9b36f2bea
Update GenericMidiControlProtocol to use shared/weak Controllable pointers
This fixes a race-condition when a controllable is deleted
while sending feedback to the device.

Previously there was a race-condition MIDIControllable::write_feedback()
triggered from rt-thread, processed in Surface-thread and deleting
a route or processor.

This is a first step, currently state-restore is not fully functional
session->controllable_by_id() does not cover all Controllables.
2019-03-23 02:09:39 +01:00
baed14c17e
Prepare PBD::Controllable API cleanup (remove only registry user) 2019-03-23 01:41:55 +01:00
9a1c22d7e1
Remove unusued API Create/Delete Binding 2019-03-23 01:28:23 +01:00
b6b353d452 Handle generic-midi bindings per session.
This allows to special-cases session-specific control-surface state.
e.g. midi-learn.

Only restore midi-learned, session-specific, bindings when loading a
session with generic-midi enabled.

Also dis/re-enable generic-midi resets midi-learned, but no other
session-independent settings.

This also handles the edge case:
 1) load global config, generic-midi = ON, w/ bindings.
    state is remembered as cpi->state
 2) load session-condig, generic-midi = OFF, cpi->state is retained
 3) user enables the surface, cpi->state from (1) is applied.
 -> invalid bindings applied -> fail
2018-10-04 02:30:21 +02:00