13
0
Commit Graph

21599 Commits

Author SHA1 Message Date
204d4237f8 further steps towards MidiRegionView outside the Editor 2024-10-17 07:44:29 -06:00
e3d790207f modify MIDITrigger to use an RTMidiBuffer<Beats,Beats> for playback, not a MidiModel
Creating an iterator on a MidiModel (Sequence) creates a read-lock on the same,
which exists until the iterator is destroyed.

This new designs renders the model/source to an RTMidiBuffer, then atomically
swaps in a new RTMidiBuffer in an RT context.

Not yet implemented in this temporary branch is handling required
state-changing messages when the buffer is swapped.
2024-10-17 07:44:28 -06:00
a4a277c141 templatize RTMidiBuffer to allow use in different time domains
Also add ::track_state() method to configue a MidiStateTracker
to correspond to the state implied by an RTMidiBuffer<T,D>
at a given point in time.
2024-10-17 07:44:28 -06:00
b693d07fcb Add a new ::render() method to MidiSource that writes to an EventSink 2024-10-17 07:44:28 -06:00
0986b8d1e8
Revert "Only enable RegionFX in debug builds for the time being"
This reverts commit d525f8d60c.
2024-10-17 15:36:29 +02:00
John Emmas
b6cb758357 Another minor tweak to fix a build issue with MSVC/c++17
Fixes a conflict between 'std::byte' (new in c++17) and earlier declarations / typedef's that defined 'byte'
2024-10-17 12:07:05 +01:00
d525f8d60c
Only enable RegionFX in debug builds for the time being
This reverts commit 14ff2f2e68.
2024-10-16 18:29:51 +02:00
6149771910 fix yet more cases where SMF are imported and named incorrectly 2024-10-15 22:35:04 -06:00
Mads Kiilerich
0d4bce8663
backends: Fix class name in debug and error messages for set_latency_range and get_latency_range traces 2024-10-15 00:41:12 +02:00
Mads Kiilerich
99ba70384a
FaderPort8: Improve DEBUG_TRACE messages 2024-10-15 00:41:12 +02:00
Mads Kiilerich
5c763c99ba
FaderPort8: Use explicit "Port 1" for FP8 too
84e38b4c65 made the same change for FP16.

It has apparently not been necessary for FP8 so far, because backends
have happened to report "Port 1" before the control port. But that is
not necessarily the case. It failed for me when playing around.

Change FP8 handling to also not make assumptions about the device order
returned by the backend.
2024-10-15 00:41:12 +02:00
Mads Kiilerich
b7249c8fe7
build: Set _POSIX_C_SOURCE=200809L instead of comment about -std=gnu99 in 8fea1ea42e
We are converging towards setting it globally.
2024-10-14 22:57:15 +02:00
eb87b0e2eb
Remove old safety check
These days it only produces false positives (locate at start
of session export).

We leave `ENSURE_PROCESS_THREAD` in place, since it may
come in handy at some point (eg. static analysis, documentation)
2024-10-14 22:52:37 +02:00
8115578d4e
Add RT thread priority debugging 2024-10-14 21:49:56 +02:00
63d3d1ff3d
Initialize fader's numeric entry adjustment
Previously the internal adjustment used for numeric entry
was left at 0 if the BarController's adjustment was never modified.
2024-10-14 17:58:00 +02:00
John Emmas
fd8808d7b8 Minor declaration issue that upsets MSVC/c++17 2024-10-13 11:39:48 +01:00
0aff098541
Fix IO Thread priority
This adds `pbd_pthread_priority` indirection to correctly get
the absolute thread priority.

and for consistency a 4 letter enum is used.
2024-10-11 10:06:49 +02:00
5efa5b4529
Optimize audio region read when no regionFX are used 2024-10-10 02:45:03 +02:00
43dd75b10e invalidate audio region cache when the region _start changes 2024-10-09 16:53:55 -06:00
14ff2f2e68
Revert "Only enable RegionFX in debug builds for the time being"
This reverts commit cae710cd7c.
2024-10-09 20:49:36 +02:00
2a96c9ce98 fix issues with MIDI playback (and who knows what else) near start of roll 2024-10-08 08:36:23 -06:00
cae710cd7c
Only enable RegionFX in debug builds for the time being 2024-10-08 16:23:43 +02:00
59e98bd824
Fix reading peak-file after EOF
This issue was introduced in b28090c64c
2024-10-08 11:54:14 +02:00
33806a2735
Revert "Only enable RegionFX in debug builds for the time being"
This reverts commit 2d076cccb1.
2024-10-03 17:28:09 +02:00
e3e014bfe6 NO-OP: comment work 2024-10-02 11:03:08 -06:00
52336eb2f0 fix MIDI Clock output times by using the correct call to get tempo at a position
Could be worth a double check of the codebase/hiding the API that ignores ramping
2024-10-02 09:13:28 -06:00
adc9d9e0af
VST3: work around plugins that do not heed ContextInfo::kSendCount
see also c5618f01d6
2024-10-01 23:03:19 +02:00
John Emmas
07c79ce92c Small changes to make pthread_utils.cc buildable again with MSVC 2024-10-01 20:28:16 +01:00
44b2377e72
VST3: Fix possible deadlock when using PSL extension for sends
see also c5618f01d6
2024-10-01 19:24:36 +02:00
ca7ac7027b
VST3: add more debug messages for PSL extensions 2024-10-01 01:21:35 +02:00
22a2cb0624
Ignore inactive routes for pre-roll sub-cycles 2024-09-30 23:36:36 +02:00
1aad6805b3
Fix count-in/preroll recording offsets
Notably `Route::process_output_buffers` uses

```
  output_latency = speed * _output_latency;
```

here, speed already needs to be non-zero during count-in
and pre-roll.
2024-09-30 23:36:06 +02:00
dab22a7c70
Explicitly set Windows Process Scheduling Class 2024-09-30 19:57:53 +02:00
ed437afda7
Fix thread priorities for Windows builds 2024-09-30 19:07:53 +02:00
11f71a3297
Fix playback of sessions with low sample-rate
previously, _chunksize =
```
  minimum_disk_read_bytes / sizeof (Sample)
```

can become larger then actual allocated ringbuffer:

```
  audio_playback_buffer_seconds * sample-rate
```

In which case the buffer was never filled.
The disk writer has similar issues
2024-09-29 18:25:33 +02:00
46f61d7662
Fix and simplify Playlist::fade_range for multiple ranges 2024-09-28 21:16:55 +02:00
28605b5351
Fix Audio region fade property mapping
This fixes an issue when undoing region fades.
Particularly but not limited to the following:

1. select a region and split it in the middle
2. switch to range tool. make a range selection across the split
3. Edit > Fade > Fade range seection  (or press `/`)
4. Undo

Previously the fade-out of the earlier region was not undone.
2024-09-28 21:15:57 +02:00
1d921dec0b
Debug thread sched_priority 2024-09-28 14:47:52 +02:00
2014faaeca
Fix BaseUI thread priority 2024-09-28 14:45:05 +02:00
dd4a1a6d73
Set thread priority relative to backend
This also removed direct calls to backend real_time_priority
for good measure.
2024-09-28 04:15:39 +02:00
395833e4f8
Always use PBD API for thread priorities 2024-09-28 03:58:48 +02:00
0b5a197f76
NO-OP: whitespace 2024-09-28 03:16:57 +02:00
d089f38481
Use config variable to set IOTask thread policy 2024-09-28 03:16:54 +02:00
dcd79f3135
Debug Backend thread creation 2024-09-28 03:16:50 +02:00
aeb4f925c6
PBD pthreads: allow unlimited stacksize 2024-09-28 03:16:45 +02:00
e8c67408bb
Impose stack limit on backend threads (freewheeling, MIDI poll) 2024-09-28 03:16:42 +02:00
e8445d13ec
Require thread name to be passed to PBD::Thread and store thread 2024-09-28 03:16:30 +02:00
88a24ae8e5
Let PBD::Thread set thread-name 2024-09-28 03:16:07 +02:00
538a8cbccc
Consolidate calls to `pthread_create' (2/2) 2024-09-28 03:16:02 +02:00
8d3ebde60e
Distinguish Threads and ThreadName debugging
This also allows for -DThread to enable both.

We celebrate the 128th debug bit and look forward to
the next 64!
2024-09-28 03:15:36 +02:00
c4fdd5356c
Enable debugging for stored threads 2024-09-28 03:14:16 +02:00
301777e7fe
Remove cruft 2024-09-27 18:03:11 +02:00
71a3161252
Error handling for 3751d20ce 2024-09-27 17:20:42 +02:00
3751d20ce9
Use dedicated thread to start export timespans #9798
This addresses an issue with creating a one-shot thread
directly from the realtime callback, which can be problematic
on Windows.
2024-09-27 06:00:15 +02:00
d8e4e7b259
Fix calculating intersection of waveform rectangle
see also 68eb63e0c8
2024-09-27 02:54:35 +02:00
9945d7721f
Allow to investigate I/O thread policy
see
https://discourse.ardour.org/t/ardour-8-7-unable-to-connect-to-audio-backend/110774/10
https://discourse.ardour.org/t/ardour-8-7-x-run-issues/110767/2
2024-09-27 01:41:40 +02:00
6cc54aa1b0
Fix playhead moving beyond loop range
When some other transport related session event (anything that
requires non_realtime_work_pending, e.g. PostTransportOverWrite)
coincides with SessionEvent::AutoLoop, the auto-loop event
was removed from the main event queue and executed as one-shot
immediate event.

While looping the AutoLoop event needs to remain on the main
event queue.
2024-09-26 16:26:05 +02:00
dc92ed1bc9
Fix Pre-Fader RegionFx when looping 2024-09-26 04:39:19 +02:00
180e90b81a
Only call non_realtime_locate() when locating
`butler_transport_work()` may be called for various reasons,
notably PostTransportOverWrite. At that point in time the
transport may still be rolling or stopping with rtloc already
set.

This can cause DR::Underruns since seek clear the entire
disk reader buffer.
2024-09-26 03:45:24 +02:00
4f33105ae0
Process PostTransportOverWrite after all
This is needed to properly decrement "should_do_transport_work".
After a seek the DR:_pending_overwrite flag will have been
cleared, so not much extra work happens here.
2024-09-26 03:25:13 +02:00
e1f465a952
NO-OP: improve butler and disk-i/o debug messages 2024-09-26 03:25:07 +02:00
75e6a77c3e
Fix another debug message 2024-09-26 02:26:30 +02:00
9d0415ba04
Waveview: fix visual jitter when trimming or splitting regions
The left edge of a region on the the editor is rounded to be
on a pixel. When zoomed out, the position corresponding to that
pixel is not usually identical to the region's position().

We need to correct for this as best as possible, while keeping
peaks aligned to pixels.
2024-09-26 02:21:24 +02:00
68eb63e0c8
Waveview: fix rounding, span entire region rectangle
Previously samples at the end could end up being cropped,
when the Waveview is rendered using an offset.
2024-09-26 02:21:24 +02:00
b28090c64c
Peakdata: start striding at consistent offsets 2024-09-26 02:21:24 +02:00
5d65d7f051
Peakdata: correctly set peaks of left and right end 2024-09-26 02:21:23 +02:00
18e0cba1cb
Fix underruns when looping/locating and changing region content
Previously loop-wrap around asked the butler to perform
a unnecessary seek operation next time it is summoned.

If the butler is then summoned for a PostTransportOverWrite
event, the seek causes a DR::Underrun.
2024-09-25 20:06:08 +02:00
5af023c70b
Fix some debug messages 2024-09-25 20:06:08 +02:00
3d1c414a94 initialize member variable 2024-09-24 14:52:06 -06:00
0e28620a7a prevent Session::StateSaved being emitted when doing save-as with no switch-to
The signal would be emitted while the session was temporarily renamed,
making it appear that we had switched to the new session, despite instructions
not to do so. We had not actually done so, but the saved-as name would show up
on window titles.
2024-09-24 14:50:35 -06:00
72cac07ae7
Generic MIDI: do not send touch events for all mapped controlers
Previously a start-touch was sent for any bound MIDI
Controllable on each incoming MIDI Control event.
2024-09-24 16:11:00 +02:00
d3f536a7ff
Remove unused variable 2024-09-24 16:10:59 +02:00
4024a4354c region grouping: Overdubbing in non-layered mode was assigning wrong groups 2024-09-23 16:35:04 -05:00
f75f5b0ded add option to name new MIDI tracks from SMF with just the SMF track name (libs edition) 2024-09-22 09:49:55 -06:00
9c64e7d141
Fix libhid API builds with recent gcc/glib `
Since glibc 2.10 `wcsdup` and `strtok_r` require `_POSIX_C_SOURCE`

(see also da520ce 4b8b5ac)
2024-09-15 12:00:12 +02:00
Fabio Pesari
f94bde59d7
Fix for Boost 1.8.5
Recent boost prevents calls to `get_child` with temporary
default values.
2024-09-15 11:43:52 +02:00
1f70d54989 avoid call of a null function pointer 2024-09-13 08:24:04 -06:00
79e78394c2 track modal window show/hide, not realize/finalize 2024-09-13 16:02:59 +02:00
ab533c38a3
LV2 fix a tiny memory leak introduced in c0b61d5a28 2024-09-11 05:31:27 +02:00
1737b48aec Revert "try to add some debugging for macOS modal/menu handling"
This reverts commit c5751db473.
2024-09-10 16:34:16 -06:00
bf6ce27b03 Revert "try to fix up previous commit"
This reverts commit 04305774cc.
2024-09-10 16:34:03 -06:00
04305774cc try to fix up previous commit 2024-09-10 13:48:59 -06:00
c5751db473 try to add some debugging for macOS modal/menu handling 2024-09-10 13:09:13 -06:00
e8644654c2
Prepare to filter incoming LTC 2024-09-10 18:25:06 +02:00
cd6dca6063
Allow to query Biquad coefficients 2024-09-10 18:25:02 +02:00
c0b61d5a28
Fix LV2 optional connect port logging #9790 2024-09-09 16:04:35 +02:00
75d2b46ded
Add Lua bindings to query MIDI SysEx and PatchChanges 2024-09-08 22:59:09 +02:00
3b5a6e1f15
Fix MIDI SysEx undo/redo
Previously `new_sysex_diff_command` used XMLNode c'tor.
An Unnamed undo transaction was created, and undo did not work.
2024-09-08 21:09:37 +02:00
d257c8c0ce
Prevent endless recursive directory scans
This can happen when a folder symlinks to itself or subfolders
in some similar recursive pattern.
2024-09-08 01:33:57 +02:00
e8162a421d
LV2: Log connect-optional ports 2024-09-07 18:28:37 +02:00
Daniel Appelt
af8a7df991
Connect unknown optional LV2 ports to NULL 2024-09-07 18:07:12 +02:00
Daniel Appelt
5a1fc0ddc9
LV2: Ignore connection optional ports 2024-09-07 18:07:01 +02:00
145f6d587c
fix previous commit 2024-09-06 20:03:48 +02:00
9e469ad030
macVST: prevent endless recursive scans 2024-09-06 20:00:36 +02:00
267cddfb05
Fix stuck insensitive macOS main menu
Popup Dialog Windows never unset the modal flag.
e.g. Session > Save Snapshot & switch.

Furthermore a 2nd dialog was able to get the menu stuck
forever (e.g. Snapshot & Switch .. -> Replace existing?
2024-09-05 18:27:44 +02:00
3acc8c76ca
Handle Filechooser Location entry
In order for the Filechooser Location widget to work two
things need to be setup, which only the FileChooserDialog
does:
 * subscribe to Widget's "response-requested" signal
 * call should_respond () hook from top-level window's
   default handler.

The Location Entry emits "activates-default". In case of
the Dialog, that calls the dialogs response callback,
which then calls ` _gtk_file_chooser_embed_should_respond`.

That handles changes made by the user to the location entry.

-=-

Gtk::FileChooserWidget does not handle this, "response-requested"
signal is not exposed, nor is _gtk_file_chooser_embed_should_respond
available outside Gtk.

This change at least selects the file in the treeview, which
allows further handling, without interfering with FileChooserDialog's
behavior.
2024-09-04 22:29:24 +02:00
8fea1ea42e
Update hidapi 2024-09-03 20:56:05 +02:00
e4d9344d2a
Revert PinMapping Changes
This reverts
 * e48d97ed69
 * 98c906b733
 * 0cf73d459b

because the C++ API std::map:at can throw and exception
was not implemented (and also deemed excessive for the
case at hand). Also an explicit API for *p*plugin_pin
mapping is preferable and facilitates debugging.
2024-09-03 13:25:48 +02:00
Matthijs Kooijman
a9a5787399
osc: Fix send and plugin page size in /set_surface
When handling the `/set_surface` command, the code would set
plug_page_size to the new value first, and call `sel_plug_pagesize()`
later. The latter then sees the page size is already the same, so it
leaves it unchanged and also does not send the page size to the
OSCSelectObserver object. In practice, this means that only the default
plugin page size from the preferences or set with
`/set_surface/plugin_page_size` take effect and values set with
`/set_surface` are ignored.

Exactly the same thing happens for the send page size.

This code has been like this since it was first introduced in comit
9c0f6ea948 (OSC: Allow set_surface to set send and plugin page sizes.,
2017-06-13)

This commit fixes this by omitting the first assignment.
2024-09-03 00:40:11 +02:00
Matthijs Kooijman
142fa9f55d
osc: Let OSCSelectObserver know about feedback config changes
Before this commit, OSCSelectObserver would read the feedback value when
it was created, but then never update it anymore. In practice, the
OSCSelectObserver is created on startup, and when the surface connects
and configures feeback, this value is not applied.

For example, when sending `/set_surface` with a feedback value of
4 (Send SSID as path extension), `/strip/*` would get their ssid put
into the path, but `/select/plugin/*` messages would not have their
parameter id in the path. When setting the corresponding checkbox in the
default feedback preferences, it is applied as expected.

This commit passes the new feedback value to the OSCSelectObserver
instance whenever it changes, which ensures the value is applied as
expected.
2024-09-03 00:40:11 +02:00
Alejandro Domínguez
867eaa0b13
Remove unused libs/pbd/pbd/stl_functors.h 2024-09-01 19:17:10 +02:00
Alejandro Domínguez
e48d97ed69
Turn PinMappings class into a type alias 2024-09-01 19:10:20 +02:00
da0e6c7d60
Add explicit PBD namespace prefix to Signal
This will simplify search/replace when using
a variadic template for PBD::Signal.
2024-09-01 18:48:54 +02:00
1b343a1fec
Revert "Reduce locate overhead for optimized builds"
This reverts commit 960d72012d.
2024-08-31 23:42:56 +02:00
3391c69ec0
Profile RegionFx processing 2024-08-31 15:19:35 +02:00
960d72012d
Reduce locate overhead for optimized builds 2024-08-31 13:51:21 +02:00
98c906b733
Remove unused function 2024-08-31 05:55:12 +02:00
Alejandro Domínguez
0cf73d459b
Deprecate ARDOUR::PinMappings C++11's std::map::at emulation 2024-08-31 05:49:03 +02:00
Alejandro Domínguez
2263b0280b
Change to C++11-style std::map initialization in ExportHandler::finish_timespan() 2024-08-31 05:49:03 +02:00
6d47758671
Add TailTime Icon 2024-08-31 02:55:04 +02:00
520bbfe515
Add proper API to expose plugin tailtime
This is in preparation to display current tail time,
and allow a user to override it.

This is similar to existing processor latency API.
2024-08-31 02:55:04 +02:00
79fcb3d0ba use new launckkey image file for surface GUI dialog 2024-08-29 18:54:11 -06:00
cac849fe6d add new novation LK4 surface support 2024-08-29 18:31:00 -06:00
22411416ca add new member to a MIDI surface to allow receipt of data before surface is running (for device inquiries) 2024-08-29 18:28:16 -06:00
2d076cccb1
Only enable RegionFX in debug builds for the time being 2024-08-30 02:18:49 +02:00
Alejandro Domínguez
f16ad8053e
Remove #include <boost/enable_shared_from_this.hpp> 2024-08-29 23:08:43 +02:00
Alejandro Domínguez
eb72aae389
Remove #include <boost/smart_ptr.hpp> 2024-08-29 23:08:43 +02:00
Alejandro Domínguez
17275239db
Remove boost-debug 2024-08-29 23:08:42 +02:00
Alejandro Domínguez
c0062fff86
Remove #include <boost/shared_ptr.hpp> 2024-08-29 23:08:42 +02:00
Alejandro Domínguez
3abf0a9058
Remove unneeded #include <boost/math/distributions.hpp> 2024-08-29 23:08:42 +02:00
Alejandro Domínguez
1752f30a66
Remove #include <boost/utility.hpp> 2024-08-29 23:08:42 +02:00
Alejandro Domínguez
843e776ca8
Remove #include <boost/dynamic_bitset.hpp> 2024-08-29 23:08:42 +02:00
Alejandro Domínguez
da2935c285
Remove #include <boost/algorithm/string/trim.hpp> 2024-08-29 23:08:42 +02:00
Alejandro Domínguez
7586c2d50a
Remove #include <boost/algorithm/string/erase.hpp> 2024-08-29 23:08:42 +02:00
Alejandro Domínguez
7c39a374fa
Narrow scope of boost::hash_combine include 2024-08-29 23:08:41 +02:00
Alejandro Domínguez
dba8f4ec40
Remove #include <boost/rational.hpp> 2024-08-29 23:08:41 +02:00
Alejandro Domínguez
635446fd3b
Remove #include <boost/static_assert.hpp> 2024-08-29 23:08:41 +02:00
Alejandro Domínguez
eff42b22fd
Remove #include <boost/utility.hpp> 2024-08-29 23:08:41 +02:00
Alejandro Domínguez
a18c1c5750
Remove #include <boost/shared_ptr.hpp> 2024-08-29 23:08:41 +02:00
f4c978cf88
Fix MIDI patch/CC state restore #9770
MidiTrack::restore_controls is triggered by SessionLoaded
event. Yet MidiControl::actually_set_value checks if
_session.loading() is true and postpones sending actual
events to the synth (which may not be fully loaded).

Before 5d02970de8, Session::post_engine_init unset
"Loading" flag early on, so "loading" was already unset
by the time `SessionLoaded` was emitted.
2024-08-29 04:26:33 +02:00
84a3d0c559
Fix copy/paste, windows (not Linux) VSTs.. 2024-08-28 04:28:26 +02:00
c77d2d42b9
VST3: fix runloop query (amend 83207e04e7)
The plugin itself needs to be able to return a runloop,
for the UI, even if the factory has one.
2024-08-27 21:56:17 +02:00
8fd081679d
Add a debug option to investigate RegionFX related underruns 2024-08-27 17:50:24 +02:00
981dfd67e7 call our "transport stopped" code path when JACK transport stops
this fixes issues with MIDI region recording, which otherwise never
goes through the code path required to "fix" the nascent data into
sources and regions.
2024-08-27 09:44:00 -06:00
83207e04e7
VST3: move static runloop from plugin to Host
This fixes a crash at exit for some Linux VST3s when Ardour
calls ::release_factory() before unloading the module.

The plugin will then also call unref the hostContext. Previously
the lookup interface for the host context was provided by the
plugin; which at that point in time was already deleted.
2024-08-27 02:04:21 +02:00
3ced8cc6bc
RegionFX: fix undo/redo of region state
Previously this caused deadlocks (read lock while holding
write lock), and also not dropped references of plugins.

Ideally undo/redo of FX unrelated region state
will not re-instantiate plugins; we can optimize this later.
2024-08-27 01:09:06 +02:00
eac3283b49
Use a sensible size for DSP to GUI MIDI messages
See also a1ba561cc5. JACK2 and pipewire unconditionally
report 32kB, Ardour internal backends report 8kB, also
independent of the buffersize.
While jack1 by default announces the audio buffersize.

A sensible value assumes that the GUI reads the FIFO at
a least 25fps, while also allowing MIDI ports to merge
data (hence 2 * raw_buffer_size). Yet limit to 64k per track.
2024-08-25 00:09:36 +02:00
c92c8c8fa2
VST3: fix deadlock when recalling program changes latency
The GUI thread may call set_program() which can triggers
the plugin directly calling restartComponent from the same
thread.
2024-08-24 11:26:49 +02:00
66b3ad79c1
RegionFx: mark session dirty when adding/removing plugins 2024-08-24 00:23:24 +02:00
e419b314a2
RegionFx: handle missing plugin, retain state
Since RegionFx are significantly simpler compared
to processors, missing plugin state can directly be handled
in the implantation without creating a subclass similar to
UnknownProcessor.
2024-08-23 15:42:33 +02:00
b6e187193d
RegionFx: abstract Plugin tail API 2024-08-23 15:26:50 +02:00
a1ba561cc5
Improve reliability of MIDI event rec-box
Previously there was a race condition. DiskWriter::run()
cleared the gui_feed_buffer before writing new events.
If the GUI thread had not yet picked up the events by then
they were not displayed. Furthermore due to the try-lock,
some events may have been written to the buffer in the first
place.

This fixes missing events (notably stuck notes) in the red
record box while recording MIDI.
2024-08-22 18:34:37 +02:00
9465ff16cb
Fix Route Fader (and mute) latency offset #9780
_output latency was not used for those. Processor automation
was not affected.

This also fixes the visual offset of automation vs buttons/slider
when the transport is not running.
2024-08-21 18:54:16 +02:00
908a402a75
Drop some shared pointer references after RCU writes
When removing instances from some RCU managed list or vector,
they can still live on as shared_ptr references on the
RCU's dead wood stack.

In many cases this is not an issue, in these cases it's prudent.

see also 44610c7877
2024-08-21 03:57:08 +02:00
4d1d938263
I/O Plugin: delete plugin after removing it
Previously this kept a shared pointer reference to the
plugin around, and ports remained registered.

See also 44610c7877 (RCU update)
2024-08-21 03:57:05 +02:00
1b07ad731e
RegionFX: use actual plugin tail 2024-08-20 18:58:45 +02:00
09a3c325ec
RegionFx: don't crash if plugin is missing on session load 2024-08-20 01:45:11 +02:00
6de2d8f5c4 macOS: prevent the Quit main menu item from interferring with modal rules 2024-08-19 15:15:45 -06:00
d455f06f51 fix trailing whitespace 2024-08-19 15:15:45 -06:00
9e9164f0d0 remove unnecessary header include 2024-08-19 15:15:45 -06:00
51d95c189f use NSMenuValidation informal protocol to desensitize app menu items 2024-08-19 15:15:45 -06:00
ce6a2d73d8 use new GDK modal notification to (try to) desensitize global app menu items 2024-08-19 15:15:45 -06:00
b544ac832c move gdk global for modal notification to be with other gdk globals 2024-08-19 15:15:45 -06:00
0901b239c1 fix spelling error 2024-08-19 15:15:45 -06:00
4ad332ae50 fix initial commit 2024-08-19 15:15:45 -06:00
221fd82d59 initial infrastructure for handling modal dialogs on macOS 2024-08-19 15:15:45 -06:00
79ff99ba15
RegionFX: replay control automation (1/2)
This riffs off the previous commit, a simple way to replay
ctrl events without re-evaluating plugin automation line.

There may be a better way to handle this (e.g. replicate the
plugin for display only, evaluate on the fly in the UI thread)

Short of redesigning our disk-reader/playlist/region infrastructure
this is likely a sucks-least compromise for the time being.
2024-08-19 22:46:37 +02:00
4ff1de4c75
RegionFX: save and replay Plugin Parameter Outputs
This is somewhat experimental, and only works for plugins
that have DSP/UI separation and use [float] control ports
to pass information to the UI.
2024-08-19 22:40:58 +02:00
fdf5b0f8a1
Fix export with RegionFX
Effect processing requires session event pool, and
thread local disk reader working buffers.
2024-08-19 02:57:15 +02:00
c16e31012b
RegionFX: include plugin tail with pre-fade Fx 2024-08-18 00:54:36 +02:00
4bcf1d31c6
RegionFX: implement pre/post region-fade FX 2024-08-18 00:54:29 +02:00
8f5d6295b3
RegionFX: fix plugin cycle times 2024-08-18 00:54:09 +02:00
d8725ff3c8
RegionFX: fix crash when custom GUI thread sends change requests
This can happen with VST2s (e.g gvst) and some JUCE based plugins.
Previously that lead to a "programming error: no per-thread pool"
when the DR queues a overwrite buffer session-event.
2024-08-17 16:54:53 +02:00
76ee3339ac
RegionFX: fix variable I/O channel map 2024-08-17 16:47:53 +02:00
74a909e299
RegionFx: allow touch (for "show on touch") 2024-08-17 16:47:45 +02:00
d9752bb2c5
RegionFX: fix replicated channels 2024-08-17 16:47:38 +02:00
a2a9ceab92
RegionFX: actually activate plugin on load 2024-08-17 16:47:33 +02:00
15c7603fdd
Add API to query plugin tail duration
So far only VST3 plugins have an actual implementation.
2024-08-17 16:47:30 +02:00
b4fca7bc1c
Refactor API to allow VST2 plugins to callback to I/O and RegionFx 2024-08-17 16:47:26 +02:00
8c4819e588
AU: request offline processing 2024-08-17 16:47:21 +02:00
35cb60c2dc remove "auto-discover" buttom from Mackie GUI
It could never do anything useful anyway, and deadlocked due to bad
lock usage
2024-08-16 13:12:24 -06:00
d4b71a7777
VST3: correctly set offline processing 2024-08-15 15:03:42 +02:00
8a8ae7069e
Fix edge-case pre-roll required for looping
This is mainly for the benefit of Mixbus, where input_latency
is not propagated upwards from the master bus (no direct
connection).

In Ardour's case _worst_input_latency >= _worst_route_latency
unless a given track with latent plugin is not connected.

Previously looping became out of sync (normal playback was not
affected) when a track had a latent plugin.
2024-08-14 21:50:58 +02:00
3bdf378df3
Add some additional Lua bindings 2024-08-12 21:36:55 +02:00
58120f75d5
Add API to check if backend was used previously
This is backported from LiveTrax, yet potentially handy
for future auto-connect policy in Ardour as well.
2024-08-12 21:26:42 +02:00
84506a041c
Move Mute automation with region(s) #9762
Mute and Panner are the only automatable Route owned controls
(that are not managed by a processor). So they need special
casing to be moved when moving a region.
2024-08-09 16:03:39 +02:00
15912fea77
Remove outdated monitor-modes PDF, refer to the manual 2024-08-07 01:16:57 +02:00
b121ee157e
Update Auto-Input meter policy
This replaces rule #17, 27, 43 and 59 on
https://manual.ardour.org/appendix/monitor-modes/

"Meter (What you see)" changes to 'Disk (Audio)'
aka "what you hear" in those cases.

This way "what you see" is always "what you hear".
Monitoring inputs is more conveniently done using
the Recorder Page.
2024-08-07 01:15:50 +02:00
76b25163bd
Fix YTK filemanager recently-used (Windows, macOS)
g_get_user_data_dir() folder does not exist on macOS
compare to gtkfilechoosersettings.c which creates
g_get_user_config_dir().
2024-08-06 20:51:56 +02:00
558e32e639
VST3: handle offline FX processing callbacks
This fixes potential deadlocks, when not using rt
process threads.
2024-08-06 20:51:55 +02:00
3f1486fa12 coreselection: fix thinko
The core selection can be (a) stripables (b) automation controls (c) possibly a combination of both

Any given selection op might pass (a) or (b) or (c), so we need to handle the
case where (a) is null.
2024-08-05 20:14:28 -06:00
c2bf45a033
Fix triggerbox cues when looping
This correctly handles the case when a cue marker is at the
same position as loop-end. Previously the cue was triggered
even though transport looped
2024-08-03 20:21:53 +02:00
dc5753118c
Fix LTC TC master for incoming 30fps LTC
By default timecode.rate = 30. When 30fps LTC is received,
::detect_ltc_fps() never returned true (FPS changed), and
the TransportMaster never entered "locked" stage.
2024-08-02 23:29:13 +02:00
b21dd1212e redesign API and internals of CoreSelection for more universality
We now have two basic methods for CoreSelection

* when selecting a stripable, use ::select_stripable_and_maybe_group() with
  appropriate arguments to cover the group selection aspects.

* when selecting an automation control that is part of a stripable, call
  ::select_stripable_with_control()

The old, more simply named methods (set/add/toggle etc.) have all been
made private, and their internal implementations changed somewhat.

This commit includes changes to control surfaces that use CoreSelection directly.
2024-08-02 11:50:21 -06:00
af5c99dd05 move definition of selection operations in to ARDOUR namespace
This is a rare commit that I think should be done for GUI and libs at the same time
2024-08-02 11:50:21 -06:00
5d02970de8
Clarify new session dirty state
New unnamed sessions need to remain dirty so that the GUI
asks to save or delete the session.
2024-08-01 23:26:57 +02:00
03971be30d tweak MMC behavior: ffwd should start rolling immediately; but disallow ffwd during active recording 2024-08-01 12:34:58 -05:00
ff9a55df97 add a preference for MMC FastWind which allows skipping to markers 2024-08-01 12:34:58 -05:00
a76b2ed1bb
Rename JACK to "JACK/Pipewire" on Linux (1/2) 2024-07-31 04:38:01 +02:00
83984a7884 emit a new signal when a ProcessorElement is added to the selection inside a DnDVBox<ProcessorEntry> 2024-07-29 10:19:52 -06:00
ad1377abb5 add a new class-static signal for ControlProtocol modules to know when a plugin has been selected 2024-07-29 10:19:52 -06:00
f3e35cc145 name RF64 files with .wav suffix
In livetrax, where RF64 is one of two file formats, people frequently end up
with files named .rf64 that are actually .wav due to the libsndfile
header file downgrade. We want to avoid this, and this seems like
a more common case than people generating actual RF64 files that
(now) will be named .wav
2024-07-29 10:19:52 -06:00
4de0189dc4 add rf64 file suffix to list of safe file extensions for audio 2024-07-29 10:19:52 -06:00
941bc3a4f2 NO-OP: braces, please! 2024-07-29 10:19:52 -06:00
4b75ed249e
Unregister ports directly after RCU update
see also 2e23ec4422. This fixes a bug where some ports
remain in used (shared_ptr<Port>) by the RCUManager, even
after the port is removed from the port_map.

This can lead to issues when the port is re-registered later.
2024-07-27 22:25:09 +02:00
Mads Kiilerich
4f2b96dca8 faderport8: Better debug trace when not probing the midi ports
This would have helped former me when trying to use FaderPort with
PulseAudio backend.
2024-07-25 13:50:54 +02:00
Mads Kiilerich
8633e82891 commandline: Allow -D to be specified multiple times
Yes, -D takes a comma separated list, but it is still confusing and
unnecessary that the first -D options were silently ignored.
2024-07-25 13:48:38 +02:00
46715fec66 locations: extend API for first_mark_{before,after}_flagged to allow returning the found location
Also use newer C++ loop syntax for syntactic sugariness
2024-07-24 19:00:55 -06:00
06962c7728
Yet another runtime free() API fix
See also 8c583f8e20
2024-07-24 19:23:50 +02:00
12e1a6f73d
Fix runtime error free()ing LV2 event buffers 2024-07-24 17:47:54 +02:00
3f8d0ddc3d faderport: fix SNAFU caused by switching to Mixbus-style use of user button
User stopped being a modifier but was still being treated as one.
2024-07-23 18:21:43 -06:00
Mads Kiilerich
213812c31c
region: Drop superfluous setting of _type in Region constructor 2024-07-24 01:50:11 +02:00
Mads Kiilerich
ea242254d3
warnings: Remove redundant move in return statement
GCC 14 educates us:

	../libs/ardour/session.cc: In member function ‘std::vector<std::__cxx11::basic_string<char> > ARDOUR::Session::source_search_path(ARDOUR::DataType) const’:
	../libs/ardour/session.cc:6969:25: warning: redundant move in return statement [-Wredundant-move]
	 6969 |         return std::move(sp);
				|                ~~~~~~~~~^~~~
	../libs/ardour/session.cc:6969:25: note: remove ‘std::move’ call
2024-07-24 01:50:11 +02:00
Mads Kiilerich
0352ff8c5e
warnings: Remove redundant/illegal/undefined-behaviour template-id for constructor
GCC 14 educates us:

	In file included from ../libs/ardour/ardour/io.h:44,
									 from ../libs/ardour/ardour/route.h:50,
									 from ../libs/ardour/ardour/session.h:92,
									 from ../libs/ctrl-interface/midi_surface/midi_surface.cc:30:
	../libs/ardour/ardour/port_set.h:92:37: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
		 92 |                 iterator_base<PS,P>(PS& list, DataType type, size_t index)
				|                                     ^~
	../libs/ardour/ardour/port_set.h:92:37: note: remove the ‘< >’
2024-07-24 01:50:11 +02:00
50e5e3bd8f
Consistently ignore punch-in/out without punch-range 2024-07-23 18:56:26 +02:00
Mads Kiilerich
74edf63d01
format: Apply some work-arounds for code that would confuse clang-format 2024-07-23 17:04:14 +02:00
Mads Kiilerich
f063bfef03
format: Improve header robustness against #include reordering 2024-07-23 17:03:56 +02:00
Mads Kiilerich
81ca475b10
format: Protect the special session_configuration_vars.h and its use of CONFIG_VARIABLE 2024-07-23 17:03:56 +02:00
9b6039c170
Remove debug message, improve comment 2024-07-23 16:56:25 +02:00
181ba4db54 ytk: do not show filter combo box in filechooser if there is only 1 filter 2024-07-22 15:36:45 -06:00
bb8f6a3d66
Remove debug output 2024-07-22 20:28:45 +02:00
7567884111
Fix LV2 Atom sequence alignment #9750 2024-07-20 21:42:18 +02:00
8c583f8e20
Use 64bit alignment for LV2 event buffer #9748 2024-07-20 17:37:47 +02:00
cb5b955a74
Use C++ for LV2 event buffer
This will allow to throw fatal exceptions when malloc fails.
2024-07-20 17:37:09 +02:00
2cdfdc9212 Prevent minimizing Dialog Windows on macOS
This works around an issue with some embedded plugin windows not being
properly restored when the window is restored after being minimized. It
also prevents zooming (full-screen) display of dialog windows.

Also recent macOS allows to maximize Windows even if they are not
supposed to be resizable (also causing issues with some plugins).
2024-07-18 17:57:52 +02:00
7c311761c2 Update Russian translation 2024-07-17 22:15:20 +02:00
e175410f54 midi surfaces fixes (partially for PR #898)
1. do more to ensure that we do not call MidiSurface::begin_using_device()
multiple times without ::stop_using_device() in between. This reduces the risk
of duplicate signal handler connections being made (it might even eliminate it).

2. Notify all control surfaces when MIDI connectivity is established AND
disestablished. This gives them a chance to update their notion of their
current connection state. This can be important with JACK across zombification,
but also likely across backend stop&start.

These changes currntly only impact classes derived from MidiSurface but
something equivalent is required for all control surfaces
2024-07-16 11:12:41 -06:00
f8f6c89136 fix a likely logic error in GtkMenu handling of enter events
On macOS popping up a menu with a position function that leads the menu to be
under the mouse pointer generates the same initial set of enter events as on
linux, but this is then followed  by some leave events and then a repeat of the
same set of enter events.

this exposes what appears to be a logic error in gtk_menu_enter_notify().

Nonlinear enter events (i.e. where the menu pops up under the mouse, so the
mouse was never actually moved into the menu's window) should not cause a reset
of priv->seen_item_enter. This value, when true, is used to force the next
received button release event to be handle as an menu activation event. This
should only happen when the mouse has actually been moved by the user into the
menu (as already indicated in existing comments). The value has this effect by,
on the next enter event for a menu item, if already set, forcing
menu->activate_time to zero, which in turn will cause menu activation on button
up/release.

This bug doesn't appear on Linux (or Windows) because the event sequence
associated with a menu popup is different. The lack of another set of enter
events means that menu->activate_time is never reset, and so the behavior is as
expected.

This change makes the setting of priv->seen_item_enter be idempotent with
respect to non-linear enter events, which I believe is the intended behavior.
2024-07-15 11:09:59 -06:00
b50477e608
Exclude monitor gain from mixer scenes 2024-07-15 00:43:51 +02:00
5401f2c3eb ifdef out modified-with check (intended for livetrax) 2024-07-11 19:10:14 -06:00
eeccb813bb remove unused local variable 2024-07-11 19:10:14 -06:00
54f810f90e throw WrongProgram exception if session was modified with incompatible app 2024-07-11 19:10:14 -06:00
4212e23e77 make "modified-with" a session member 2024-07-11 19:10:13 -06:00
5a647cd84a Fix guard point logic for editor_add_ordered API.
Previously the code was too simple and potentially added points out of
order, leading to automation jumping back in time.
2024-07-12 00:45:37 +02:00
Edgar Aichinger
0f654ebde4
update german translation 2024-07-11 23:04:34 +02:00
fa6fbbf810
Fix ctrl surface shutdown sequence
Tear down GUI before stopping event loop, this fixes
a crash on windows (and perhaps a rare crash on other OS).
2024-07-11 19:19:21 +02:00
676b372ac5
FP8: tear down GUI before terminating event loop
This fixes an issue on Windows, where UI::run can dispatch
a signal that ends up via cross-thread channel at the surfaces'
BaseUI::request_handler. causing a segfault.
2024-07-11 18:10:39 +02:00
c3d90f415c
Fix fader/trim automation after locate
First see 31c6f66d9b and 5cb6e1046b.

It worked previously due to `AutomationControl::get_value`
evaluating automation, which was removed in 5cb6e1046b
in favor of properly using latency compensated evaluation.

However due to 31c6f66d9b, fader and trim automation were
never evaluated on locate, only during playback via
`Amp::setup_gain_automation`.

This fixes a case where gain is incorrect after a locate.
The amp still has the gain from before the locate, and when starting
playback ramps to the new gain.
2024-07-10 19:26:02 +02:00
ab0d2dce6f
Fix reduced channelcount when restarting engine with different device
1. Start engine with a stereo soundcard (n_inputs was set to 2)
2. Restart engine with multi-channel soundcard, n_inputs remained a 2)
2024-07-10 15:39:01 +02:00
d6b14e761b
Remove unused backend channel count config API 2024-07-10 15:39:01 +02:00
249442fe99 JACK backend: fix race condition caused by not wrapping jack_set_property() in JACK_SERVER_CALL 2024-07-09 10:14:39 -06:00
630587ee3f
VST2: amend prev commit, ignore SysEx and invalid MIDI events 2024-06-30 23:07:29 +02:00
Attila M. Magyar
e1ef129ab0 VST2: store VstMidiEvents with the correct size
...otherwise MidiBuffer::push_back() will drop them. (E.g.
MIDI_CMD_CHANNEL_PRESSURE events are just 2 bytes, not 3.)
2024-06-30 22:47:38 +02:00
Attila M. Magyar
5360ba0000 VST3: store kAfterTouch events with the correct size
...otherwise MidiBuffer::push_back() will drop them.
2024-06-30 13:11:53 +02:00
41b6c8a5bf fix previous commit (typo) 2024-06-27 16:51:16 -06:00
8efab1c796 fix handling of MIDI controller MSB & LSB values
The MIDI specification makes it quite clear that when a receiver
receives the MSB of a 14 bit controller value, it should consider
the LSB reset to zero. This has been an error in Ardour for many,
many years, though likely of little consequence
2024-06-27 16:42:00 -06:00
da520cecf3
Yet another attempt at gcc-14 lstat/realpath (#9703 PR #893)
See also 4b8b5acfc4 and realpath(3)

```
realpath():
   _XOPEN_SOURCE >= 500
       || /* Glibc since 2.19: */ _DEFAULT_SOURCE
       || /* Glibc versions <= 2.19: */ _BSD_SOURCE
```
2024-06-27 17:01:46 +02:00
2e23ec4422
Use RCU to for IO::_ports (#9730) 1/2
This removes the _io_lock in favor of a RCU.
The reason for this change is to ensure data structure
consistency, notably iterators. Previously adding/removing
ports invalidated iterators, which caused [rare] crashes,
since IO::ports() simply returned a PortSet reference.

(This breaks API)
2024-06-24 22:19:22 +02:00
c94ca79798 provide access to the trace parser (if any) for a MidiPort 2024-06-21 20:31:29 -06:00
bbcaf617c4 async MIDI ports run output trace parser scanner if there is one 2024-06-21 15:46:59 -06:00
af9472ecb6 fix naming of MIDI scene changes
Or at least make the arithmetic precedence clearer
2024-06-21 15:46:59 -06:00
d7f9b659f2 slightly improve mgmt of shared_ptr<MIDISceneChange> 2024-06-21 15:46:59 -06:00
f54fd286ee MIDI scene changes should use bank 0 if no bank msg has been seen 2024-06-21 15:46:59 -06:00
10cd3c85cd when delivering a MIDI scene change, ensure trace parser sees the data 2024-06-21 15:46:59 -06:00
a0da78d8c5
VST3: do not expose hidden parameters as automatable 2024-06-20 16:32:53 +02:00
3efe7ff056
Special case DPF VST3 MIDI CC Ports (similar to JUCE) 2024-06-20 16:32:31 +02:00
d2fdd72bc4
Constrain gain-control range (notably trim) 2024-06-20 01:01:11 +02:00
e15c337f57
Fix crash (invalid Track Drag) when starting automation value edit
When double-clicking to edit a fader value three button press
events are created:
1. GDK_BUTTON_PRESS
2. GDK_BUTTON_PRESS
3. GDK_2BUTTON_PRESS

The first two start an Editor Drag, which later crashes in
Editor::mid_track_drag() gtk2_ardour/editor.cc:7067
2024-06-17 19:55:08 +02:00
1e5a5b6b4f do not have MIDI input follow selection when recording 2024-06-15 14:01:36 -06:00
0847dc8a37 when disconnecting a MIDI port for follows-selection, get ALL connections
without the 3rd argument, we only get information about ports that we own.
2024-06-14 22:17:41 -06:00