13
0
Commit Graph

16182 Commits

Author SHA1 Message Date
e16ac09e54
Clean up 135814cf0, prefer PannableChanged signal
This allows to also catch cases when a panner-ui directly changes
set_linked_to_route() of the panner shell.
2020-04-25 16:26:37 +02:00
afc8dd9022 fix thinko in Session::should_ignore_transport_request() and drop out of external sync if command is allowed
The semantics are that if the user configures things to allow transport commands while
using a transport master, issuing such commands first stops using the master
2020-04-24 14:22:06 -06:00
58304b3a7e make Session::should_ignore_transport_request() non-const 2020-04-24 14:20:59 -06:00
12b48fff76 fix parentheses around expression that prevented port flags from being set for ltc slave 2020-04-24 11:51:45 -06:00
e6b12bd0aa ensure that when a Session emits Port::PortDrop, transport master ports are left in place 2020-04-24 11:50:43 -06:00
ea8d1d09d4
Fix MacOS builds (API change in 705ac7bfc5) 2020-04-24 07:06:40 +02:00
dbcbfd7b5b
Fix builds, missing include 2020-04-24 01:53:59 +02:00
2aa5e90290
Update Russian translation 2020-04-24 01:06:16 +02:00
135814cf0d
Expose pan-link via Send API, emit signal on change 2020-04-24 00:57:15 +02:00
e15b5c6e6b
Clean up Audition realtime_overwrite
Auditioner seek calls are explicitly handled by the butler,
and DR:overwrite_existing_buffers() is called explicitly
to read MIDI data for audition.

Session::non_realtime_overwrite is no longer required.

This reverts commit 6fbcf83779
and parts of 2d11667ce3.
2020-04-23 17:08:09 +02:00
54bc1018d5
Fix MIDI auditioning
The Auditioner is not part of the session route-list and the
auditioner route's I/O latency is never updated.
Session::process_audition() does not handle pre-roll either,
so it need to be zeroed, otherwise Route::roll skips samples.

This has lead to initial samples being skipped, IFF the
auditioner's output-port had non-zero latency.

Since private port-latencies are usually only set for routes
in the route-list, and _remaining_latency_preroll is reset
at transport-stop, this *usually* worked...

Last but not least, MIDI notes need to be resolved when seeking.
2020-04-23 05:23:31 +02:00
6fbcf83779
Don't add the Auditioner to the route-list
This fixes a bug introduce in 2d11667ce3. The Auditoner
was accidentally added to the shared_ptr<> referenced RouteList.
2020-04-23 04:58:51 +02:00
40eefeddd6
Micro optimization: cache output IO latency
IO::latency iterates over the port-set retrieving the
private_latency_range of each port. Since it can only change
when connections and latency changes, we can instead cache the value.

This is also in preparation to allow the auditioner to override it.
2020-04-23 04:56:45 +02:00
6b10987e4b
Fix Auditioner edge-case when synth cannot be loaded 2020-04-23 02:30:16 +02:00
c264ab6c95
Remove debug output 2020-04-23 02:29:45 +02:00
afad873a22
Fix parsing XML with blanks from memory
This is needed when the butler thread loads a plugin with
MIDNAM. xmlKeepBlanksDefault() setting is per thread.

see also df3a4ed9c6
2020-04-23 02:28:48 +02:00
705ac7bfc5
Prevent huge stack allocations for MIDNAM files
xmlParseMemory() uses a c-pointer char*.
Previously MIDNAM data on the heap were wrapped inside
a std::string only to be later accessed via c_str().
2020-04-23 02:25:38 +02:00
3d166c7789
Consolidate stack-size and priority of rt-threads 2020-04-23 01:28:58 +02:00
Luciano Iam
ea16fc51d3
WebSockets: fix guard header in json.h 2020-04-22 21:59:35 +02:00
Luciano Iam
dbb26daafa
WebSockets: also json-escape strings in state messages 2020-04-22 21:59:35 +02:00
Luciano Iam
946094b25c
WebSockets: also json-escape paths in manifests
Extends 3c423d9
2020-04-22 21:59:35 +02:00
Luciano Iam
c362605b49
WebSockets: add some TO DO comments 2020-04-22 21:59:35 +02:00
Luciano Iam
8b65b0a961
WebSockets: disable http caching if NDEBUG is set
This is useful while developing web surface javascript code
2020-04-22 21:59:35 +02:00
Luciano Iam
ff7b7fe6a7
WebSockets: fix a comment in server.cc 2020-04-22 21:59:34 +02:00
9a93583ef7 fully initialize SMF tempo information to default (4/4, 120bpm)
Leaving CPC and 32nd-per-quarter at -1 causes arithmetic errors later if the SMF
file doesn't contain an explicit time signature meta-event
2020-04-21 21:17:14 -06:00
2d11667ce3
Fix MIDI audition and audition seeking
DiskReader::seek() no longer fills MIDI buffers.
MIDI is now read into memory via DR:overwrite_existing_buffers()

There is still some edge-case remaining to be fixed. For
some reasons the synth does not receive initial patch/program
changes when starting auditioning.
2020-04-22 05:09:30 +02:00
d03a3903a0
Take lock to add/remove custom MIDNAMs
update_custom_midnam() is usually called from the GUI or butler
thread when a LV2 plugin is instantiated, or the plugin changes
its MIDNAM. It must be exclusive with load_midnams_in_thread()
and calls from MTAV to ::maybe_use().
2020-04-22 05:02:58 +02:00
Luciano Iam
80dc3a38e0 WebSockets: let clients know if a strip is a VCA
This allows to hide the panner for example
2020-04-21 16:20:24 +02:00
Luciano Iam
68463cb591 WebSockets: add checks for VCA stripables
Also include VCAs when sending strip descriptions
2020-04-21 15:53:27 +02:00
Luciano Iam
cc08a2d945 WebSockets: compatibility fixes for Windows
Escape path strings in surfaces.json
Default to index.html in mount points
2020-04-21 15:53:27 +02:00
05650a0156
Add Lua Bindings for Internal Sends 2020-04-21 15:34:20 +02:00
Fred Rech
1c7c0533c2
Revise French translation -- #8035 2020-04-20 23:55:39 +02:00
Luciano Iam
d5c2af1cfb
WebSockets: NOOP fix comment in manifest.cc 2020-04-20 22:59:17 +02:00
Luciano Iam
3c423d9265
WebSockets: json-escape user strings loaded from manifest.xml 2020-04-20 22:59:17 +02:00
Luciano Iam
4f2fdb10a3
WebSockets: send caching headers for static resources 2020-04-20 22:59:16 +02:00
Luciano Iam
7118eff7eb
WebSockets: transport surface implementation 2020-04-20 22:59:16 +02:00
Luciano Iam
dc97bf3ff0
WebSockets: output position time in seconds 2020-04-20 22:59:16 +02:00
Luciano Iam
bfbb15011c
WebSockets: add record state support to surface 2020-04-20 22:59:15 +02:00
Luciano Iam
5105219076
WebSockets: rename *_desc nodes to *_description 2020-04-20 22:59:15 +02:00
Luciano Iam
0e664b1556
WebSockets: add transport roll support to surface 2020-04-20 22:59:15 +02:00
Nils Philippsen
696096fcbd
Revise German translation
- add missing translations
- largely follow original message regarding punctuation, capitalization
  at the beginning of sentences, trailing white space
- fix typos and other obvious mistakes

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2020-04-20 19:14:37 +02:00
9a073c1fae
Fix MIDI meter reset 2020-04-20 18:38:13 +02:00
c2b25b453e
Emit signal when dropdown changes via scroll-wheel
This fixes Virtual-keyboard velocity selection when scrolling
to numbers that are not explicitly in the menu-list.

(hopefully this does not introduce some recursive signals
for other ArdourDropdowns, fingers crossed).
2020-04-20 00:36:37 +02:00
3f7de5ec8e
Do not add monitor-sends to foldback busses 2020-04-20 00:34:36 +02:00
498a58bd25
Fix restoring window visibility (Windows/Mac) #7976 2020-04-19 19:01:19 +02:00
93e98be6ab do not add unnamed sessions to the recent session list 2020-04-19 10:20:35 -06:00
e163e38c13
Shorten default export-preroll
Since 57118c2370, plugins are re-activated after every export.
So a silent pre no-roll is mainly useful for with realtime export,
and for some cases where a plugin does not correctly reset.

Note that for the first export, plugins are not currently flushed.
2020-04-19 18:02:25 +02:00
c32fef2660
WebSockets: hotfix crash when a session has VCAs
This eventually needs a better solution, special casing VCAs
on the top-level.
2020-04-19 15:44:39 +02:00
674554d978
Solo isolate foldback busses - #8020 2020-04-19 03:40:35 +02:00
9875a95829
RAII collect processor-change signals 2020-04-18 23:54:24 +02:00
b7c7c02680
Optimize realtime listen-position change 2020-04-18 23:19:58 +02:00
a90b0daadd
Support for lock-free AFL/PFL changes
Session::listen_position_changed() calls Route::listen_position_changed()
for every route in the session. Each call tool the process-lock
in turn.
2020-04-18 22:11:49 +02:00
a2f07f66a5
Consistent Lua script error and print() output 1/2 2020-04-18 18:16:12 +02:00
Julien '_FrnchFrgg_' RIVAUD
5766cf24aa Update French po files from code 2020-04-18 11:22:07 +02:00
fa8858b3e8 NOOP: newline removal 2020-04-17 12:40:28 -06:00
Luciano Iam
137042f80c
WebSockets: rename _lws_mnt_index to _lws_mnt_root
This mount point not only serves the index but everything that is under
/ , including the built-in surfaces directory
2020-04-17 20:15:10 +02:00
Luciano Iam
36a27b8a90
WebSockets: prevent crashes by validating inbound message addr and val sizes 2020-04-17 20:15:10 +02:00
Luciano Iam
50ba8dea96
WebSockets: improve JS client and demo
add methods to callback.js
automatically reconnect js client on disconnection
mixer-demo do not recreate UI on reconnection
NO-OP: indentation in message.js
make client JS reconnection optional
fix mixer-demo scrolling
minor JS client refactor
improve mixer-demo readability
2020-04-17 20:15:10 +02:00
Luciano Iam
612c71aa25
WebSockets: allow serving SVG files using libwebsockets < 3 2020-04-17 20:15:10 +02:00
70e27e0bf2 fix Beats::operator-() 2020-04-16 21:38:33 -06:00
ffd9aa2fc9 if the action associated with a binding is insensitive, do not activate it, and return false from Bindings::activate()
This allows "stacking" of bindings by desensitizing the actions associated with a "lower" level
of bindings at certain times (e.g. MIDI editing bindings thare are sensitized in the appropriate
editing modes
2020-04-16 17:48:12 -06:00
cc74c7b7ad
Fix two more typos 2020-04-17 00:02:38 +02:00
Edgar Aichinger
5fbce4b5db
Update German translation 2020-04-16 21:08:24 +02:00
eb06e67628
Update french translation #8016 2020-04-16 21:06:06 +02:00
bb62f7eaec
Plugin: bypass <> enabled mapping
LV2 uses "enabled": -1: inactive, 0: bypassed, 1:enabled
VST3 has "bypass: 0:active, 1: bypassed
2020-04-16 16:47:13 +02:00
2d4e125802
Prefer std::string for print_parameter API 2020-04-16 16:47:13 +02:00
daf9fe2550
Tweak engine startup, shorten initial silence timeout
see also 23baeee829
2020-04-16 16:47:08 +02:00
8ea608b3d9 fix plurals and other mistakes in error strings; switch to PBD::warning since these are not user errors nor fixable 2020-04-15 15:26:34 -06:00
895b9c2051
Fix PolyKeyPressure, consolidate AutomationType checks 2020-04-15 15:31:59 +02:00
984dc1694d
Allow MIDNAM lookup of valid channels for controllers 2020-04-15 01:51:04 +02:00
26bb781ecd
Fix disk-reader alignment when creating tracks while playing 2020-04-14 16:39:30 +02:00
daec036faa
NO-OP: whitespace 2020-04-14 04:01:36 +02:00
ea2bda6668
Fix playback alignment when adding/removing channels
The disk-reader assumes that all playback ringbuffers are in sync
and have the same fill_level.
2020-04-14 03:57:26 +02:00
Luciano Iam
30c8563a6d
WebSockets: rename send_index_* to send_availsurf_* to avoid confusion with a static index page 2020-04-13 16:29:38 +02:00
Luciano Iam
e7f22cf989
WebSockets: rename resource index.json to more meaningful surfaces.json 2020-04-13 16:29:38 +02:00
Luciano Iam
17cbd65603
WebSockets: rename all occurrences of 'disk path' to 'filesystem path' 2020-04-13 16:29:38 +02:00
Luciano Iam
1b4deb11ec
WebSockets: use canonical paths in index.json 2020-04-13 16:29:38 +02:00
Luciano Iam
46d39a9ee7
WebSockets: reject an empty ARDOUR_WEBSURFACES_PATH 2020-04-13 16:29:38 +02:00
Luciano Iam
b66b2858b1
WebSockets: add version field in manifests and update loader 2020-04-13 16:29:37 +02:00
Edgar Aichinger
70937dc1f9
Fix typos in preparation for translations 2020-04-13 16:10:13 +02:00
5a0e0a41e2 update all *.po files 2020-04-12 09:00:32 -06:00
2084a39168 some tweaks to Bindings API to allow ::is_bound() to indicate the action path for an existing binding
Plus some minor comment additions and cleanups
2020-04-12 08:57:59 -06:00
920a77f6af add debug trace to code that actually saves bindings to disk 2020-04-12 08:57:59 -06:00
bfe65ea1e4 improve understanding by using an actions label, not its path, in the bindings collision dialog 2020-04-12 08:57:59 -06:00
43d52fe41a
Forward disk-reader ConfigurationChanged signal 2020-04-12 13:41:39 +02:00
4ab299c540
Reduce redundant signal emission 2020-04-12 13:36:47 +02:00
fc34626e50
Fix loop range changes while playing - #8001
Since ead883302f, it is no longer possible to use a null
pointer SessionEvent::track as flag to indicate overriding all
buffers.
2020-04-12 13:35:21 +02:00
Luciano Iam
9aef431818
WebSockets: move diskPath property to surfaces group object 2020-04-11 22:30:41 +02:00
Luciano Iam
ad363d12a2
WebSockets: fix path field in index.json 2020-04-11 22:30:41 +02:00
Luciano Iam
e82171ea19
WebSockets: improve surface manifest format and loader 2020-04-11 22:30:40 +02:00
Luciano Iam
420137ea9d
WebSockets: always return -1 from send_index_body() unless there is a write error 2020-04-11 22:30:40 +02:00
Luciano Iam
ed427e5704
WebSockets: add useful comment on lws_write() 2020-04-11 22:30:40 +02:00
Luciano Iam
c477a81a7c
WebSockets: use lws_strncpy() when available 2020-04-11 22:30:40 +02:00
Luciano Iam
731ea79028
WebSockets: fix timeout when sending HTTP body 2020-04-11 22:30:33 +02:00
9e3efced72 remove debug output 2020-04-10 16:39:29 -06:00
a2737feae6 fix mistaken geometrical-math for xfaded loops 2020-04-10 16:07:42 -06:00
58672bcaa2
Sync reset meter, report zero until the meter is actually reset 2020-04-10 23:50:06 +02:00
24cce2e43d use cout not cerr for some temporary debugging messages 2020-04-10 15:30:26 -06:00
92b59c1df9 more debug info for DiskReader::maybe_xfade_loop() 2020-04-10 14:18:24 -06:00
8aae77b0eb somewhat change the condition used to identify when butler transport is done pre-export 2020-04-10 13:25:24 -06:00
b953490bac fix typo/thinko in code that checks for result of waiting for butler transport work 2020-04-10 13:24:55 -06:00
247bd4d3d9
NO-OP: whitespace 2020-04-10 18:32:18 +02:00
ede0fd3ddf
Remove hardcoded 2^15 cairo-boundary, prefer window-area 2020-04-10 18:28:26 +02:00
2177462b73
NO-OP: consistent function and variable naming 2020-04-10 18:06:42 +02:00
bc4de874dc
NO-OP: whitespace 2020-04-10 18:06:42 +02:00
9bbedcb781
Remove unused function
Cairo::curve_to renders cubic Bézier splines, those are not
generally useful in a DAW context.

Canvas::Curve implements centripetal catmull-rom spline drawing
which can be used for fades and automation interpolation.
2020-04-10 18:06:42 +02:00
7bb8ca1e76
Interpolate poly-line with view-point #6481 2020-04-10 18:06:41 +02:00
6cc1e5e75d
NO-OP: whitespace 2020-04-10 18:06:39 +02:00
1e996ca45f add port connect/add/remove callbacks to CoreAudio backend 2020-04-10 10:01:04 -06:00
2a80832243 add port connect/add/remove callbacks to the ALSA backend
This fixes issues with new ports not (always) appearing in port matrices (and presumably
elsewhere too)
2020-04-10 09:53:44 -06:00
b943cec756
ALSA: allow to select different I/O devices
This adds a basic support to use multiple sound-cards, currently
limited to two devices: In/Out with shared settings.

Advanced setups still have to resort to using the ARDOUR_ALSA_EXT
environment variable
2020-04-10 05:01:33 +02:00
e8efd45c05
Fix ALSA slave-device half-duplex mode 2020-04-10 05:01:30 +02:00
78b29c55d3
Hotfix more export woes, prevent possible endless loop
This apparently happens on some Windows systems when exporting
a range starting at 00:00:00:00

I'm still hoping there's a better fix for these race-condition
issues, perhaps by kicking the TFSM...
2020-04-10 03:29:16 +02:00
c33c988adc
Revert "Another attempt at fixing multi-range export"
This reverts commit c5332ddd00.
Apparently this is not needed 4f3a95a1da is sufficient.
2020-04-10 02:24:08 +02:00
62e2ec49ce
ALSA: ignore systemic MIDI latencies during measurement 2020-04-10 01:43:11 +02:00
5f1431aeda fix ArdourFader to use contrasting_text_color() for text, based on relevant bg color 2020-04-09 17:12:40 -06:00
69b4c5108b ALSA backend: fix incorrect pointer cast (fixes #7998) 2020-04-09 15:40:23 -06:00
230ef7596f websockets: shutdown UI event loop is server cannot start 2020-04-09 15:36:02 -06:00
661609f2c0 change default port for websockets surface 2020-04-09 15:26:13 -06:00
18daf2c9b2
C++98 compatibility 2020-04-09 22:43:24 +02:00
cd5eae3556 some potentially helpful but trivial comments 2020-04-09 14:01:47 -06:00
be023ef32d
Tweak websocket surface for use src-tree shared dir
When running from the src-tree, ardev_common.sh sets multiple
data-paths, to allow running ./ardev ./gtk2_ardour/ardev.
Pick the first one that contains a "web_surfaces" subfolder as
docroot.
2020-04-09 21:50:01 +02:00
61692ae1f8
Fix some Wunused-result 2020-04-09 21:26:12 +02:00
Luciano Iam
d694ee97c7
Update waf scripts 2020-04-09 20:56:46 +02:00
Luciano Iam
c946eb3132
Add classes for serving content over HTTP 2020-04-09 20:56:46 +02:00
Luciano Iam
40520a6dc6
Clean up and prepare for HTTP 2020-04-09 20:56:46 +02:00
Luciano Iam
3da0cf2a31
NO-OP update comments for header guard #endifs 2020-04-09 20:56:46 +02:00
c5332ddd00
Another attempt at fixing multi-range export
See also
  * 4f3a95a1da
  * cfd95340b1
  * 61e7f3176b
2020-04-09 20:25:25 +02:00
4f3a95a1da
Cont'd work on fixing export ranges
This picks up where cfd95340b1 left off.

The goal is to ensure that the butler has completed all
PostTransportStop related tasks and won't meddle with transport
after exporting has started.

Previously this could happen, because realtime_stop() queues
PostTransportStop and the butler is sommoned after every
export process cycle.

Since  61e7f3176b the butler keeps calling non_realtime_stop()
every time it is woken up, until TFSM comes around and unsets the
flag in the process callback.
2020-04-09 19:07:33 +02:00
70f13a3ff3 use RCU to manage JACK backend's container of ports 2020-04-08 19:56:33 -06:00
feff57d29a prefer initialization to assignment 2020-04-08 19:56:08 -06:00
20b4b4ea90 remove debug output 2020-04-08 18:43:20 -06:00
dd94d43c46 when renaming a port, remove the backend's port map entry based on the *old* name (not the new one) 2020-04-08 18:41:37 -06:00
3188fe00aa fix return value 2020-04-08 18:13:13 -06:00
57118c2370
Prevent FX from producing sound after export
This cuts reverb tails and synth sounds after export.
Disabling freewheeling, continues normal processing where
export left off. This previously kept notes ringing, or reverbs
audible.
2020-04-09 01:28:04 +02:00
a6afb31245
Safeguard against libaudiographer exceptions 2020-04-09 00:01:44 +02:00
b8ce25fdab
Fix export-alignment with JACK -- #7916 2020-04-09 00:01:44 +02:00
f32245c156 add required ::clear_ports() call to Dummy backend destructor 2020-04-08 14:55:31 -06:00
cfd95340b1
Fix exporting multiple range (MacOS)
The actual issue was introduced in 61e7f3176b:
Session::non_realtime_stop() no longer unsets PostTransportStop
(other changes from that commit are not relevant).

The real issue however is a race-condition.
So far this only seems to happen on MacOS, Coreaudio.

It seems that non_realtime_stop() is called in the butler-thread
after exporting has started, even though the butler has been
paused in wait_until_finished().

Perhaps Coreaudio thread switches causes TransportFSM to
reinitialize and scheduling the butler?

The use of `usleep()` makes this rather a workaround.
However it's sufficient for the coreaudio rt thread to run
at least once.
2020-04-08 15:59:30 +02:00
John Emmas
02473f058c Add/remove source(s) in our MSVC project (ardour_mackie) 2020-04-08 11:34:54 +01:00
6a8863386a use an Unwinder to provde exception-safety 2020-04-08 00:28:30 -06:00
78a66b7180 improved port cleanup as backend is destroyed 2020-04-07 23:26:51 -06:00
ec9784764c better fix for port destruction 2020-04-07 23:21:48 -06:00
09b51f3901 Revert "PortEngineSharedImpl callbacks should not be pure virtual"
This reverts commit a13ef36b3b.

A better fix is coming.
2020-04-07 23:21:06 -06:00
5b6e2b088e show ARDOUR::Port destructor with either DEBUG::Ports or DEBUG::Destruction 2020-04-07 23:20:15 -06:00
a13ef36b3b PortEngineSharedImpl callbacks should not be pure virtual
A port can callback from its destructor, which if occuring inside the backend destructor
would reach an already partially destructed backend.
2020-04-07 20:36:20 -06:00
ede8b9995a fix another explicit return val for ::get_port_by_name() if JACK has died 2020-04-07 18:57:24 -06:00
2591c81c1a fix explicit return val for ::get_port_by_name() if JACK has died 2020-04-07 18:54:57 -06:00
0a8b670bd0 yet another attempted fix for older gcc/mingw 2020-04-07 18:47:51 -06:00
0c859316a3 another attempted fix for older gcc/mingw 2020-04-07 18:44:40 -06:00
5d2bacd238 do not initialize shared_ptr<Subview> with 0 2020-04-07 18:37:18 -06:00
3f30a0ad39 more code rearrangement ... old gcc/mingw does not allow Enum::Value 2020-04-07 18:32:45 -06:00
595be0e5e9 try some rearrangement to fix old mingw builds 2020-04-07 18:15:51 -06:00
893e835dca NOOP: whitespace 2020-04-07 18:15:51 -06:00
8562582da2
Cont'd work on disk reader channel initialization
Amend 648beb94. If initial re-fill happens via override buffers,
the buffer may still be effectively empty.
2020-04-08 02:12:58 +02:00
d045dae5ff fix missing #include 2020-04-07 17:33:14 -06:00
33ae34124a fix missing #include 2020-04-07 17:27:31 -06:00
e345f38c7b fix missing #include 2020-04-07 17:22:55 -06:00
71e04c945f fix return value to be a legal null shared_ptr<PortPtr> 2020-04-07 17:18:10 -06:00
92005cd992 fix 2 additional "resets" of shared_ptr<PortPtr> 2020-04-07 17:11:50 -06:00
648beb94a0
Fix false-positive under-run messages
Port (or Tracks) can be safely added during playback, however
the disk-reader's playback buffer is initially empty. This lead to
false-positive Underrun() signals when processing takes place
before or concurrently with re-filling the disk-buffer for the new
channels.

Now new empty buffers are ignored, and produce silence until the
initial refill is complete. There is however no per-channel
de-click in, yet.

This fixes: play some audio track, ctrl+drag a region to the
drop-zone, creating a new track while playing.
2020-04-08 01:09:40 +02:00
e893c31701 "fix" some uses of foo<bar<>> by change the closing chars to "> >" (windows 2020-04-07 17:08:17 -06:00
76245107c7 fix 2 additional "resets" of shared_ptr<PortPtr> 2020-04-07 17:02:08 -06:00
260afe85ca fix "reset" of shared_ptr<PortPtr> 2020-04-07 16:57:49 -06:00
32734ce53c fix portaudio backend to use shared_ptr 2020-04-07 16:00:22 -06:00
989e388cad
Add option to reset x-run count on record-start 2020-04-07 23:14:11 +02:00
Phil
69067b9d99 add plugin support for mackie units
Main features: Plugin (Select & Edit)

1.  Plugin Select: When a track is selected that has PluginInserts, pushing the "Plug-In" button on a mackie will list these across the strips. Clicking a vpot of a strip enables editing the parameters of this selected plugin.
2. Plugin Edit: When a Plugin is selected for editing, the input parameters of the plugin are shown across the channel strips and the vpot is assigned the corresponsing AutomationControl for the parameter.

Minor features

- When the number of plugins or the number of parameters exceeds the number of strips available on the surface, one can flip through "pages" of views using the Cursor Left and Right keys (this logic I took from http://www.emagic.de/media/support/content/manuals/LogicControl_en.pdf)
- When in the Plugin Select mode, rearranging the plugins in the mixer strip is reflected on the surface.
- When in Plugin Edit mode, rearranging the plugins in the mixer strip still retains the edit view of the selected plugin (rearranging does not take away the current subview)
 - When removing a plugin in the mixer strip, this is reflected in Plugin Select, while the view jumps to Pan/Surround (the None subview) when in Plugin Edit mode.
- Removing a track resets the subview to None
- When in a Subview that is track-specific (Track, EQ, Send, Plug-In, Inst), selecting a different track retains the subview but updates the channel displays and vpot assignments accordingly. When in Plugin Edit mode for track A, and track B is selected, it changes to Plugin Select mode for track B (if plugins are present).
2020-04-07 14:35:09 -06:00
ff41232d16 fix CoreAudio backend to use shared_ptr 2020-04-07 13:52:35 -06:00
d827f3fdae fix up shared_ptr<> use in JACK backend 2020-04-07 13:23:49 -06:00
b9cb306e8b use shared_ptr to manage backend port lifetimes (Pulse,ALSA,Dummy,JACK)
JACK is not yet finished.

Changes also include minor reformatting and a spelling correction (latecies to latencies)
2020-04-07 13:23:49 -06:00
2377927fc1
NO-OP: whitespace 2020-04-07 16:20:53 +02:00
91a213427e
Remove unused variable 2020-04-07 16:05:47 +02:00
ebf26ddc9b
NO-OP: whitespace 2020-04-07 15:59:18 +02:00
4420f95026
Further tweak ambiguous latency check
Ignore latency of async ports (Virtual Keyboard in particular),
and only consider ardour's own ports.
2020-04-07 13:32:28 +02:00
1ee6b63299
Expose Port::flags() to Lua 2020-04-07 13:27:49 +02:00
5e2eb230bc
Fix typo in API name (1/2) 2020-04-07 04:07:31 +02:00
2932337a32
Fix ambiguous latency check
Only compare playback latency, delaylines in tracks do not
push back the capture latency to the source.
The delayline on tracks sits in between disk-writer and disk-reader,
delaying input to align with the disk-reader.

Furthermore tracks may be connected to different inputs,
even though those inputs are usually from the same hardware
device, capture latency of those ports can differ.
2020-04-07 04:06:02 +02:00
e95d33502f
NO-OP: whitespace 2020-04-07 04:02:52 +02:00
b5ca7d352a
Atomically reset peak meters #7465 2020-04-07 03:58:31 +02:00
f24cabe9e9
Fix rotary control knob mapping
This fixes an issue with Foldback strips pan controls being inverted.
2020-04-07 00:37:30 +02:00
aa2ddb5ea2
API change: LatencyUpdated(), indicate playback/capture 2020-04-07 00:10:29 +02:00
ad0c5f1a1c
NO-OP: whitespace 2020-04-06 23:45:36 +02:00
597837022a
Add method to check for ambiguous port latency 2020-04-06 23:45:20 +02:00
55854e3797 Add foldback busses to OSC GUI 2020-04-05 14:45:18 -07:00
df8c000810 OSC: support foldback busses 2020-04-05 14:10:50 -07:00
Johannes Mueller
3a2f0e40cf Fix crash when adding tracks from a5 route templates
Ardour5 route templates seem not to have a in the root node playlist
property. Ardour generally relies on that Track::playlist() always returns a
valid playlist. Thus we need to create a playlist even if we don't have a
playlist property in the route template's root node.
2020-04-05 19:07:28 +02:00
Johannes Mueller
c74cc2675e Extend FileArchive to import archive entries individually
This is needed primarily for a workaround for #7971. When importing a template
that has been exported on Ardour5 on MacOS we need to fix the paths of the
archive entries.

Later we can use this functionality also to handle imported templates if
templates with the same name already exist.

This commit only adds methods and members to FileArchive, it does not modify
anything to make regressions unlikely. This, however, leads to some duplicated
code. Eventually we should consolidate this a bit.
2020-04-05 16:34:48 +02:00
d0a116b2ae
Forward instrument MIDNAM changed signal 2020-04-04 01:48:30 +02:00
c16ab3a248
Allow to disable input auto-connect when creating tracks
Auto-connect is handled in a background thread, so newly created
tracks are not immediately connected.

This causes a race-condition when fan-out directly disconnects
and re-connects ports after track/bus creation.
2020-04-03 15:36:19 +02:00
80f3b54be4
NO-OP: indent & whitespace 2020-04-03 14:56:57 +02:00
3d98d13760
Add missing include 2020-04-03 14:52:05 +02:00
35aab65d59
Consistent processor labels "Meter"
Track name is implicit, so instead of "meter-<name>", showing a
translatable label "Meter" is sufficient and consistent with "Fader".

Under the hood, for introspection, the processor name remains as is.
2020-04-03 14:49:03 +02:00
John Emmas
fb186aaaa0 2 x new backend/port classes need to be exportable 2020-04-03 10:09:22 +01:00
John Emmas
03f52e622a Add/remove source(s) in our MSVC project (libardour) 2020-04-03 07:15:42 +01:00
6a6b3f2703 fix another iterator type 2020-04-02 19:45:31 -06:00
cb4997f4a4 fix iterator type 2020-04-02 19:45:31 -06:00
af69ac1285 use clear_ports() 2020-04-02 19:45:31 -06:00
6cdc245967 fix header name 2020-04-02 19:45:31 -06:00
7fc5a6c971 initial try (not compiled) of PortAudio backend using PortEngineSharedImpl 2020-04-02 19:45:31 -06:00
72925e4453 use _instance_name in all messages from PortEngineSharedImpl 2020-04-02 19:45:31 -06:00
e5507f7072 use PortEngineSharedImpl with PulseAudio backend 2020-04-02 19:45:31 -06:00
04551c39f6 use PortEngineSharedImpl with DummyAudioBackend 2020-04-02 19:45:31 -06:00
30766c75e8 buildable version of CoreAudio backend using PortEngineSharedImpl 2020-04-02 19:45:31 -06:00
a31d3689bf tentative changes to extend port engine shared impl to coreaudio 2020-04-02 19:45:31 -06:00
6c2e30b790 use new PortEngineSharedImpl in AlsaAudioBackend 2020-04-02 19:45:31 -06:00
9ea6f598bd add new file to wscript 2020-04-02 19:45:31 -06:00
9461a30a97 refactor shared PortEngine implementation from AlsaAudioBackend 2020-04-02 19:45:31 -06:00
9ac0d5b60f add RCU to manage _ports and _portmap in AlsaAudioBackend
This is intended to prevent crashes when unregister_port() modifies the contents of these
two members at the same time that something else is iterating over them.
2020-04-02 19:45:31 -06:00
21c9505652
Allow to query current effective instrument model/mode
This exposes custom plugin model/mode. It can be useful for
the GUI to detect if effective settings have changed, and
context-menus have to be re-build.
2020-04-03 03:29:32 +02:00
dabd5715e9
Revert "move the point of adding a new MIDI track until *after* the instrument is added"
This reverts commit fac8d84786.

This fixes fan-out. The track should be created before any tracks or
busses are created that are fed by the MIDI track.

The apparent motivation for fac8d847 was MIDNAM related
(there was code in the GUI that needed the instrument, which was
called from within ::add_routes).

This should no longer be the case, the GUI needs to pick up
instrument changes after track creation via processors changed;
besides MIDI busses were still created before the instrument.
2020-04-02 21:43:16 +02:00
f0b25a776b
Update fan-out signal
* Signals use camelcase.
* use a static signal, independent of the route

Previously the signal was handled by RouteUI, which
caused various issues:
 * the RouteUI may not yet be available
 * There may be many RouteUIs for a single Route
   (mixer, editor-mixer, meter-bridge strips)
2020-04-02 20:27:51 +02:00
Johannes Mueller
06dee15a18 Emit Locate() in ::locate() even if we are not synced_to_engine()
This reverts 05c77db773 (revert necessary due to 4637c49838)

Since 4637c49838 we no longer emit Located() in ::backend_sync_callback().
Therefore we must emit Located() in ::locate() even if we are
synced_to_engine().

Otherwise the playhead is not updated when synced_to_engine() in some
circumstances.
2020-04-02 18:39:46 +02:00
Johannes Mueller
7a2e9bf224 Re-save templates if they have been loaded from an older version of Ardour 2020-04-02 14:37:12 +02:00
Johannes Mueller
687b3078c3 Don't issue VersionMismatch when creating a new session
When we create a new session and are using a template from an old version of
Ardour, we should not issue the VersionMismatch dialog and not make a copy of
the session file for the old version.

We need to extend the signature of Session::load_state() to tell it if we are
creating a session from a template. Session::_is_new cannot be used for it
because it has a the semantics if to auto connect the the master bus.
2020-04-02 14:33:21 +02:00
1439610f95
Restart Transport FSM after x-run halt #7951 2020-04-02 03:58:21 +02:00
163a065543
Fix gcc-4.2/PPC builds
Old STL has an issue with ambiguity
   reverse_iterator rend();
   const_reverse_iterator rend() const;
2020-04-02 03:43:29 +02:00
20ee430fda
Add API to count named MIDNAM controls 2020-04-01 23:25:19 +02:00
37bbc70179
Cache instrument plugin MIDNAM model & mode 2020-04-01 23:24:45 +02:00
195fe0f712 add method to check for xrun status of a marker 2020-04-01 10:10:50 -06:00
3b77472ac0
Overhaul InstrumentInfo
* Remove unused direct calls into plugin
* Assume empty model to mean plugin-provided MIDNAM (!)

The route owned Instrument-Info is the central access point used
by the GUI for MIDI name lookups.

At this point in time, custom settings are saved/restored by the
GUI (MidiTimeAxisView). InstrumentInfo provides a volatile store
for MIDNAM mode and model.
2020-04-01 16:31:58 +02:00
26c6d3c4c9 fix boolean logic PART FOUR when trying to avoid complete_refill heuristic
This reworking avoids some confusion caused by the use boost::optional here
2020-04-01 07:54:44 -06:00
76070cb8c2 fix boolean logic PART THREE when trying to avoid complete_refill heuristic 2020-03-31 21:47:39 -06:00
76b6c5ebfd fix boolean logic PART TWO when trying to avoid complete_refill heuristic 2020-03-31 21:44:42 -06:00
1c82fc4879 fix boolean logic when trying to avoid complete_refill heuristic 2020-03-31 21:14:07 -06:00
6d0434a3c5 change variable name and debug messages for underrun case (information was misleading/confusing) 2020-03-31 20:54:14 -06:00
0047dc383f clean up logic for declick out in DiskReader
This is intended to be a no-op that makes the code easier to read/reason about
2020-03-31 20:54:14 -06:00
88e84067f2 if a locate brings us within a heuristic-specified distance of the current position in a DiskReader, pay attention to loop status
If the last read was not looped, but the new one should be, we need to ignore the heuristic. Ditto for vice-versa.

This isomorphic with the read-reversed case
2020-03-31 20:54:14 -06:00
bc1c3e5c21
Postpone disk-i/o setup during session-load
This fixes another assert(), caused by configuring processors,
before set_processor_state() was called.
Route::configure_processors() will be called later.

---
#3  0x00007ffff2472102 in __GI___assert_fail at assert.c:101
#4  0x00007ffff7a8ca1f in ARDOUR::Route::setup_invisible_processors() at ../libs/ardour/route.cc:5013
#5  0x00007ffff7a7a665 in ARDOUR::Route::configure_processors_unlocked at ../libs/ardour/route.cc:1870
#6  0x00007ffff7a79377 in ARDOUR::Route::configure_processors at ../libs/ardour/route.cc:1719
#7  0x00007ffff7a902c0 in ARDOUR::Route::set_disk_io_point at ../libs/ardour/route.cc:6041
#8  0x00007ffff7a7ea0a in ARDOUR::Route::set_state at ../libs/ardour/route.cc:2679
2020-03-31 19:48:17 +02:00
5253c7eb8b
Tweak error-dump (when session load fails)
When limiting the message count (e.g. for display in a dialog),
use reverse order, and only print errors.

When loading a session fails, the most recent error is
more likely the real cause.
2020-03-31 18:58:12 +02:00
3df530e7f6
Clean up double/float narrowing math in plugins. 2020-03-30 22:25:21 +02:00
40e3364c66
Always delegate meter-point positioning to rt-thread
Previously set_state() -> set_meter_point() acquired the
process-lock to change meter-position, usually causing x-runs
when setting route-state.

This also fixes an issue introduced in fd414ec158. After
populating the processor list, force setting the meter-position
looks up the output streams of the processor before the meter.
However the processors are not configured. That will only happen
later from Session::post_engine_init().

---
#3 0x00007ff07b7d4102 in __GI___assert_fail at assert.c:101
#4 0x00007ff080d3224a in ARDOUR::PluginInsert::output_streams() const at ../libs/ardour/plugin_insert.cc:289
#5 0x00007ff080de8c30 in ARDOUR::Route::set_meter_point_unlocked() at ../libs/ardour/route.cc:4106
#6 0x00007ff080de8699 in ARDOUR::Route::set_meter_point(ARDOUR::MeterPoint, bool) at ../libs/ardour/route.cc:4037
#7 0x00007ff080ddfad3 in ARDOUR::Route::set_state(XMLNode const&, int) at ../libs/ardour/route.cc:269
2020-03-30 17:58:35 +02:00
a8ff35accb
Reset DSP load on backend re-start and after freewheeling 2020-03-30 16:58:55 +02:00
27b2794133
Add API to reset DSP load state 2020-03-30 16:43:42 +02:00
f866ed6305
Remove duplicate calls 2020-03-30 15:20:54 +02:00
fd414ec158
Assert that plugins are configured before setting custom meter position
This fixes the following issue:
  On the master channel insert the waveform scope before the fader.
  Then set the meter position to custom and move the meter to the
  very beginning of the chain.

Before this change, when set_meter_point() was called the
processor list only contained the Fader (_amp) and no other
processor. _main_outs was not yet present in the list, and
Route::maybe_note_meter_position() triggered an
and assert(_processor_after_last_custom_meter.lock());

See also d0dca7daf0
2020-03-30 15:20:54 +02:00
23baeee829
Tweak engine startup, initial silence
This can help when running with very low latency and the
initial process callback is [indirectly] expensive.

E.g. load a heavy session the a RPi4, initial setup can pull
in a lot of data, which blocks the bus.

In particular with the ALSA backend this can lead to poll timeout
which effectively stops the backend.
2020-03-30 15:20:54 +02:00
2ceaa98c1c
Fix optimized build crashes (missing return value) - #7958 2020-03-29 15:27:12 +02:00
c365c6cdb2
Set thread-names (libs) 2020-03-29 14:56:22 +02:00
d6a38d5450
Set public thread name
This allows to identify Ardour thread using standard unix
tools (ps, htop) and inspect priorities, CPU load etc.
2020-03-29 13:55:20 +02:00
f81442c3bf
Engine: Silence outputs for 1/2 second when loading a session
This allows for caches to warm up, background worker threads to
spin up and things settle down. This also prevents initial
audible artifacts of live input.

In almost all cases this completes before the GUI is brought up.
2020-03-29 01:44:03 +01:00
eea697b260
ALSA backend: try to recover from poll errors
When recover() successfully re-initializes the device,
processing can continue just like after an x-run.

This can happen during initial session load of "expensive"
sessions (in particular on slow systems, e.g. Raspberry Pi)
usually with synths. Worker thread pulls in many external
files in the background which blocks the bus for a long time.
resulting in a poll-timeout.
2020-03-28 22:06:12 +01:00
6a930c81eb remove noisy and unhelpful log message 2020-03-28 10:59:31 -06:00
82eba76c8f prevent CD markers from being placed at or before session start (#7942) 2020-03-28 10:58:45 -06:00
ead883302f
Don't use shared-pointers in cross thread event structs
This fixes a deadlock when closing the session.

Session::destroy() takes the engine-lock while removing
unhandled session-events. In [1], the event-queue held a last
reference to a Track, and releasing that object triggered
events (here ~IO) that required the lock.

---
[1]

#2  0x0041743a in Glib::Threads::Mutex::Lock::Lock at /home/ardour/linux-armhf/stack/include/glibmm-2.4/glibmm/threads.h:643
#3  0xb67433ba in ARDOUR::IO::~IO at ../libs/ardour/io.cc:105
#4  0xb6743612 in ARDOUR::IO::~IO at ../libs/ardour/io.cc:111
#5  0xb6758e66 in boost::checked_delete<ARDOUR::IO> at /home/ardour/linux-armhf/stack/include/boost/core/checked_delete.hpp:34
#6  0xb675912c in boost::detail::sp_counted_impl_p<ARDOUR::IO>::dispose at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_impl.hpp:92
#7  0x004178d8 in boost::detail::sp_counted_base::release at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_base_sync.hpp:129
#8  0x00417986 in boost::detail::shared_count::~shared_count at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/shared_count.hpp:426
#9  0xb662343a in boost::shared_ptr<ARDOUR::IO>::~shared_ptr at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/shared_ptr.hpp:341
#10 0xb6a4af7a in ARDOUR::Route::~Route at ../libs/ardour/route.cc:282
#11 0xb6b9404c in ARDOUR::Track::~Track at ../libs/ardour/track.cc:71
#12 0xb697164a in ARDOUR::MidiTrack::~MidiTrack at ../libs/ardour/midi_track.cc:94
#13 0xb697177a in ARDOUR::MidiTrack::~MidiTrack at ../libs/ardour/midi_track.cc:96
#14 0xb6ac525a in boost::checked_delete<ARDOUR::MidiTrack> at /home/ardour/linux-armhf/stack/include/boost/core/checked_delete.hpp:34
#15 0xb6acde00 in boost::detail::sp_counted_impl_p<ARDOUR::MidiTrack>::dispose at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_impl.hpp:92
#16 0x004178d8 in boost::detail::sp_counted_base::release at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_base_sync.hpp:129
#17 0x00417986 in boost::detail::shared_count::~shared_count at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/shared_count.hpp:426
#18 0xb664dca6 in boost::shared_ptr<ARDOUR::Track>::~shared_ptr at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/shared_ptr.hpp:341
#19 0xb6aaf67e in ARDOUR::SessionEvent::~SessionEvent at ../libs/ardour/ardour/session_event.h:42
#20 0xb6a91a88 in ARDOUR::Session::destroy at ../libs/ardour/session.cc:753
#21 0xb6a8fb20 in ARDOUR::Session::~Session at ../libs/ardour/session.cc:460
#22 0xb6a9075e in ARDOUR::Session::~Session at ../libs/ardour/session.cc:46
2020-03-28 17:31:12 +01:00
6f1b0ce3d0
Add Lua bindings to check engine status 2020-03-28 14:56:29 +01:00
b279c42158
Create write sources for template/dup tracks - #7940
This fixes a crash with missing [MIDI] write-sources after
duplicating tracks [1]: Stealing write-source name fails, because
there is no write-source.

When duplicating tracks, reset_write_sources() is called before
any playlists are set [2]. So no new write-sources are created
because _playlists[DATA-TYPE] is empty.

During normal track creation write-sources are usually added
by the input-change handler [3]. However in this case the
state has been set, and since there is no change,
DiskWriter::configure_io does not call use_new_write_source()


NB. This also re-creates write-source when playlists are changed.

-=-
[1]
#3 0x00007f4420690102 in __GI___assert_fail at assert.c:101
#4 0x0000562bfa300dc9 in boost::shared_ptr<ARDOUR::SMFSource>::operator->() const at /usr/include/boost/smart_ptr/shared_ptr.hpp:734
#5 0x00007f442579ffa1 in ARDOUR::DiskWriter::steal_write_source_name[abi:cxx11]() at ../libs/ardour/disk_writer.cc:1290
#6 0x00007f4425e476b6 in ARDOUR::Track::steal_write_source_name[abi:cxx11]() at ../libs/ardour/track.cc:476
#7 0x00007f4425d060a2 in ARDOUR::Session::create_midi_source_by_stealing_name at ../libs/ardour/session.cc:4955
#8 0x0000562bf9ed39ab in MidiTimeAxisView::add_region at ../gtk2_ardour/midi_time_axis.cc:1650
#9 0x0000562bf9b05f2a in Drag::add_midi_region at ../gtk2_ardour/editor_drag.cc:568

-=-
[2]
#0 0x00007ffff7582e2f in ARDOUR::DiskWriter::reset_write_sources at ../libs/ardour/disk_writer.cc:946
#1 0x00007ffff757fce6 in ARDOUR::DiskWriter::set_state at ../libs/ardour/disk_writer.cc:333
#2 0x00007ffff7a81c93 in ARDOUR::Route::set_processor_state at ../libs/ardour/route.cc:3054
#3 0x00007ffff7a7f5d5 in ARDOUR::Route::set_state at ../libs/ardour/route.cc:2697
#4 0x00007ffff7c2aa1d in ARDOUR::Track::set_state at ../libs/ardour/track.cc:172
#5 0x00007ffff794f204 in ARDOUR::MidiTrack::set_state at ../libs/ardour/midi_track.cc:152
#6 0x00007ffff7b7e06b in ARDOUR::Session::XMLRouteFactory at ../libs/ardour/session_state.cc:1890
#7 0x00007ffff7addf7e in ARDOUR::Session::new_route_from_template at ../libs/ardour/session.cc:3048
#8 0x000055555621329a in DuplicateRouteDialog::on_response(int) at ../gtk2_ardour/duplicate_routes_dialog.cc:194

-=-
[3]
#0 0x00007ffff7583243 in ARDOUR::DiskWriter::use_new_write_source at ../libs/ardour/disk_writer.cc:996
#1 0x00007ffff75831c7 in ARDOUR::DiskWriter::reset_write_sources at ../libs/ardour/disk_writer.cc:989
#2 0x00007ffff75851ea in ARDOUR::DiskWriter::configure_io at ../libs/ardour/disk_writer.cc:1335
#3 0x00007ffff7a7b308 in ARDOUR::Route::configure_processors_unlocked at ../libs/ardour/route.cc:1912
#4 0x00007ffff7a79e4b in ARDOUR::Route::configure_processors at ../libs/ardour/route.cc:1719
#5 0x00007ffff7a86695 in ARDOUR::Route::input_change_handler at ../libs/ardour/route.cc:3632
2020-03-28 02:37:37 +01:00
97a221f1bb
NO-OP: whitespace 2020-03-28 01:25:44 +01:00
08065e87b5
Minor code cleanup - consolidate variables & scope 2020-03-28 01:25:44 +01:00
9b84e61fab
Fix incorrect timestretch duration - #7943
Completing readout available() returns 0, until all
background threads have finished and joined.

This also improves performance by feeding suggested/required
amount of samples on every process() call.
2020-03-28 01:25:44 +01:00
dfe383d23a make MIDI tracing work again for ports that are handled using ::read_and_parse_entire_midi_buffer_with_no_speed_adjustment() 2020-03-27 11:22:37 -06:00