Commit Graph

20262 Commits

Author SHA1 Message Date
6cb90471fe
VST3: set numChannels to match the speaker-arrangement
This fixes an issue with recent JUCE when using a stereo
plugin on a mono track.

`juce::validateLayouts` requires that numChnanels matches
the configured channel-mapping:
69795dc8e5/modules/juce_audio_processors/format_types/juce_VST3Common.h (L630)
JUCE could be more liberal and accept
`(int) mapIterator->size() > it->numChannels`
2023-03-17 05:58:10 +01:00
05a13e151e
PI: Leave unconnected buffers when split processing
Otherwise a stereo plugin on a mono bus will still
have two valid input buffers, and a map saying so
during process().
2023-03-17 05:58:10 +01:00
John Emmas
f8557cc00f Export AudioGraphper::Source and AudioGrapher::ListedSource
after an MSVC update this morning, these classes need to be exportable now - I'm not quite sure why :-(
2023-03-15 13:39:56 +00:00
ca67752dc5
Add missing well-known ctrl implementation (amend prev commit) 2023-03-14 20:47:09 +01:00
f1a0004d38
Expose new well-known ctrls to stripable API
This allows to use new those in ctrl surfaces
2023-03-14 18:24:12 +01:00
1d9c2004be
Backport Mixbus9 well-known ctrls
This also removes the mixbus specific implementation
from ardour's codebase
2023-03-14 17:27:05 +01:00
0b50bec6f4 MCU: Update view modes for Cue, Foldback, and VCA
This changes the function of the Inputs, Instruments, and Outputs
buttons as follows:

Inputs = Cue Tracks
Instruments = VCA
Outputs = Foldback Busses
2023-03-13 12:21:49 -05:00
d0fac54261
Always call cycle-end after a cycle-start
This fixes an assert (_in_cycle) when changing backends
since 77bb262c2.
2023-03-12 16:59:02 +01:00
Marijn Kruisselbrink
8810c36c6e
Fix audio source names when importing files with > 2 and <= 26 channels.
This code presumably intended to name sources "foo%a", "foo%b" etc, but
since it was incorrectly appending the character as an integer sources
instead ended up being named "foo%97", "foo%98" etc.

Also changes the branching logic to use this branch upto 26 channels,
rather than just upto 25 channels, as that seems to have been the
intention.
2023-03-11 18:53:26 +01:00
339d3e1265
Drop another debug message 2023-03-09 18:23:20 +01:00
cf4056cf34
Fix alignment of unconnected tracks
This is relevant when bouncing track -> track -> n/c.
It also helps to balance send latency route [send to bus] -> n/c
when the bus is connected to master or outputs.
2023-03-07 20:50:11 +01:00
5a8b69555f
Fix metronome capture alignment
This undoes edd68d8682, "ExistingMaterial" worked IFF
the click playback was exactly 1 cycle delayed and the
disk-writer _playback_offset was set to 1 cycle.

Now that audio buffers are flushed (see prev commit), the
click I/O's output is directly available and CaptureTime
is the correct alignment (as it always was).
2023-03-07 20:50:00 +01:00
62fc1d3c2e
Flush audio-buffers for internal connections
Forward data for ports that are both internally and
externally connected.

e.g. click-io may be connected to a track as well as physical
outputs. Since the port is externally connected, data is written
to an internal buffer _data[], and only at cycle-end resampled
to engine-buffers.

However a track's recording the metronome is not externally
connected. Hence data is directly read from the engine-buffers.
Summing also happens at engine level, so data has to
be written back for downstream ports to read them in the same cycle.
2023-03-07 20:49:54 +01:00
77bb262c26
Add API to check for internal port connections 2023-03-07 20:49:37 +01:00
7a18ef6ceb
Fix LADSPA log-scale default (correct e1ef2c7e0d) 2023-03-06 20:38:11 +01:00
alex
4ca947f078 changed parantheses and lines 2023-03-06 00:43:34 +01:00
alex
777c7c6c03 added trackcolors to X-Touch, added _is_xtouch to device info as condition for trackcolors 2023-03-06 00:08:38 +01:00
JungHee Lee
3b0a19d30e Update Korean translation 2023-02-24 02:00:10 +01:00
4c4f659c5d libmidi++: allow tracer to print tick message 2023-02-23 15:34:27 -07:00
95ad72bda6 libmidi++: add the hitherto unknown and unsupported MIDI "tick" message
See http://midi.teragonaudio.com/tech/midispec/tick.htm
2023-02-23 15:34:27 -07:00
94570e0e1e midi clock: no changing tempo when we're not using an external sync source 2023-02-23 15:34:27 -07:00
27205c7639 midi clock: provide option to quantize incoming BPM values 2023-02-23 12:15:26 -07:00
e430d13d53 midi clock: allow user to "quantize" MIDI clock resolution 2023-02-23 10:17:47 -07:00
866876c903
Update MClk DLL, fix calculating coefficient
For whatever reason, previously the DLL bandwidth was set
to (10 Pi bpm^-2).
2023-02-23 17:26:30 +01:00
e1ef2c7e0d
Fix LADSPA default values for log-scale controls 2023-02-23 15:05:14 +01:00
52cfa9ff19
Another step towards fixing MIDI Clock sync
* Fix reset on timeout: Reset needs to be called before
  processing any messages.
* use DLL to compute BPM (remove 1st order LPF)
* set BPM before calculating ppqn
* Fix speed at 1.0, change BPM only. MIDI clock must
  vari-speed (which changes pitch). MIDI clock is acts as
  "Conductor" that specifies when a beat happens at a given
  wall-clock time. timecode moves at speed 1.0 only the BPM
  changes.
2023-02-22 18:41:11 +01:00
93b68fea89 mclck: compute "predicted_clock_interval_in_samples" correctly 2023-02-20 21:40:02 -07:00
Ayan Shafqat
2773199fa3
Fix clang build error 2023-02-21 02:02:08 +01:00
83d7114597 transport master: fix think in 58c5f75fc9 which stopped checking both port arguments 2023-02-20 17:35:24 -07:00
6721fe4697 mclk: fix debug output arguments 2023-02-20 17:35:24 -07:00
cd6c88c964
Fix loading VST2 presets at instantiation time
This fixes a crash when dragging a VST2 presets from
the mixer-sidebar to a track.
2023-02-21 01:33:47 +01:00
78c89fcbae
Fix MIDI Clock transport master (#8750)
MIDI Start and Position messages need to leave
the clock timestamp alone. They are not relevant
to compute BPM.
2023-02-19 22:49:23 +01:00
cf0b119b45
Towards fixing MClk transport master (#8750)
* Honor MCLk stop messages, do not auto-start as soon as
  the tempo is locked (after 3 clock ticks).
* Retain MIDI beat position, do not rewind in ::update_midi_clock
  Do not directly start when receiving the position message,
  transport speed should be zero (regardless of clock speed),
  until the "continue" message arrives.
* Mclk start needs to rewind (not reset)

There is still an issue with start, when
_session->transport_sample() is not zero. Ardour ends up
constantly locating, rolling for a short time and re-syncing
by locating again.
2023-02-19 18:19:18 +01:00
e83898cf88
Use correct flag for MMC 2023-02-19 18:09:01 +01:00
c1c913be9d
Fix MClk generator position 2023-02-19 18:08:58 +01:00
b6f0e547bb
Pick a more sensible arbitrary number 2023-02-18 18:44:40 +01:00
cba8fd090f Fix widget retina scaling (#9243)
For normal cairo-widgets ardour should not use image surfaces on macOS,
because that bypasses retina scaling. In theory explicit upsampling could
be performed (compere to openGL/cairo), but for the case at hand that is
overkill and inconvenient.

Performance critical widgets that render periodically can enable openGL
backing. Casual widgets (buttons with text, knobs, sliders etc) can be
rendered directly without any significant performance penalty.
2023-02-17 15:57:32 +01:00
5b6bc3f358 Revert "tempo map: use lookup tables to speed up time conversions"
This reverts commit 644ebe37a8.

Adding entries to the lookup table is (a) not thread safe (b) not appropriate
from RT context.
2023-02-16 18:25:23 -07:00
cfb31e3257 AU: update to new tempo-map API (amend 259499fc) 2023-02-17 01:19:10 +01:00
edbcaa24fb
VST3: initially only enable default-active busses
This works around a problem with some JUCE plugins, notably
https://github.com/surge-synthesizer/surge/issues/6847
2023-02-16 20:43:03 +01:00
31a3c3c6f3 temporal: fix bad escape sequence in test source code 2023-02-15 18:36:23 -07:00
a59059c15e temporal: map used for ::reftime() must be the one pointed at by TempoMetric 2023-02-15 18:36:23 -07:00
92f5046ae6
Update BBT Lua bindings, add missing BBT_Argument 2023-02-16 02:20:18 +01:00
ee64390c48 fix libtemporal tests after API changes to the library 2023-02-15 17:51:28 -07:00
644ebe37a8 tempo map: use lookup tables to speed up time conversions 2023-02-15 16:02:56 -07:00
6f095b91ce tempo map: add data structure and methods for (fast?) lookup tables
As of this commit, none of the data structures are used.
2023-02-15 16:02:56 -07:00
92bd8461ca tempomap: provide improved reftime() method for TempoMetric
This now looks backwards in time for a BBT_Marker or the start of the
tempo map, whichever comes first.
2023-02-15 16:02:56 -07:00
6cde958480 BBT_Time: provide conversion to/from integer format
This is not guaranteed to be lossless, but with 44 bits for bars,
256 beats per bar and up to 4095 ticks per beat, it should be fine.
2023-02-15 16:02:56 -07:00
259499fc5f require use of BBT_Argument as both parameter and return type from most methods (libs edition) 2023-02-15 16:02:56 -07:00
f033b5717d tempo map: fix lookup of tempo/meter for a BBT time
Find the first point/tempo/meter after the reference time of the BBT argument
2023-02-15 16:02:56 -07:00
43c8fae709 initial addition and use of BBT_Argument
Currently this is interchangeable with BBT_Time, but soon will
be handled differently
2023-02-15 16:02:56 -07:00
3c57085756
VST3: fix deadlock when loading a preset in some plugins
Some plugins call back to restartComponent() directly from
IEditController::setComponentState.

This lead to a deadlock since VST3Plugin::load_preset
takes a lock (since 7.2-85 b27467157b), and restartComponent
takes the same mutex again.
2023-02-15 23:50:50 +01:00
62d4e0789a tempo map: fix error in TempoMap::copy_points() that fails to reset _map ptr
This left the _map ptr of all points in a copy of a map pointing
to an old/dead TempoMap.
2023-02-14 10:14:55 -07:00
423a921301
VST3: prevent deadlock when restartComponent is called from Process
This fixes an issue with Blendeq (and likely other plugins)
that call `restartComponent(Vst::kLatencyChanged) from the
in realtime context from plugin's process
2023-02-13 17:32:21 +01:00
21d86b264a
VST3: synchronize AC when plugin's internal state changes
e.g. loading a u-he zebra preset using the plugin's GUI
internally changes the controller state without using the
`performEdit` API, but instead calls `restartComponent` wit
the `kParamValuesChanged` flag to perform a a batch update.
This now also updates Ardour's AutomationControl to match.
2023-02-11 13:36:23 +01:00
83d6b87249
VST3: load custom state after setting parameters (#9206)
This broke in b27467157b. Control port changes were
postponed (written to ringbuffer) and only evaluated
at first run.
2023-02-11 13:31:27 +01:00
441a6ec069
Revert "Prefer symbols from plugins"
This reverts commit 102c48d7a1.
This breaks various plugins, notably all JUCE based ones,
during instantiation.
2023-02-09 23:39:34 +01:00
102c48d7a1
Prefer symbols from plugins
Now that we can require glibc 2.3.4, we can use RTLD_DEEPBIND.
This can help with plugins that do no hide symbols for their
contained statically linked libraries, and instead would use
use symbols.

Note: This only works on Linux.
2023-02-09 21:08:36 +01:00
eeaf0bdadc
Fix non-intel arch builds (cpuid.h header) 2023-02-09 20:54:46 +01:00
Ayan Shafqat
bb31125c94
Fix CPUID to detect AVX512F
CPUID is part of x86_64 ISA to query CPU features. In order to determine
AVX512F ISA extension, EAX and ECX needs to be set to 7 and 0
respectively before invoking `cpuid` instruction. This commit also
removes inline assembly for __cpuid in favor of using compiler provided
intrinsic functions. Both GCC and clang provides __cpuid like function
via __cpuid_count intrinsic.

This commit also creates a portable wrapper over compiler intrinsic
functions, __cpuid and __cpuidex. `cpuid' provides base level ISA query
and `cpuidex` provides extra extension information like AVX512F. These
wrappers lean towards MSVC like API.

References:
CPUID Docs: https://en.wikipedia.org/wiki/CPUID

GCC's ``docs" on __cpuid_count:
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config/i386/cpuid.h

Clang's docs on __cpuid_count:
https://clang.llvm.org/doxygen/cpuid_8h.html

MSVC's docs on __cpuid and __cpuidex:
https://learn.microsoft.com/en-us/cpp/intrinsics/cpuid-cpuidex
2023-02-08 23:20:20 +01:00
445e5162fd
VST3: assume left-only is Mono (#9229)
VST3 speaker arrangements (ie port is connected) can distinguish
between left only pin (of stereo pair) and Mono.
2023-02-08 22:53:26 +01:00
4429697799
VST3: deactivate plugin before calling setBusArrangements
This may currently happen from rt-context, further work
may be needed.
2023-02-08 04:42:57 +01:00
515881653d
VST3: debug setBusArrangements 2023-02-08 04:41:42 +01:00
b069b504f6
VST3: add SpeakerArr debug messages 2023-02-08 03:51:42 +01:00
cc7219636f
Ignore Steinberg's non-virtual-d'tor 2023-02-08 02:03:54 +01:00
53ab6cde1b
Add missing diagostics pop 2023-02-08 01:53:42 +01:00
7b3701d1ef
NO-OP: whitespace 2023-02-08 01:35:45 +01:00
58a846325b
Fix another const warning 2023-02-08 01:35:35 +01:00
bf9ed3f470
Fix loading Ardour 2 sessions with external redirects 2023-02-07 18:28:56 +01:00
4796a3643d use C++11 auto iterator 2023-02-06 21:04:17 -07:00
5979647c22
Fix const warning 2023-02-07 03:43:00 +01:00
fbb175df4e
Enable avx512f support for windows builds 2023-02-06 21:36:09 +01:00
5ee7941895 Only use render-group when container is not opaque 2023-02-05 22:34:38 +01:00
Ayan Shafqat
13562d94f4
Add AVX512F test to CPPUNIT 2023-02-05 16:16:59 +01:00
3d62ab1c53
Do not create sidechain ports by default
In many cases optional sidechain inputs are not used.
Previously sidechain ports were created, but remained
unconnected and silence was passed to the plugin's key input.

Plugins can detected if a pin is connected. Some plugins
(e.g. VST3  Waves SSL Comp) activate the sidechain processing
automatically when depending in connection.

It is more common that a user does not want to use an external
sidechain, and if they want they should use the pin-dialog
to connect it. So leaving it off by default is sensible.

see also #9223
2023-02-05 16:06:19 +01:00
55d1b66b72
Connect sidechain pins when adding sidechain [ports]
This is in preparation to allow to skip adding sidechain ports
by default. When a user later adds the SC input ports, it is
convenient to connect the pins just like they are when they
are connected when instantiating the plugin (via reset_map).
2023-02-05 15:55:29 +01:00
64ec70ec20
Fix plugin replication wrt. sidechains
Ignore sidechain pins, when no sidechain ports are present.
Otherwise a plugin with 1 audio input and 1 sidechain input
would match a stereo track when the sidechain port is not present.
2023-02-05 15:46:33 +01:00
Marijn Kruisselbrink
185fe497c6
Fix AutomationListPropertyTest
These tests use reference files that were generated with a particular
value for superclock_ticks_per_second. The default for that has changed
since the last time the reference files were updated though, causing
tests to fail. Rather than updating the reference files for the new
default value, this makes the test not depend on the default value by
hardcoding the value that was used to generate the reference files.
2023-02-04 23:48:13 +01:00
Ayan Shafqat
17b263dfda
Fix comment mistake 2023-02-04 23:07:17 +01:00
Ayan Shafqat
b3a10378cf
Add AVX512 optimized routines
The routines have been profiled using a test fixture.
https://gist.github.com/ashafq/50880bbbf7769f4f307e9ea9c7e71cf9
2023-02-04 23:07:17 +01:00
Ayan Shafqat
6b766e41f4
Integrate AVX512F support into Ardour
The current implementation is just a stub of AVX and is not
utilizing AVX512F.
2023-02-04 23:07:17 +01:00
Ayan Shafqat
bf8fced073
Add CPU detection 2023-02-04 23:07:17 +01:00
Ayan Shafqat
a050d9bf1f
Add newly created functions to libardour API 2023-02-04 23:07:17 +01:00
Ayan Shafqat
6a3ae8ad72
Add placeholder AVX512F functions
This file is just copied over from AVX and changed prefix
of function calls from `x86_sse_avx' to `x86_avx512f`.
2023-02-04 23:07:17 +01:00
pkubaj
387cac0ec5
Fix build on FreeBSD/powerpc64*
Only glibc has __ppc_get_timebase() function. On FreeBSD use the same assembly call that __ppc_get_timebase() actually executes.

This probably should be extended to musl and OpenBSD, but I have no way of checking that.
2023-02-04 22:40:52 +01:00
380005f50f Update preference to set macOS render performance 2023-02-04 22:34:12 +01:00
509504acf2 Add API to set openGL backing scale 2023-02-04 22:25:52 +01:00
ffafa5cfc7 NSGLView: clean up, allow optional scaling 2023-02-04 21:36:01 +01:00
d12dd4015d
Revert canvas debugging
This reverts commit 8359311849.
This reverts commit f377822891.
This reverts commit 859d6ebe4a.
This reverts commit 4cd7de7a6f.
2023-02-04 18:23:18 +01:00
17f2862f96
Emit signal when resampler-quality changes 2023-02-04 03:20:20 +01:00
caec9acf8d
Export: check all channel-configurations before export
This correctly sets up the filename, and lists all existing
files that will be replaced on export.
2023-02-04 00:21:09 +01:00
054e1c3c12
Retain pending state after recovery (#9215)
After recovering from a crash, the user still needs to
retain the option to ignore the changes that were done
just before the crash after investigating them (or save them
into a snapshot).

Previously crash recovery unconditionally overwrote the
session file (see discussion on bug tracker).
2023-02-03 07:50:32 +01:00
1434789103
Allow to profile session-state save (again)
This was removed in
 bf0a525647
 2316df357b

"SaveState" was chosen because "State" prefix overlaps with
"Stateful", and "SessionState" overlaps with "SessionEvent"
debug names. `-DState` or `-DSession` overlap respectively
with unrelated debug output.
2023-02-03 07:32:50 +01:00
dac8feb98b
VST3: fix plugin GUI value notification (#9212)
OnParameterChange uses the plain (not normalized value)
2023-02-03 05:18:34 +01:00
d0a51f017a
VST3: fix manually setting integer ctrls from UI (#9212)
set_parameter_internal() normalizes the value (C++ reference),
when setting a parameter manually (inline control, generic UI)
only the shadow_data is updated (which is supposed to be
normalized).
2023-02-03 04:44:17 +01:00
830dfdda24
Fix assert() when resolving impossible pin match (#9218)
Adding a MIDI only plugin at a point where there is no
MIDI data, and/or additional audio signals results in an
'Impossible' match.

Those are usually resolved by trying to replicate the plugin,
and the fallback is to "Replicate 1 time".

While this is effectively equivalent with ExactMatch (use
1 instance), it is semantically different: Audio sources
will be ignored and if there is no MIDI signal, the MIDI
input remains unconnected.

It is the opposite to "Hide" (plugin has more inputs
of a given type, which can be fed by silence), since it has
fewer inputs of a given type signals are "dropped".

Strictly speaking we should special case this "Replicate 1 time"
case to "Drop" [sic]. which only assert(!reconfigurable_io()).
2023-02-03 04:37:27 +01:00
26270db8ae
Fix EBU-R128 loudness analysis for mono signals
This removes the special case which assumed unity gain
when reproducing mono files on a stereo system.

ITU-R BS.1770 however specifies a channel weight of 0dB for
left, right and centre, regardless of the total channel count.

Tech 3344 6.16 mentions a 3dB attenuation to maintain the
loudness level of a mono audio signal in multi-channel signals,
and Tech 3343-2016 further specifies that "Ideally, a downmix
operation should be loudness-agnostic".
2023-02-02 17:58:46 +01:00
8359311849 debug: allow to profile exposure (revert this later) 2023-02-01 19:41:11 +01:00
7ca7eb0264 NSGLView: upscale when window is on retina screen 2023-02-01 19:40:03 +01:00
b7ac434584 canvas: invalidate scrollgroup, request redraw after scrolling 2023-02-01 02:57:10 +01:00
df3b8efbb9 triggerbox: fix stop-all-cue marker under very specific conditions
If the stop takes effect on a process cycle boundary, do not just blindly pick
the next trigger; instead using the same logic as if the stop was not on the
boundary.
2023-01-31 18:39:57 -07:00
e76b26acf0 triggerbox: disambiguate otherwise identical DEBUG_TRACE messages 2023-01-31 18:39:57 -07:00
902b98588e canvas: profile render time / area 2023-02-01 01:25:27 +01:00
24d8e5de2c NSGLView: implement partial exposure 2023-02-01 01:23:24 +01:00
72995741bb
Adjust resampler quality when sample-rate mismatches
This also ensures that engine/session resampling is possible
when the config `port-resampler-quality` is 0.
2023-01-31 01:07:04 +01:00
d89162745f
Consolidate base and nominal SR
Now that mismatched sample-rates are resampled, there is
no distinction between base and nominal sample-rate.
2023-01-31 00:54:28 +01:00
53cfbe9c7f
Add API to update port resampler
Previously resampler ratio could only set when creating
an audio port. This is in preparation for setting resampler
quality when the session rate mismatches.

The session's rate is only known after basic session-setup
is performed. At this time Click-IO already exists.
2023-01-30 23:17:29 +01:00
John Emmas
2ff05d9e9d class 'PBD::Configuration' now needs to be exportable 2023-01-28 17:44:11 +00:00
349d25a2d2 Update latency compensation when sends are added or removed
Previously only adding an aux-send triggered a graph-reorder but copying
or deleting sends did nothing.

Adding/removing an aux-send may not even change the graph, but
both upstream/downstream latency can change and delaylines need to be
configured (which is done by calling update_latency_compensation with
force_whole_graph = true).

This fixes an issue with incorrect initial latency compensation after
copying a send (any later change to connections will correctly
recalculate it).
2023-01-27 23:13:52 +01:00
a4fc52ab55 fixup preferences metadata handling (libs edition) 2023-01-27 15:13:27 -07:00
68f4c7ce8e add upcase() method; remove upcase version of internationalize() 2023-01-27 15:13:27 -07:00
7a3b42948d change base class for UIConfigurationBase, because it IS-A Configuration 2023-01-27 15:13:27 -07:00
3c1c6e7b68 continued work on use of Metadata in various Configuration objects (libs edition) 2023-01-27 15:13:27 -07:00
f7387a5d77 infrastructure for PBD::Configuration to deliver metadata 2023-01-27 15:13:27 -07:00
8071a085c4 add concept of a map-of-own-config-variables to RCConfiguration 2023-01-27 15:13:27 -07:00
f377822891 (temporarily) add nodraw bitflag to avoid gradient fills 2023-01-24 10:01:04 -07:00
38c613cd9a Towards arranging sections
This allows to move or copy whole sections of the timline (everything
you hear) to a differnt position on the timeline.

NB. Markers and tempo-map are not yet moved, and interpolated MIDI
events are lost.
2023-01-23 04:07:46 +01:00
c24c210cce Use Controllist's time-domain for guard-point delta
This fixes copy/paste of pan automation (amongst other things).
2023-01-23 04:02:08 +01:00
efe943c98e Reimplement Route::shift, move all automation 2023-01-23 04:02:08 +01:00
46a8073ff2 extend ArdourWidgets::Frame to allow no-draw of frame
Associated: disambiguate Frame use where necessary.
2023-01-22 17:41:43 -07:00
d982507085 move match_search_strings() function from plugin utils to PBD 2023-01-22 17:41:43 -07:00
79033d8ee5 Resample when engine and session sample-rates mismatch 2023-01-22 20:51:44 +01:00
5130a43d87 Remove direct use of audio-engine rate (1/2)
This is in preparation for sample-rate independence.
2023-01-22 20:06:14 +01:00
859d6ebe4a debug: log canvas exposure area 2023-01-21 17:36:22 +01:00
4cd7de7a6f debugging: allow selection no-draw for canvas fill, outline, text, lineset and waveview 2023-01-20 18:13:12 -07:00
a1dee6cba2 Fix printing from Lua DSP context (#9202) 2023-01-21 01:42:33 +01:00
a3095162de Prevent auditioner from writing files to disk 2023-01-21 00:37:41 +01:00
e6230bfd98 Add enum to configure Apple NSGLView mode 2023-01-20 21:46:11 +01:00
2226da1385
VST3: retain I/O from older versions (bump session format)
A VST3 plugin can have additional busses which were not
available in older versions of Ardour. For compatibility
reasons those should remain unconnected. This is achieved
by using a custom I/O config  (same way a user would configure
this).
2023-01-17 22:02:10 +01:00
e5e9b477d0
Force rescan of VST3 plugins 2023-01-17 22:02:10 +01:00
f221a5e47f
VST3: offer output bus configurations 2023-01-17 22:02:10 +01:00
1cbd2d3468
VST3: support VST I/O busses
This unconditionally enable all busses with connected pins.
It does not provide re/configurable I/O (like Audio Unit), nor
implement dynamic Vst::kIoChanged callbacks. But regardless
this allows for plugins with multiple I/O busses (e.g. drum synths).
2023-01-17 22:02:10 +01:00
617ec6f54f
Include bus number in IOPortDescription 2023-01-17 22:02:10 +01:00
e87b989501
Inform plugins about connected input pins
When not using inplace processing (because I/O pins connections
are not an identity matrix), dedicated inplace-buffers are used.
Those buffers contain silence on unused ports, and hence always
valid to use. However it is still useful for plugins to know
if a plugin-port is actually used. VST3 can disable busses
for unconnected pins.
2023-01-17 22:02:10 +01:00
f6eac0f03a
Clarify that plugin replication is exclusive to re-configurable I/O 2023-01-17 22:02:07 +01:00
John Emmas
7433ca7e8b Correct a couple of typos when calling 'g_fopen()' 2023-01-17 10:32:36 +00:00
e66a757154
Fix simple export when there is no session range 2023-01-17 00:23:08 +01:00
58594e2554
Fix SMF read/write when compiled on Windows 2023-01-16 22:57:03 +01:00
2c7f8eeb97
Indicate UTF8 literals - fixes glyph rendering with MSVC (1/2) 2023-01-16 21:41:09 +01:00
c635d15cf0
Use pipe with CmdPipeWriter (see b8d07b8) 2023-01-16 16:41:28 +01:00
2522deabda
SystemExec: tweak writing to stdin of child process 2023-01-16 16:39:37 +01:00
b8d07b8be2
Export CmdPipeWriter: add option to use tmpfile
Investigate issues with mp3 export (#9193)
2023-01-16 05:10:32 +01:00
Marijn Kruisselbrink
b0f5fea53a
Fix minor errors in temporal/wscript 2023-01-12 20:58:24 +01:00
0083c8fb9f Remove "using namespace" from header (part 2) 2023-01-12 19:19:41 +01:00
3a6f822381
Remove "using namespace" from header 2023-01-12 19:01:48 +01:00
6407ca51cd
Fix region-fade, time-stretch and other scaling operations (#9057)
This resolves an ambiguity between abs(int) and std::abs(T) which
depends on context and compiler version and optimization.

In context of #9057, (gcc-6.3 -O3) math.h `abs(int)` was used. This
truncated the superclock value to 31 bit in ControlList::extend_to.
2023-01-12 16:17:39 +01:00
117cfc844b
Fix 128 bit integer math rounding (#9057)
The previous code only used the 1st multiplicand was use to
determine the direction of rounding, breaking commutative property

`muldiv_round (1, 3, 4) != muldiv_round (3, 1, 4)`
2023-01-12 16:08:53 +01:00
34e12a5d78
Fix grid when tempo marker is not on a mod_bar/beat_div
Previously the current iterator bbt was moved to p->bbt().

From then on, no grid line is reached if the point p is not on
a bar and mod_bar != 0 or the point is not on an expected beat_div.

e.g. when using bbt += mod_bar, and a tempo-change is at 5|2|0.
iterations continues 6|2|0 7|2|0  is_bar() is always false
and no more grid-lines were added.

Rather than trying
   bbt = round-up-to-next-grid-mod-div
and then finding the metric for that position, this
approach only does the latter using the already incremented
BBT position.
2023-01-11 00:25:23 +01:00
b0a679a1af
Fix grid after last tempo-marker when showing bars
This is a copy/paste bug, compare to d77db816de
2023-01-11 00:06:43 +01:00
f658a4c0b2
Fix Region lock style property (#9191)
This allows to properly toggle "Glue to Bars/Beats".

Editor::toggle_region_lock_style uses Region::position_time_domain(),
However Region::set_position_time_domain() checked the duration's
time-domain.

Furthermore timecnt_t::set_time_domain() changes both the
position and the duration's time domain. This can lead to
various issues. We only need to change the time-domain of
the timepos_t _position.
2023-01-10 20:07:05 +01:00
88a2c1123d
Fix windows builds, export pipe (amend 7ffd7a8c) 2023-01-08 17:09:55 +01:00
7ffd7a8c62
Convert filename for Windows commandline 2023-01-07 22:36:17 +01:00
ebf7afc482
Fix reporting tempo and time-signature to VST plugins #9188 2023-01-07 05:16:14 +01:00
3ae7295142
Allow to disable cairo render groups (performance test) 2023-01-06 21:15:43 +01:00
b27467157b
VST3: synchronize parameter-changes
IParameterChanges (_input_param_changes) queue should not be
modified while the plugin processes. Doing so can lead to invalid
iterators.

Also activate/deactivate and state restore must not happen
concurrently with processing.
2023-01-06 03:31:07 +01:00
a0452eeb57
VST3: dynamically grow ParameterChanges
Some plugins (e.g. Roland JD-800) have zero controls, but
MIDI control with are not directly accounted for. This
results in a zero-size ParameterChanges queue, which later produced
a segfault when trying to enqueue a MIDI change:

```
input_param_changes.addParameterData (id, index)->addPoint (sample_off, value, index);
```
2023-01-06 03:29:55 +01:00
a6107fc1af
Fix preference name/variable mismatch #9192 2023-01-05 19:00:56 +01:00
09b0734028
Increase system-exec stdout bufsiz (from 512 to 8k) 2023-01-05 04:54:07 +01:00
27e136dcfc
Cont'd tweaks of ffmpeg export pipe 2023-01-05 03:32:40 +01:00
3da7f71fb6
Windows process: allow for binary data output
Do not rely on null termination.
2023-01-04 20:28:22 +01:00
bb4394b8a5
Use pipe through ffmpeg, use glib to write output
This is intended to fix an issue with odd filenames on Windows,
particularly forward and backwards single quotes as part of a filename.

Previously the filename was passed as parameter to ffmpeg as
UTF-8 string to SystemExec::make_wargs, which is fragile on Windows
in absence of a execve() call.
2023-01-04 17:26:43 +01:00
41325a75fe
Add a debug message to track down crash scanning LV1 plugins 2023-01-03 02:26:50 +01:00
0f22f5e319
Identify surfaces by ID (not name) 2023-01-02 21:15:19 +01:00
Marijn Kruisselbrink
bf7f6386d5
Re-enable lib/ardour/test/session_test.
This test seems to be compiling and passing just fine (when run in
isolation), so turning it back on seems like a good idea. To make it
pass when run as part of the full ardour test suite, this does remove
the WebSockets control surface from the control surfaces test though, as
that control surface messes up the event loop of the main thread, which
would otherwise cause use-after-free crashes in the session test.
2023-01-02 20:31:12 +01:00
208aedaeaa
Fix "Invalid Source port" error with default config 2023-01-02 04:27:20 +01:00
d0b95b7685
Do not truncate pretty bundle names
This also fixes a potential buffer overlow on Windows.
Window _snprintf does not null terminate the string in case
the formatted length is longer than the given buffer size.
http://msdn.microsoft.com/en-us/library/2ts7cx93%28v=vs.110%29.aspx
(mingw's uses _vsnprintf under the hood which is also affected).

Alternatively we could rely in g_snprintf() to truncate the
string.
2023-01-01 17:44:43 +01:00
Marijn Kruisselbrink
ef253d3fc9
Use pretty names of ports not just for mono bundles, but also stereo.
Session::setup_bundles() creates mono and stereo bundles from hardware
inputs and outputs. For mono bundles the name of the bundle was based on
the pretty name of the port (if the port has a pretty name), however
stereo bundles always used the indices of ports to make the name.
When using pipewire (or otherwise having multiple jack clients exposing
physical ports) the indices are even less meaningful than otherwise (as
different devices could appear in arbitrary order), so also using pretty
names for stereo bundles makes the UI less confusing in places where
these bundle names are used (for example the menu when clicking on an
IOButton).
2023-01-01 17:26:14 +01:00
24597de7a2
Make RDF info/warning messages translatable 2022-12-30 19:10:07 +01:00
a4036b9590
Set non_rt_pending no-roll parameter (previously uninitialized) 2022-12-30 19:09:16 +01:00
36d640c8bc
Yet another attempt to fix Windows/LADSPA presets 2022-12-29 19:02:15 +01:00
55ac803701
Fix Windows builds (user_cache_directory) 2022-12-29 18:29:51 +01:00
4bb7e43008
x-platform LADSPA user preset files
This fixes saving/loading custom user presests on Windows
2022-12-29 18:22:48 +01:00
3ba999b9d7
Also use LDRF (and aubio4) on Windows 2022-12-29 01:58:11 +01:00
58ade46de3
Fix loading LADSPA RDF files x-platform
Searchpath on Windows uses backslash as folder separator,
however file URLs use forward-slash file://C:/foo/bar/
2022-12-28 20:06:00 +01:00
478338854d
Improve peak-file debug output, print affected source-name 2022-12-27 13:35:53 +01:00
475063c24d
ALSA: update endianess conversion functions
This follows upstream zita-alsa-pcmi-0.6.1
2022-12-27 13:32:31 +01:00
ac30964d67 remove debug output 2022-12-26 14:03:32 -06:00
140b373cac
Clean up ExportAnalysis code
* only zero limiter_pk array on initialization
  (other data is explicitly initialized)
* resize peak-data vector to at least 800 bins
2022-12-26 14:34:25 +01:00
7b3cbaf68f
Inform User when audio-read failed (debug builds)
Previously AudioPlaylist::read always returned the timecnt that
it was supposed to read into the buffer, regardless if the given
number of samples was read. The check in DiskReader::refill_audio
`if (nread != to_read)` never triggered.

This can happen when changing an audio-region's time-domain to
music-time (glue to bars/beats). Region-length (beats converted
to samples) can exceed the actual audio-source length (in samples).
2022-12-26 13:40:05 +01:00
7e9f29e888
FP8: directly cancel solo (do not rely on GUI) 2022-12-26 13:33:19 +01:00
b2a6fb70b4 remove debug output 2022-12-20 22:01:41 -07:00
818c30a98d temporal: add optional with_reset arg to all map ::remove_*() methods 2022-12-20 21:54:05 -07:00
0ee0226776 temporal: no stretching a tempo that is the last one or precedes a BBT marker 2022-12-20 21:33:13 -07:00
d3dd865093 temporal: NOOP - add helpful comment 2022-12-20 21:31:31 -07:00
ae36f8e445 temporal: provide TempoMap::replace_tempo() 2022-12-20 21:31:02 -07:00
033b4c5152 temporal: fix implementation of TempoMap::copy_points()
This could re-order the map in the presence of BBT markers
2022-12-20 21:29:44 -07:00
3e19363c4c fix typo in prior 10d125: sort presets 2022-12-19 10:04:29 -06:00
f058f910f4
Actually use overloaded get_presets() implementations 2022-12-19 16:43:42 +01:00
10d12599dd
Sort plugin presets by default 2022-12-19 16:41:41 +01:00
ae321721cf
Also thin automation after touch/latch
AutomationList::start_touch must not start a write-pass.
That function is also called when the transport is no rolling.
A write-pass is started via AutomationWatch::add_automation_watch.
2022-12-18 01:45:04 +01:00
028c19cd10
Remove hardcoded thinning factor 2022-12-18 00:55:28 +01:00
a5f36bbbbf
Fix thinning (normalize parameter value)
This fixes thinning of MIDI data (range 0..127) and
other parameters with range other than 0..1.
2022-12-18 00:55:12 +01:00
5b52aa956f
Prepare for region polarity inversion (using negative gain) 2022-12-17 13:14:54 +01:00
37d6f1026a
a-eq: ifdef methods only used for inline display 2022-12-16 23:05:36 +01:00
3b9a253a84 Bind weak pointers to rt_slot events
This fixes a crash when deleting routes, while there are still
automation events queued for the route.

Specifically, SoloControl has a reference Soloable& _soloable; which
points to the parent route. A rt-event can still hold a valid shared
pointer to the SoloControl, even if the route is destroyed.
Calling SoloControl::actually_set_value is fine (the control still
exists due to the shared ptr), but then checking the parent route:
```
if (_soloable.is_safe() || !can_solo())
```
accesses the already deleted route, which causes a crash.

The solution implemented here is to not bind a shared_ptr to the
realtime event. However, since deletion of the route happens in the main
UI thread, there may or may not still be a race.
2022-12-16 00:12:48 +01:00
c64869596e
Fix auto audio monitoring when using hw monitoring 2022-12-15 17:24:17 +01:00
edd68d8682
Automatically align metronome when recording it to a track 2022-12-15 00:55:32 +01:00
95544a86a0
Convert SMF track names to UTF-8 2022-12-15 00:30:18 +01:00
eec36feb11
Fix importing MIDI files with duplicate track names 2022-12-15 00:29:50 +01:00
75c9927d75
Tweak MIDI file import parameters
* Create opaque regions
* Set interpolation of parameters to be discrete
  (just like at rec-stop).
2022-12-14 16:14:47 +01:00
27dfd8a7e3 Fix loading LV2 presets with non-float port values
In practice, this mostly means integers when presets leave off the ".0", but we
implement all the numeric types here for good measure.

Also while we're at it, warn about unknown types now so it doesn't take three
people a half an hour to figure out what's going on the next time something
like this happens.
2022-12-13 22:03:48 -05:00
bd8c3af2a2 fix crash on MIDI unlearn for cue slot (bad iterator 2022-12-13 17:43:16 -07:00
eb1373404a
FP8: do not reset fader to unity on re-selecting
This disables the feature added in 057fd9259e.
The idea was to use double-click to reset the fader (like
Harrison consoles). Simply re-select can lead to accidents.
2022-12-13 18:01:27 +01:00
bd091906ac
Fix OSC/liblo zeroconf, properly query server URL 2022-12-13 17:15:54 +01:00
d704572ed5
FP8: fix monitor control
monitor_active() is the wrong API (it checks if any
monitor-bus settings are enabled or used).
2022-12-13 17:14:52 +01:00
Edgar Aichinger
d92342fc90
update german translation 2022-12-12 11:42:39 +01:00
d1ef9947a2
Add Lua bindings to change mute-points 2022-12-12 10:43:59 +01:00
d568bb5a06 Fix unused computed values
For example:

../libs/pbd/reallocpool.cc:138:38: warning: value computed is not used
[-Wunused-value]
  138 |                 ASSERT (_asize (ptr) <= newsize);
2022-12-11 11:54:03 -05:00
39c324b620 temporal: fix ::get_grid() crash condition
We cannot call TempoMetric::superclock_at (BBT_Time) if the BBT time is beyond
the range of the current TempoMetric. We must discover that *before* we make
that call, not as part of the test to see if we've exceeded the range.
2022-12-10 22:59:58 -07:00
db3e87a7e4 do nothing gracefully if asked to remove only tempo 2022-12-10 14:14:12 -07:00
ab34861388 canvas: provide a means of blocking change notifications from Item propagating up the object tree 2022-12-10 13:37:16 -07:00
c2c23172bd ctrl surfaces: add method to BasicUI to stop slots in a given trigger box 2022-12-10 10:33:24 -07:00
9403b116ad Mackie: make AudioInstruments button work correctly
Also toggle Global View LED appropriately
2022-12-10 10:32:47 -07:00
70b00f5201
Canvas: allow to group rendering of child items
> This group functionality can be convenient for performing
> intermediate compositing. One common use of a group is to
> render objects as opaque within the group, (so that they
> occlude each other), and then blend the result with
> translucence onto the destination.
https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-push-group

The main use case where will be to render opaque layered
[MIDI] regions transparently onto a grid.
2022-12-10 02:37:04 +01:00
cd7c981e6e Use macOS API to open finder at given path 2022-12-08 02:15:29 +01:00
201617f03b Fix macOS URI open
curl_easy_escape() escapes slashes, which fails with openURL on modern macOS.
Also add missing call to curl_easy_cleanup().
2022-12-08 02:12:15 +01:00
d3e736f7d3
Consistent audio/MIDI monitor modes
Now that both Audio And MIDI tracks support all three record
modes. Monitoring should be consistent. When recording
"Sound on Sound" does cue monitoring, while "layered" (opaque).
and "non-layered" monitors only the input.

Two differences remain: (1) when not recording MIDI tracks still
monitor both Input and Disk (unless Non-layered is set), and
a final special case is that MIDI tracks always monitor input
as fallback. the latter ties in with (2) audio tracks can
use hardware monitoring.
2022-12-07 22:49:08 +01:00
4beca98e28 temporal: fix various incorrect uses of ::samples() in audio time arithmetic
It is a wonder that this has not caused more visible issues since 7.0
2022-12-07 11:13:49 -07:00
e28e079c9f
Consolidate Export Format/Spec comparision 2022-12-07 17:56:07 +01:00
1005fc5716
Allow to import opus files 2022-12-07 13:36:57 +01:00
85a1c463e5
Add Lua method to show system env
`for v in ARDOUR.LuaAPI.env():iter() do print(v) end`
2022-12-07 00:28:21 +01:00
716501defa potential fix for "/bus/... master ..." target in MIDI binding maps failing 2022-12-06 11:11:08 -07:00
89d8dc26dd
Resolve export format ambiguities
This fixes an issue when switching formats.
ExportFormatDialog::update_selection iterates e.g. WAV BWV.
If BWV was selected and a user selects WAV the following happpens

1. WAV is selected
2. BWV is deselected
3. Since BWF and WAV are the same format, ExportFormatManager
   deselects WAV
2022-12-06 17:30:43 +01:00
d2212cbfb9
Add 24kHz as export rate, and limit opus to 8,24,48 per spec 2022-12-06 06:35:44 +01:00
c8b39094ca
Opus has no sample-formats 2022-12-06 06:35:40 +01:00
4d05c7add9
Map sndfile/opus quality to bitrate 2022-12-06 06:35:15 +01:00
211ff64e7d
Prepare for ogg/opus encoding 2022-12-05 23:43:34 +01:00
c505024a4b temporal: when resetting the map, position BBT markers in beat time (and stop reset there) 2022-12-05 10:01:49 -07:00
12b672492e tempomap: fix and improve efficiency and readability in ::get_grid() 2022-12-05 10:01:49 -07:00
8f257e1b2e
Thin MIDI automation when combining regions #9117 2022-12-04 12:12:12 +01:00
ddf894a1dd
Attempted fix for idle_drop_window random crashes (2/2) 2022-12-03 19:27:53 +01:00
1736b1d424
Avoid .sh file extension 2022-12-03 15:03:44 +01:00
30efb2f178
NO-OP: clang-format 2022-12-03 14:46:45 +01:00
2338e25d31
Fix automation thinning
For consistency, samples need to be used a unit.
Currently the calculated area is orders of magnitude larger
than the default thinning_factor (20).
2022-12-03 14:46:45 +01:00
John Emmas
1592b95031 Minor change - incorrect return type (in Windows build) 2022-12-03 12:21:12 +00:00
a3fdb544ee
Fix copying MIDI regions w/automation
This fixes a bug introduced in d06a0d9c9d. The MIDI data
has to be written first, otherwise the CC-event do not exit
and MidiModel::source_interpolation_changed() crashes.
2022-12-02 21:44:22 +01:00
753d395bb3
NO-OP: add comment for mdns 2022-12-02 18:01:21 +01:00
7d928bf265
Announce OSC via mDNS 2022-12-02 17:34:10 +01:00
c53b19c039
Add zeroconf/mdns support 2022-12-02 17:32:11 +01:00
aae15e3c90
Fix Wreorder, initialize variables 2022-12-02 13:13:13 +01:00
23a0efc286
Indicate error when parsing session fails 2022-11-29 20:00:15 +01:00
e3dc0a24f2 canvas ruler: use second font description appropriately 2022-11-29 10:09:39 -07:00
d77db816de temporal: reimplement and tweak API of TempoMap::get_grid()
There were many logical errors in the previous implementation. This one is
simpler to read, and appears to work much better.

It also allows the caller to specify the quarter-note subdivision to use when
generating the grid, rather than choosing only between some bar modulo or
quarter notes.
2022-11-29 10:09:39 -07:00
a124062fa2 temporal: move_tempo() must use beats (timesig dependent) not quarters 2022-11-29 10:09:39 -07:00
1f4717d93b temporal: reset map requires a BBT-sorted map, not audio time 2022-11-29 10:09:39 -07:00
a817142676 NO-OP: extend debug trace output in superclock_at (BBT_Time) 2022-11-29 10:09:39 -07:00
8299778d26 temporal: slightly change internal API for omega (ramp) computation 2022-11-29 10:09:39 -07:00
d9ed0f0d2e temporal: use muldiv_round to avoid overflow in TempoMetric::superclocks_per_grid() 2022-11-29 10:09:39 -07:00
883527ba3e temporal: add Meter::round_to_beat() 2022-11-29 10:09:39 -07:00
a7d2718aa4
ALSA: use dedicated device reservation for probing
It can happen that the main AlsaAudioBackend::_device_reservation
is still busy while I/O devices are set. In this case a
dedicated AlsaDeviceReservation needs to be used which can fail
silently.

A common example is disconnecting a USB device while it is in
use. The Halted signal can show the session dialog, which calls
set_input_device_name before the device reservation of the
unplugged device terminated.
2022-11-29 17:34:45 +01:00