13
0
Commit Graph

20612 Commits

Author SHA1 Message Date
771cc4581e
LuaProc: use effective sample-rate, like other plugin instances 2023-07-03 00:31:21 +02:00
a36ddb72dd
Correctly set sample-rate of plugins when loading a different session
Directly loading a new session (Session > Recent) stops the engine
when the sample-rate mismatches. All is fine.

When closing a session (Session > Close), the engine is kept running.
Loading a different session with different sample-rate shows
the "SR mismatch" dialog. Reconfiguring the engine then does not call
`Session::immediately_post_engine` again.
2023-07-03 00:13:20 +02:00
3be6ae57ba gtkmm2ext: provide an additional ink extents method to get descender 2023-07-01 21:07:25 -06:00
d899441df1
ALSA: disambiguate multiple soundcards with the same name 2023-07-02 00:17:58 +02:00
20e1b6b287 temporal: add API to clear tempos in various ways 2023-06-30 15:50:25 -06:00
a8c2585cdc remove AudioEngine::destroy() calls from various test/util code
ARDOUR::cleanup() does this, and the engine must exist during port deregistration.
2023-06-30 12:58:43 -06:00
3307dcfcb2 temporal: reference time for BBT_Argument is always superclocks 2023-06-30 12:10:50 -06:00
16c9d91641 temporal: remove impossible get_tempo_and_meter (..., bbt, ...) method 2023-06-30 12:10:50 -06:00
a591fb64a3 temporal: rework ::get_grid() to avoid get_tempo_and_meter (..., bbt, ...) 2023-06-30 12:10:50 -06:00
3513debba8 temporal: NO-OP (tiny variable rename) 2023-06-30 12:10:50 -06:00
d94382f8a3 another autofication 2023-06-30 12:10:50 -06:00
d0fe0993a7
LV2: allow to split cycles w/MIDI
See also 64e2f16e06
2023-06-30 17:46:05 +02:00
be3d3a6d00
LuaProc: allow plugin to prefer a regular block length
This equivalent to http://lv2plug.in/ns/ext/buf-size#coarseBlockLength
2023-06-30 17:21:49 +02:00
45b2791341
MidiStateTracker micro-optimization
This replaces 128 multiplications in each inner loop with
a single bit-shift.
2023-06-30 17:12:16 +02:00
b51cf0ed95
Plugin: fix additive note resolution
When stopping transport in the middle of a note, each plugin
will resolve the note, resulting in multiple duplicate note-off
events.
2023-06-30 17:12:16 +02:00
71d45286f4
LuaProc: sort MIDI events
This allows plugins to produce an unsorted list of events.
see also https://discourse.ardour.org/t/lua-arpeggiator-plugin-anyone/108862/64?u=x42
2023-06-30 17:12:16 +02:00
c5511040ec
MidiBuffer: allow for partial processing with offset
AudioBuffer::read_from() only replaces data within the given
range (offset .. n_samples + offset) leaving the rest of the
buffer untouched.

With in-place processing, where the same MIDI buffer is used
for input and output, each sub-cycle must only clear the
processed range, while leaving the rest of the buffer
untouched.
2023-06-30 17:12:16 +02:00
64e2f16e06
LV2: apply offset to MIDI events 2023-06-30 17:12:16 +02:00
8558b1f99e
AudioUnit: apply offset to MIDI events 2023-06-30 17:12:16 +02:00
c352347eaa
LuaProc: offset MIDI events when splitting cycles 2023-06-30 17:12:16 +02:00
9242e615ce
Plugin: track only events for current cycle 2023-06-30 17:12:15 +02:00
e6bed9330f
CoreMIDI: fix capture/playback alignment
MIDI playback used samples instead of usec.
MIDI capture used time-stamp from previous cycle.
buffer-size changes were not applied to MIDI port latency
2023-06-29 00:32:46 +02:00
bef4596dd1
NO-OP: whitespace 2023-06-29 00:32:46 +02:00
651dcbc96e
CoreAudio: Remove unused API 2023-06-29 00:32:46 +02:00
9a010404d1
CoreMIDI: Remove unused API 2023-06-29 00:32:43 +02:00
ee0693d121
Properly clear preset-list (compare to invalidate_preset_cache) 2023-06-28 19:16:16 +02:00
fc08771651
LuaProc: implement factory presets 2023-06-28 19:10:34 +02:00
b5c9c6a5c4 fix displayed name for velocity automation 2023-06-26 14:18:18 -06:00
91500795d8 canvas: extend PolyItem API with ::add_point() 2023-06-26 14:18:18 -06:00
8a204bcf51 lollis: draw stems in fill color (optionally) 2023-06-26 14:18:18 -06:00
a6c1a3d9d0 lollis: potentially clip circle with a bounding parent 2023-06-26 14:18:18 -06:00
96c9f2ee19 canvas: add velocity() method to Note 2023-06-26 14:18:18 -06:00
279e648a43 canvas: ArdourCanvas::Lollipop to not (mis)use _position 2023-06-26 14:18:18 -06:00
0a530d3c18 manual fixes following rebase on master 2023-06-26 14:18:17 -06:00
a7af6fc6f8 lollipops: just directly set _position member 2023-06-26 14:18:17 -06:00
1ad0894618 lollipops should render child items (currently none) 2023-06-26 14:18:17 -06:00
51e7584dee another use of auto iterators 2023-06-26 14:18:17 -06:00
cfbe6b6048 another use of auto iterators 2023-06-26 14:18:17 -06:00
f7e97be115 canvas lollipops: object redesign and reimplementation 2023-06-26 14:18:17 -06:00
0f611b4efa C++ auto iteration FTW 2023-06-26 14:18:17 -06:00
7e4a3dce01 lollipop pixel pushing 2023-06-26 14:18:17 -06:00
4bafadc419 steps to an ecology of lollipops 2023-06-26 14:18:17 -06:00
0b050c47e4 build lollipops.cc 2023-06-26 14:18:17 -06:00
187569dcbc new Lollipop canvas item 2023-06-26 14:18:17 -06:00
18275922d3 return interpolation type for velocity 2023-06-26 14:18:17 -06:00
1c1d73e47d describe velocity parameter and implement velocity control 2023-06-26 14:18:17 -06:00
1d117aa372 give MIDI tracks a (n automatable) velocity control 2023-06-26 14:18:17 -06:00
25f5b275f4
Auto-connect metronome when using a device the first time 2023-06-26 21:46:24 +02:00
124c57a850
Add missing Lua bindings 2023-06-23 01:35:19 +02:00
ddb9484994
Safeguard against using RegionExport for default export
It is unclear how an existing ExportChannelConfiguration copy
can be reused in a different context, but apparently it can happen:
https://discourse.ardour.org/t/ardour-exports-flatline-wav-file-no-playhead-movement-through-file/108803/25
2023-06-22 23:34:15 +02:00
19c44fe814
Fix restoring metronome connections (duplicate IO set_state)
When a session is loaded, click_io->set_state is called twice.
setup_click() is called when the engine re/starts, and
possibly again from Session::set_state.

During session construction, Port connections are not directly
made. Port::set_state just creates a list, which is later
applied by Port::reconnect from Session::hookup_io.

However, the second call to IO::set_state() calls IO::ensure_ports
again. Since the port already exists, this calls
Port::disconnect_all (while holding the process lock).

Even though the port is not connected at this point in time,
this triggers a ARDOUR::PortManager::connect_callback which
is emitted from the Audioengine when the process-lock is released.

While IO::set_state() continues to set Port::state, and fill
the Port::_[ext_]connections lists, this data is invalidated
moments later when the engine resumes and ::connect_callback
calls ARDOUR::Port::port_connected_or_disconnected.

The solution is to simply not call Port::disconnect_all
if the connection is not yet made (Session::InitialConnecting)
2023-06-22 13:28:18 +02:00
6261bb3a40
Add dedicated RouteProcessorChange for manual pin config 2023-06-22 04:47:35 +02:00
ac801e8455
Improve port-connect error messages 2023-06-22 02:47:30 +02:00
a10e3edb53
Remove unused backend API 2023-06-21 23:59:49 +02:00
341cd455d8
CoreAudio: unconditionally apply device latency 2023-06-21 23:54:55 +02:00
877a2f3611
LuaProc: remove ill-defined bar time variable 2023-06-20 22:26:09 +02:00
fd749173cf
Fix use-after free when deleting locations 2023-06-20 18:19:33 +02:00
cd4fff863a
Dummy backend: add realtime option
On windows this is still limited by the timer resolution, but
it's a start. This is mainly intended to be used with NDI or
other external sources without actual audio hardware.
2023-06-20 01:36:44 +02:00
0dc1c3f008
LuaProc: refine time API
See https://discourse.ardour.org/t/lua-arpeggiator-plugin-anyone/108862/8
2023-06-19 22:07:53 +02:00
8c513ceca7
LuaProc: expose sample-position of last beat 2023-06-19 05:12:47 +02:00
ebcaffd19f
VST3, Lua: fix barPositionMusic
"last bar start position, in quarter notes", starts at zero
to match projectTimeMusic.
2023-06-18 23:00:42 +02:00
34789ff22f
LuaProc: add option to set time information 2023-06-18 22:39:45 +02:00
bb12ac8ec8
Add Lua bindings for pre-roll/count-in recording 2023-06-18 02:41:49 +02:00
00b2f5696c
PortAudio: implement MIDI device config 2023-06-18 02:35:03 +02:00
2d5ac04ae1
pthread_setname_np is available with GNU/mingw 2023-06-17 23:49:47 +02:00
9b797dc4c1
PortAudio: fix latency reporting, disable custom MIDI cfg
This correctly sets audio port I/O latency using the
portaudio API.

Per MIDI device port settings are not completely implemented.
En/disabling MIDI devices or setting custom MIDI port latency
is not functional as-is.
2023-06-17 05:49:11 +02:00
639696c1a8
ALSA: fix adding n_period playback latency
Use playback port, not capture port.
2023-06-17 00:53:22 +02:00
7b1da19581
Sort events when merging MIDI regions (#9313)
Sequence<Time>::append() expects events to be sorted.

Previously this only worked for non-overlapping region,
or if all events in the later region(s) are after than the
last even in any earlier region.
2023-06-16 21:31:07 +02:00
7dc9bf157b fix measure line drawing (convert to window coords for intersection check) 2023-06-16 09:16:53 -06:00
248e37ac0c canvas LineSet: fix rendering to get coordinates precisely correct 2023-06-15 20:10:32 -06:00
a2975bb4b7
Fix opaque MIDI region rendering
This issue was introduced in e79d8b00f9.
2023-06-14 19:42:00 +02:00
7aad0bbe15
CoreMIDI: use dedicated packet buffer on stack 2023-06-13 16:50:53 +02:00
bb97ade440 temporal: special case editing of the initial tempo (#9339) 2023-06-12 16:46:13 -06:00
50232a23a7 temporal: hide superclock_t variant of TempoMap::metric_at()
This fixes several callsites that were passing samplepos_t to get a TempoMetric,
some of them somewhat significant (e.g. VST plugins that want tempo information).

Bad API design on my part, apologies.

This commit combines libs/ and gtk2_ardour because the new private status
of the ::metric_at() call would be a blocking point for git bisect
2023-06-12 12:36:16 -06:00
12c3daa46b JACK: fix reported tempo & meter when functioning as JACK timebase master
TempoMap::metric_at() has a superclock_t variant that was being called
with a samplepos_t value. Full check (and removal, hopefully) coming up.
2023-06-12 12:10:26 -06:00
3a60de5d54
Add track playlist-state function for undo/redo 2023-06-10 15:03:46 +02:00
a3e64445de
Amend bb54bc0d (prevent bad_weak_ptr) 2023-06-10 04:00:46 +02:00
884b4f3046
Playlist cut/copy always produces hidden playlists 2023-06-10 03:33:51 +02:00
f95c9216b1
Fix playlist use-count 2/2
* Use an atomic reference count since the freeze-thread
  can call use_playlist.
* Remove explicit argument to construct unused playlist
  because playlists are unused by default. This also
  lead to use-count becoming negative (or rather UINT32_MAX)
2023-06-10 03:33:51 +02:00
8489810cfb
NO-OP: whitespace 2023-06-10 03:33:51 +02:00
bb54bc0d40
Yet another attempt at fixing #9361 2023-06-10 03:33:51 +02:00
3fbc89e4ee
Remove unused overloaded method 2023-06-10 03:33:51 +02:00
4abdb09c00
Remove unused API 2023-06-10 03:33:50 +02:00
5965fd15e5
Fix tiny memory leak 2023-06-10 03:33:39 +02:00
55afdc2aa4
amend 7c7bf6c88b, do not notify UI during cleanup
This fixes a rare crash where the signal causes a
cxa_pure_virtual in PBD::Signal1 during destruction.
2023-06-09 16:17:40 +02:00
ad49de022a
Too many drop-references handlers (#9363)
This fixes a random crash with stop-and-forget capture.

When aborting capture, the disk-writer can emit
 midi_write_source->drop_references ()
in the butler thread, which leads to a direct call to
Session::remove_source.

This can happen before or after Region::source_deleted
is called which is initiated from the same signal.

Furthermore it was possible that Region::source deleted
was called concurrently from the UI thread via SourceRemoved
for whole file regions, which lead to memory corruption.
2023-06-09 16:17:37 +02:00
03e0eea744
Playlist paste, always pastes on top 2023-06-09 00:48:42 +02:00
c61fc45689
Retain region layering for cut/copy/paste 2023-06-09 00:03:49 +02:00
7c7bf6c88b
Fix TransportMasterManager crash at exit
TransportMasterManager::destroy () destroys any remaining
TransportMasters which in turn unregister their ports.
However the PortEngine was already destroyed.
2023-06-08 22:50:15 +02:00
733d59c65b temporal: unit testing more like unit testing
But still not really.
2023-06-08 14:01:17 -06:00
01b8187cd3 temporal: add rudimentary paste test 2023-06-08 14:01:17 -06:00
1cf4f9293c temporal: paste needs to add to _points 2023-06-08 14:01:17 -06:00
24f6c51de6 temporal: more nuances for ::cut_copy() 2023-06-08 14:01:17 -06:00
a09a37049b temporal: get guard point values before altering the tempo map 2023-06-08 14:01:17 -06:00
6039cea3dc temporal: improve cut buffer slightly by using different meters 2023-06-08 14:01:17 -06:00
d0f5fdb224
Fix deadlock and remove debug message
get_extent() takes a RegionReadLock, but ::partition_internal
already holds a RegionWriteLock (use ::_get_extent)
2023-06-08 21:32:53 +02:00
49aa046824
Cut/Copy Section also needs to operate on unused playlists 2023-06-08 20:42:07 +02:00
61b41fd5d0
A user initiated locate cancels play-range (#9360) 2023-06-08 18:38:25 +02:00
6aa2ad26b5
Clear transport sub-state at RangeStop, disable play-range 2023-06-08 18:06:28 +02:00
cd2d0448a9
Fix Play Range (#9360)
When starting RangePlay while the transport is already rolling
the transport is now stopped (and de-clicked) before locating.

This should not clear the RangeStop event when it is caused
by a RangePlay request.
2023-06-08 16:51:24 +02:00
d761ccb59b temporal: the second variant of shift() (untested) 2023-06-07 11:25:44 -06:00
e6b6340f3e temporal: more nuances for shift() 2023-06-07 11:25:44 -06:00
ad45778edc temporal: shift() with BBT must allow negative motion 2023-06-07 11:25:44 -06:00
a456a10cdf temporal: first guess at a TempoMap::shift() implementation 2023-06-07 11:25:44 -06:00
5e9d98dbf9
Debug Port reconnect 2023-06-07 18:13:27 +02:00
d2365daafe
Remove unused API, prefer Session::possible_states 2023-06-07 17:39:29 +02:00
9d3ae4fc8d temporal: fix position of end guard points during map paste 2023-06-06 09:52:29 -06:00
9e4b1d59a7 temporal: do something when pasting the cut buffer guard points
Don't think this is quite right yet - we get guard points even when
they are not really necessary
2023-06-06 09:04:34 -06:00
6865615af8
Fix recursive lock introduced in fbfeff4168 (#9359) 2023-06-06 15:39:54 +02:00
4529a17617
Implement Section Delete/Insert 2023-06-06 02:42:43 +02:00
f5f87f86d4 temporal: adjust cut buffer API to better deal with start/end "guard points" 2023-06-05 17:27:12 -06:00
7789df5b1c temporal: get cut/copy/paste test code slightly more useful 2023-06-05 16:35:17 -06:00
522c8f9426
Improve port-engine debug messages
try to get to the bottom of "unregister_port: Failed to find port"
errors.
2023-06-05 19:10:10 +02:00
e938d4936f
Further speed up Windows freewheel export 2023-06-05 01:42:24 +02:00
c24b456211
Windows: unconditionally request high timer resolution
Previously timeBeginPeriod() was only called when MIDI
system was set to WinMME. It was also possible that
it was never unset in case starting the engine failed.

This significantly speeds up freewheel export which uses
Glib::usleep(100) when MIDI is disabled.

see also: https://randomascii.wordpress.com/2020/10/04/windows-timer-resolution-the-great-rule-change/
2023-06-05 00:02:54 +02:00
fbfeff4168
Work around finish_capture() race
In rare cases DiskWriter::run() may call finish_capture()
concurrently with the butler thread from transport_stopped_wallclock,
this can lead to memory corruption (CaptureInfo).

Using a Mutex here is not great, but it is not usually contended
and better than crashing at rec-stop.

We should probably change DiskWrWiter::_was_recording into an
atomic bool, and use CAS to prevent concurrent calls.
2023-06-04 22:19:53 +02:00
ad5d355fb5
Fix remove_source assert()
With empty MIDI regions it can happen that the GUI
still retains a reference (rec_regions)
2023-06-04 21:26:41 +02:00
7e567468b2
Fix crash when resetting MIDI tracer
The GUI was able to free memory (MidiTracer::disconnect),
while the tracer is concurrently still in use in rt-context.
This lead to memory corruption in MIDI::Parser::scanner.
2023-06-04 01:15:11 +02:00
dad725688d
Fix various MMC commands, set request-source 2023-06-04 01:15:02 +02:00
8bf8e67545
midiUI thread needs tempo-map (#9358)
This fixes handling MMC commands (locate, record) or
any async MIDI message that uses timepos_t/timecnt_t.
2023-06-03 19:10:36 +02:00
0006f4d8cd
Dummy: add MMC test sequence 2023-06-03 19:10:32 +02:00
c56313cea0
Fix setting pretty-names when engine is restarted
port-meta-data depends on the audioengine backend/device
settings. Those are only available after the engine is started,
not from within the backend's _start() method.

This is is only relevant for callback based backends.

Backends with a blocking process thread explicitly emit
port-manager callbacks there before entering the main loop.
2023-06-02 00:29:03 +02:00
6640a4afb3 fix Faderport2 port name = FP2 2023-06-01 16:20:48 -05:00
c084f74fda
Remove debug message 2023-05-31 18:17:28 +02:00
193b35e885
Ignore Apple/HFS+ ._ meta-data files with statefile suffix.
Those files may otherwise show up in the Recent Session
dialog as possible states to load.
2023-05-31 16:02:39 +02:00
f3ee7fdf88
Fix crash when trying to undo region operations across source deletion
Record, move recorded region(s), delete the recorded source, undo.

Undo would undo the region-move, of a region that no longer
exists and has no source.
2023-05-31 15:46:59 +02:00
f58f5bef55
Remove region from playlist when the source is destroyed
This fixes the following issue:
1. Import a file to a new track
2. Delete the track
3. Editor Source list: select imported file,
   -> Remove the selected source
   -> Yes, remove the Regions and Sources

The Track and Region no longer exist in the Editor,
only the playlist still exists!

The sources to be deleted are found when iterating over whole-file
regions in `EditorSources::remove_selected_sources`. Also
RegionFactory::get_regions_using_source correctly returns
regions, _editor->remove_regions does nothing since there
is no RegionView for the given region(s). This then cashes in

```
libs/ardour/playlist.cc:2400: virtual XMLNode& ARDOUR::Playlist::state(bool) const: Assertion `r->sources ().size () > 0 && r->master_sources ().size () > 0' failed.
```
2023-05-31 15:39:00 +02:00
5a0531df01
Sync all_regions after region removal
The eventual goal is to keep the set of used regions
in sync, and allow to remove explicit calls to
`sync_all_regions_with_regions`.

This prevents `all_regions` to retain a reference to
a region that has been destroyed.
2023-05-31 01:20:29 +02:00
bfed3f5d42
NO-OP: white-space 2023-05-31 01:16:15 +02:00
f07361b34e
Session::add_source cannot fail 2023-05-31 01:15:28 +02:00
d7f631757a
Tweak Source removal
* Do not emit signal with source-lock mutex held
* explicitly drop references when called directly; notably from
  EditorSources::remove_selected_sources
2023-05-31 01:14:53 +02:00
331efe835f
Debug region/source removal 2023-05-30 18:19:48 +02:00
39ac0c5e19
Remove unused Region::remove_dependents API 2023-05-28 01:52:42 +02:00
58b98e8c5c
Prompter: add a reset to default option 2023-05-27 15:15:42 +02:00
10b2380b14
Fix deadlock/race introduced in aaf301321
Port::_connections_lock must not be locked when calling
port_engine.connect().
2023-05-27 14:18:31 +02:00
abd27b765e
Remove some unused variables 2023-05-27 14:14:01 +02:00
b6428b421f
Fix Region Export alignment
Session::start_audio_export correctly sets preroll offset
depending on export-mode. A later locate must not change it.
2023-05-27 02:21:40 +02:00
d5cc5b0586
Auto-connect master/monitor when switching backends 2023-05-27 00:08:48 +02:00
aaf3013211
Save I/O connections per device (#9344) 2023-05-27 00:08:25 +02:00
c11f8532ca
Add API to query backend/driver/device ID 2023-05-26 23:02:06 +02:00
42caef16bc
Delay MIDI-bypass for latent plugins 2023-05-26 19:17:56 +02:00
4c4138ff37
Optimize delaylines and implement multiple-MIDI buffers 2023-05-26 19:17:53 +02:00
28785e4fc0
Fix delayline x-fade with buffers <= 64fpp
Previously increasing the delay-time by more than FADE_LEN
while buffersize was < FADE_LEN/2 could result in garbage being
added to the buffer.
2023-05-26 19:17:46 +02:00
84e38b4c65
Fix PF16 auto-connect 2023-05-24 23:01:34 +02:00
11157d9bd9
Fix some Wunused-variable 2023-05-22 21:26:26 +02:00
d85277f532
NO-OP: clang-format, whitespace 2023-05-22 21:07:36 +02:00
c452a4816c tempo mapping: Re-implement tempo-twist with constant and ramped varieties (lib part) 2023-05-22 13:32:53 -05:00
f1f352a6e9
Fix shaped dither (#9342) 2023-05-22 04:50:19 +02:00
e9dc1335f9
NO-OP: clang-format 2023-05-22 04:50:13 +02:00
dd9f9ef19d
When synced to engine vari-speed is not possible 2023-05-19 23:28:32 +02:00
2041979f85
Add more session-archive error messages, abort if encoding fails 2023-05-19 16:15:05 +02:00
edcf850aaf
Fix Wformat 2023-05-19 06:16:49 +02:00
25f8eea162
Allow to cancel session archive process 2023-05-19 03:08:37 +02:00
c9929698ee
Implement FileArchive progress/cancel
* Use PBD::Progress API
* Allow to cancel extraction and compression
* Fix querying download size
2023-05-19 03:08:22 +02:00
2cb4e8a6ca
Remove compat header 2023-05-19 00:54:10 +02:00
92fbab32c6
Update codebase to use PBD::Progress (1/2) 2023-05-19 00:37:49 +02:00
65f2be76f6
Move Ardour::Progress to PBD::Progress
This will allow PBD::Filearchive to properly report progress.
It is also a generally useful API and deserves to be in libpbd.

Temporarily keep Ardour::Progress as alias
2023-05-19 00:35:20 +02:00
25234702fe
Prepare libardour for FileArchive progress API update 2023-05-19 00:35:14 +02:00
b3d3944451
Add session-archive error messages 2023-05-18 18:54:46 +02:00
8c861914c8
Fix copy/edit in 4cdcdb9ee7 2023-05-18 00:47:37 +02:00
4cdcdb9ee7
Add enum to configure selection after section cut/copy 2023-05-17 23:28:20 +02:00
Hoger Dehnhardt
f958b7b0e0
With larger projects, the session was not initialised at this time 2023-05-14 22:50:35 +02:00
83555ec290
Consolidate playlist block & ignore notifications
Despite the names suggesting otherwise
`block_notifications` and `ignore_state_changes` are used
for the same purpose.

The only difference is that ::freeze ::thaw explicitly
modified `ignore_state_changes` **in addition** to
`block_notifications`.
2023-05-14 20:42:32 +02:00
e79d8b00f9
Speed up playlist rendering of non-overlapping MIDI Regions 2023-05-14 20:42:31 +02:00
54969d8aab fix thinko resulting in duplicate bar-names after a tempo-mapping op 2023-05-14 09:05:08 -05:00
4192710ac8
Add Lua bindings to remove routes 2023-05-14 02:44:27 +02:00
5bbd248384
Add Lua bindings for std::list/vector clear 2023-05-13 17:38:41 +02:00
756c0a80c9
Emit Xrun in case process-lock cannot be acquired 2023-05-11 19:30:49 +02:00
1ac7f483da
VST3: set non-automatable parameters (#9321) 2023-05-11 18:50:15 +02:00
57017267cf
Prefer try-lock in process-callback 2023-05-11 18:38:02 +02:00
79e6830d21
VST3: allow to set non-automatable params (#9321) 2023-05-11 02:11:05 +02:00
b1a771d36b
Fix windows builds (type mismatch/error) 2023-05-08 22:05:56 +02:00
1940dfbb28
NO-OP: cleanup includes 2023-05-08 22:02:37 +02:00
ee2bae5aa8
Fix std::optional -> boost::optional API 2023-05-08 22:02:21 +02:00
Hoger Dehnhardt
1dc879eb8d
Softube Console1 add surface (libs) 2023-05-07 18:19:40 +02:00
63e0ac11ad
Prepare cut/copy/paste tempo-map sections
This currently asserts in Range::subtract, also ripple
is not yet implemented.
2023-05-07 02:04:47 +02:00
1d1a1e87ec
Fix another lv2core header include 2023-05-07 01:41:01 +02:00
495b27c742
Fix lv2core header include 2023-05-06 18:28:35 +02:00
da9ec02662
Fix typo in bf4decbfe 2023-05-06 18:16:49 +02:00
bf4decbfe7
Add LV2 header include compatibility (1/2)
For whatever reason LV2 changes #include header locations
in a micro version release and disables backwards compatibly
by default.
2023-05-06 16:20:01 +02:00
b9e5621e03 during map reset, force meter to bars, and tempo to beats 2023-05-05 20:53:23 -06:00
32a3591018 remove #warning 2023-05-05 18:57:16 -06:00
9e8eed8a03 temporal: various tweaks to get TempoMap::get_grid() to be more correct/robust 2023-05-05 18:56:01 -06:00
7c07a9964a temporal: add operator<<(ostream&) for BBT_Argument 2023-05-05 18:55:27 -06:00
fafc891ca6 add ripple option API for TempoMap::cut() 2023-05-04 18:49:06 -06:00
7f977bf3e4 add skeleton unit test for tempo map cut buffer 2023-05-04 18:48:50 -06:00
b3a127d318 temporal: TempoMap::paste(), TempoMapCutBuffer::dump() and cut/copy fixes 2023-05-04 17:09:19 -06:00
a8424e8617 temporal: implement (maybe) cut-copy for tempo map 2023-05-04 15:45:09 -06:00
f7ba9af6b2 temporal: stub API for tempo map cut/copy/paste 2023-05-04 15:10:56 -06:00
b3040a31fc temporal: a basic data structure to hold the result of a TempoMap cut/copy operation 2023-05-04 15:10:56 -06:00
6572b8d409
Fix cross-compile linking (libusb - see also 5794d21a76) 2023-05-04 21:31:13 +02:00
f589aedcfe
Fix Windows builds (pthread_t) 2023-05-04 21:13:17 +02:00
baf307838c push2: change ordering within destructor to avoid event loop thread drawing-after-delete 2023-05-04 12:34:37 -06:00
617caf9e98
CPM: precent concurrent protocol activision
This can happen when a device is already connected
while Arodur is stating. The butler thread may activate it
(immediately post-engine), while the GUI thread tries
to do the same later when restoring state.
2023-05-04 18:44:02 +02:00
912f9e5ea3 provide functions for both linear and ramped tempo-twists 2023-05-04 09:22:28 -05:00
1b6e4b0b84
Implement marker copy/paste section 2023-05-04 06:25:59 +02:00
b936fd12cd temporal: reset the tempo map in sections bounded by BBT markers (if any)
This avoids total SNAFUs caused by the impossibility of globally ordering
by BBT time.
2023-05-03 21:55:23 -06:00
faac648502 temporal: add TempoMap::{next,previous_}meter() 2023-05-03 21:55:23 -06:00
34ec1e57ac Fix macOS builds (libusb_hotplug_event parameters) 2023-05-04 02:49:33 +02:00
336f51e1f0
Push2: implement MIDI port probing, auto-enable 2023-05-04 00:57:16 +02:00
da9ed129e3
Contourdesign: Implement USB probe/match 2023-05-04 00:20:45 +02:00
a8f5f5636f
FP8: implement MIDI port probing, auto-enable 2023-05-04 00:20:38 +02:00
97272481b8
CPM: Activate hotplugged libusb ctrl-surface 2023-05-04 00:20:31 +02:00
161d82869a
CPM: Implement automatic ctrl-surface activision 2023-05-04 00:20:15 +02:00
65346496f5
Refactor Ctrl Surface API
* reserve "probe" to actually probe for devices
* use separate probe for libusb and MIDI port devices
* use "available" to check if surface can be used
* allow both methods to be NULL
* remove unused ControlProtocolDescriptor* argument

Most surface just return `true` for available.
2023-05-03 15:38:42 +02:00
7c02ab9937
CPM: fix locks, do not reacquire descriptor 2023-05-03 02:05:58 +02:00
287a21c09e
Add API to query hardware port name
In case of internal backends this allows to retrieve the
Device name for a given (hashed unique) port-name.

As opposed to "pretty-name" (which defaults to hw-port-name),
this cannot be changed by the user.

It is intended to be used when probing for control surfaces.
2023-05-02 23:39:27 +02:00
2bdf51e02d
Implement cut/paste section markers
This does not include partial ranges (selection only
include either range-start or range-end).

Copy/paste also remains to be done
2023-05-02 23:36:51 +02:00
a7c4ab3247 fix thinko in canvas logic (fixes mouse cursor on desensitized playhead) 2023-05-01 08:49:27 -05:00
847f1e54c1
Clean up ctrl surface API
Remove unused fields, no mandatory surfaces
2023-05-01 02:22:45 +02:00
c55e17da99
Fix misleading doxygen comment
Previously this was used as documentation for peak_meter()
2023-04-29 21:03:56 +02:00
0ddacb8ea2 when abort()-ing due to a failed assert in tempo map code, dump the map 2023-04-28 15:57:42 -06:00
4ccaa81671
Fix cut/copy section: ripple requires a region split 2023-04-28 22:55:54 +02:00
907d3f82a7 temporal: fix grid generation in the presence of MusicTimePoints 2023-04-27 19:54:44 -06:00
e7f4c9dcb5 temporal: fix removal (and thus moving) MusicTimePoints 2023-04-27 19:54:14 -06:00
64b480dd65
ARD: shutdown message is not an error 2023-04-27 15:35:22 +02:00
dd969dfe8c
Fix worst-case and I/O latency report
In case there are any unconnected tracks, the track's output is
assumed to align to the master bus (see Route::update_signal_latency).

For this to work correctly the master bus port's public latency
has to be set first.

This fixes e.g. the following issue: add a latent plugin to
the monitor section. Then toggle its bypass or remove it.
Previously the worst-case latency remained unchanged.
2023-04-27 01:43:20 +02:00
4b77ecbe83
Sanitize XML values to be valid UTF-8 (#9317)
This prevents any non UTF-8 strings to leak into
Ardour XML files, which can make the session unloadable.
2023-04-26 17:43:52 +02:00
df298c6046
Add API to sanitize UTF-8 strings 2023-04-26 17:25:24 +02:00
5e967c02a9
VST3: fix manually setting parameter (amend 52a73fdb3) 2023-04-26 00:19:36 +02:00
52a73fdb33
VST3: fix manually setting parameters
VST3PI::performEdit already updates the shadow data, so
since 979f9876a7
VST3Plugin::set_parameter effectively did nothing (unless a user
rapidly moves the control slider, in which case the next process
cycle sets a previous value).
2023-04-25 23:34:58 +02:00
595e2e2914
VST3: notify GUI when plugin parameter names change 2023-04-24 22:32:35 +02:00
82447431f4
VST3: properly debug ParamTitlesChanged 2023-04-24 20:58:07 +02:00
3b4f9a231f
VST3: debug ParamTitlesChanged 2023-04-24 19:38:17 +02:00
95de61f74e
Fix race condition when closing a session
~Session calls AudioEngine::remove_session(), which fades out,
then unsets the session, and then in libs/ardour/audioengine.cc:460
```
session_removed.signal(); // wakes up thread that initiated session removal
```

Session d'tor continues, and calls Port::PortDrop(), which
unregisters all ports one at a time.

Concurrently, AudioEngine continues, and calls PortManager::silence_outputs
which gets all ports first (!), and then iterates over them.

There is a race condition which can lead to
DummyAudioBackend::get_buffer: Assertion `valid_port (port)' failed
2023-04-24 17:43:08 +02:00
John Emmas
40738b2bee A couple of extra requirements for DEBUG_THREAD_PRINT 2023-04-24 14:51:04 +01:00
John Emmas
81d7a51498 Minor change to commit #35b5861195 2023-04-24 12:40:36 +01:00
649ad0f052
VST3: update parameter and Bus names on plugin's request
This is currently only the backend implementation,
the GUI is not yet notified of the change
2023-04-24 01:54:35 +02:00
c95c11e186 remove debug output 2023-04-23 11:34:28 -06:00
35b5861195 try to avoid output pthread_t as-is, due to MSVC etc. 2023-04-23 11:26:00 -06:00
8cc16f2b81 convert std::cerr output to DEBUG_TRACE 2023-04-22 14:38:44 -06:00
ec5320c5f1 transport master: do not unregister port when session goes away
TransportMasters are independent of the session, and thus their port lifetimes should be
also.
2023-04-22 14:38:44 -06:00
a7ca4cf8a1 CoreAudio: subscribe to device-alive property
This notifies the user about device disconnect and properly
shuts down the backend.
2023-04-22 19:36:37 +02:00
7f198c7c2f
Amend 4dc4d53: fix missing use/lib includes for luabindings 2023-04-22 02:18:05 +02:00
4620d138ee import_pt: Look up tracks by name instead of by number
This allows existing tracks with correct names to be the target for import.
2023-04-22 10:09:55 +10:00
4dc4d53004
Fix windows debug builds (obj file too large)
This fixes a "too many sections" issue
```
Fatal error: can't write 159 bytes to section .text of build/libs/ardour/luabindings.cc.1.o: 'file too big'
x86_64-w64-mingw32-as: build/libs/ardour/luabindings.cc.1.o: too many sections (36781)
```
2023-04-22 02:03:20 +02:00
8629aea237 push2: shift held while using touch strip sends modulation, not pitch bend 2023-04-21 17:20:17 -06:00
2aee4765e9 don't try to print pthread_self() 2023-04-21 15:38:40 -06:00
4052537e0f midisurfaces: make connection_handler() private 2023-04-21 15:38:40 -06:00
27155732ff
MIDI input input follows selection groups
This also mitigates an issue that selecting a track in
a group may select other tracks. Previously the last
selected track's input was connected to MIDI ports, which
is usually not the track that the user clicked on.
2023-04-21 22:50:49 +02:00
f718279949 surfaces & event loops: i really mean no more request buffer factories 2023-04-21 13:55:58 -06:00
b0586763ba libpbd: changes to pre-registration of signal emitting threads
There is no need to preallocate request buffers for these threads - the event
loops that require them can allocate them when they discover and register the
pre-registered threads. This also means that event loops do not need to
register request buffer factories.
2023-04-21 13:43:46 -06:00
ba66381ab0 push2: remove unused member 2023-04-21 12:16:37 -06:00
7ad0deff10 abstractui: don't register self as a sending thread
if thread A emits a signal that is handled by thread A, no request buffers are
involved.
2023-04-21 12:16:37 -06:00
4a2c27ed6d abstractui: provide a message if an event loop wakes but finds no work
(this only occurs for debug builds)
2023-04-21 12:16:37 -06:00
6e65e9c82f abstractUI: pseudo-no-op: debug trace message expansion, and some reformatting 2023-04-21 12:16:37 -06:00
5d023b4c60 libpbd: fix an important thinko for cross-thread signal architecture
The old code assumed that the thread that created a request buffer for a given
signal-emitting thread would be the latter thread, and thus a thread-local
pointer to the request buffer could be used. This turns out not to be true: the
GUI thread tends to be responsible for constructing the request buffers for
pre-registered threads.

That mechanism has been replaced by using a RWLock protected map using
pthread_t as the key and the request buffer as the value. This allows any
thread to create and register the request buffers used between any other pair
of threads (because the lookup always uses a pthread_t).

The symptoms of this problem were a signal emitted in an audioengine thread
that was propagated to the target thread, but when the target thread scans its
request buffers for requests, it finds nothing (because it didn't know about
the request buffer). In a sense, the signal was successfully delivered to the
target thread, but no meaningful work (i.e the signal handler) is performed.
2023-04-21 12:16:37 -06:00
6eec11e50e midi surfaces: fix debug trace string 2023-04-21 12:16:37 -06:00
9dc53f9400 midi surfaces: no reason for the connection handler to be virtual 2023-04-21 12:16:37 -06:00
0eed821eb9 JACK: do not set the thread-init callback
Because we use the non-callback API, we can call our thread init callback
ourselves from ::process_thread(). In addition, the init_callback in JACK is
used by every thread JACK creates, including the messagebuffer thread, and this
confuses things from an Ardour POV where the callback was intended just for
realtime threads.
2023-04-21 12:16:37 -06:00