13
0
Commit Graph

20696 Commits

Author SHA1 Message Date
47a7a16c43 temporal: move another domain-swapping object to the right header 2023-08-07 16:33:16 -06:00
d87b10037b temporal: new object to try to make domain swaps undo-able 2023-08-07 16:33:16 -06:00
52c8a23aff
Add Lua bindings to print plugin control outputs 2023-08-06 21:58:33 +02:00
d035cb0834 some minor cleanups after rebase against master 2023-08-02 17:21:56 -06:00
ada7fc16aa temporal: another place to ensure that a BBT marker defines a beat position 2023-08-02 15:23:43 -06:00
ca348ce0d9 temporal: add TempoMap::replace_bartime() 2023-08-02 15:23:43 -06:00
206f7d3c40 fix compilation errors (last commit happened too early) 2023-08-02 15:23:43 -06:00
aa0e882c5f regions: force position time domain when a region is added to a playlist
Q: why not length time domain also?
2023-08-02 15:23:43 -06:00
1fd5f0d9e9 regions: attempt to prevent accidental time domain changes to length or position 2023-08-02 15:23:43 -06:00
f1b8a98a62 remove debug output 2023-08-02 15:23:43 -06:00
638978c527 fix thinko with tracks-follow-session-time when creating stripable 2023-08-02 15:23:42 -06:00
3367c03353 use tracks-follow-session-time option 2023-08-02 15:23:42 -06:00
08683674ce remove glue-new-regions-to-beats option, add new tracks follow session time option 2023-08-02 15:23:42 -06:00
3d64972ca2 libardour support for propagating track time domain changes into playlists and thence regions 2023-08-02 15:23:42 -06:00
7fe3becf2d temporal: fix TimeDomainProvider::set_time_domain_parent() to unset have_domain 2023-08-02 15:23:42 -06:00
71953a9929 locations: ensure they follow session time when start/end is set 2023-08-02 15:23:42 -06:00
1b9f4999df locations now follow session time domain, always (probably) 2023-08-02 15:23:42 -06:00
0c9bdd817d temporal: fix TimeDomainProvider::set_time_domain() 2023-08-02 15:23:42 -06:00
4cdac29029 attempt to follow time domain changes in playlists when tracks change 2023-08-02 15:23:42 -06:00
1fce815e2d temporal: expand TimeDomainProvider API 2023-08-02 15:22:52 -06:00
1a83860016 forward propagate session default time domain changes 2023-08-02 15:22:52 -06:00
df188996ec session has a default time domain 2023-08-02 15:22:52 -06:00
c293876518 playlist IS-A TimeDomainProvider
It has Session as its initial time domain parent
2023-08-02 15:22:52 -06:00
3b565693c8 objects don't have a time domain, they have a time domain provider (libs) 2023-08-02 15:22:52 -06:00
2bbf06c8cc class name change to clearly disambiguate Evoral::ControlList (a list of time/value pairs) from lists of Controls in libardour 2023-08-02 15:22:45 -06:00
af2e0e279c temporal: initial version of a time domain provider object 2023-08-02 15:20:58 -06:00
961fdc9de6 use a more explantory object name 2023-08-02 15:20:20 -06:00
fa225846af new Temporal API to allow keeping MIDI notes in position after a map-tempo operation 2023-08-02 14:11:06 -06:00
3c44c326c2 add an assert() to check a target in CoreSelection::get_stripables_for_op() 2023-07-31 21:11:36 -06:00
a5477feb27 API changes for ControlGroup::fill_from..()
This reflects better/different use by callers
2023-07-31 18:30:36 -06:00
0e6764c4c8 improve and extend group selection logic 2023-07-31 13:53:42 -06:00
03105aa760 libardour changes to support new selection/group logic 2023-07-31 13:36:14 -06:00
8340be4808 add another version of FooListToControlList 2023-07-31 13:35:37 -06:00
05c6616e32 ControlGroup: fiddle with API for clarity, and add TrimAutomation special case 2023-07-27 13:29:57 -06:00
7662f9af5b ArdourCtrlBase should pass UseGroup when setting control values
None of the things this is used for right now are ever members of persistent
control groups, but it is useful for selection-as-group
2023-07-27 13:28:02 -06:00
5e37a320c0 remove use-selection modifier 2023-07-26 18:24:43 -06:00
f6664570d4 control group: implement ::fill_from_selection and ::size() 2023-07-26 16:41:54 -06:00
eba8eb07d3 automation control: fix logic for ::pop_group() 2023-07-26 16:41:09 -06:00
86a5aec276 change "use selection" modifier to Win/Opt (Level4 modifier) 2023-07-26 16:40:34 -06:00
5f55f32386 control group: add API to push & pop control groups on a control 2023-07-26 13:38:37 -06:00
29c2b06d0e add a name for a modifier to be used to indicate "use selection" 2023-07-26 13:18:02 -06:00
3c2112abf5 widgets & GUI: Start/StopGesture signals should pass on GDK event state 2023-07-26 13:11:52 -06:00
7ddd2a0692 automation control: allow single level of push/pop control group 2023-07-26 13:11:22 -06:00
7fbe17c802 BBT markers must define an on-beat position 2023-07-24 16:20:38 -06:00
86d818e4b9
Revert VST3 kMono arrangement experiment #9418
Apparently kMono is not a flag and implies connection of the first port

This reverts commit 8aebfc45dc.
and  2698b23f82.
2023-07-21 00:39:47 +02:00
4c845eb2a0 cairo single pixel line offset fix, part 1 2023-07-17 20:54:33 -06:00
8c479ff425 lv2: if bpm is a double it may as well be a double from the start 2023-07-17 16:46:54 -06:00
3ab3ef3b55
Fix lineset drawing (again), apply cairo 0.5px offset
see also f08299ea1e
2023-07-17 23:28:36 +02:00
2698b23f82
VST3: try an alternative approach use kMono as flag, not arrangement
See also 920a6a46c3 and 445e5162fd.
2023-07-17 20:48:45 +02:00
8aebfc45dc
Revert "VST3: work around UADx crash when in mono configuration"
This reverts commit 920a6a46c3.
2023-07-17 20:45:44 +02:00
8a5f370994 lv2: correctly compute tempo for tempo markers delivered as position events 2023-07-17 11:39:47 -06:00
93cbbf57d1 lv2: reserve vector for return values from TempoMap::get_grid() 2023-07-17 11:39:47 -06:00
9fd0076c93 lv2plugins: correctly compute tempo to be passed to LV2 plugins 2023-07-17 11:39:47 -06:00
f08299ea1e
Fix lineset drawing for lines > 1px width
This is a follow up to 248e37ac0c.

A line at 0 with 1px width should draw from 0.5 to 1.5
(cairo pixel offset). The same line with a width of 3px
is -0.5 to 2.5.

The self.intersection code calculates this correctly, subtracting
shift, the drawing code however incorrectly added it.

This fixes MIDI track grid/note offset as well as a bleed
below the track.
2023-07-17 05:05:20 +02:00
8a371bcaa2
Fix tempo-map backward compatibility
Moving forward tempo-type is saved without `Tempo::`
prefix again.
2023-07-17 00:35:05 +02:00
b61f84e872
Print messages for each possible session-load failure 2023-07-16 16:16:59 +02:00
c31c1906f7 temporal: fix dangling confusion about "omega"
Remove all reference to "omega_sc" and rename "omega_beats" as omega
2023-07-15 21:45:11 -06:00
2aa7dd42ea lv2: plugins get an iterator to (sometimes|often) speed up ::get_grid() calls 2023-07-15 11:30:40 -06:00
ea2d2b4760 temporal: rename ::get_grid_with_iterator()
Because I like polymorphism
2023-07-15 11:23:45 -06:00
b2a57108c3 actually reserve space for click grid points, to void RT memory allocation 2023-07-15 11:08:45 -06:00
422fa7255b temporal: further extensions to GridIterator API to handle bar_mod/beat_div parameters
Also try to comment class definition to add a little clarity
2023-07-15 11:08:45 -06:00
cbaa335946 temporal: some cleanup of the GridIterator API 2023-07-14 21:32:40 -06:00
a857a0af4d
Update Luabindings for new TempoMap API 2023-07-14 23:48:13 +02:00
509efdb290 temporal: refactor ::get_grid() for performance reasons
the API now provides the option to call ::get_grid() with an iterator which may
be re-used on subsequent calls. This avoids unbounded O(N) "walks" from the
marker preceding the start point of the grid to the start point.

This commit also includes "fast-path" code for the common case of a single
tempo and single meter
2023-07-14 13:03:36 -06:00
81384537ef temporal: remove useless _floating member and API from TempoMapPoint 2023-07-14 13:03:36 -06:00
ed43ac3a28 remova Lua version of count_bars() since it is not longer in TempoMap 2023-07-14 13:03:36 -06:00
039f2d5d0e remove TempoMap::count_bars()
It's the only place in libtemporal that would require
a TempoMapPoints allocation, and there's no reason to do
this inside the library.
2023-07-14 13:03:36 -06:00
52f1b88749 temporal: remove ill-conceived lookup tables from tempo map (never publically visible)
These were not thread safe, and could not be: to be useful, a thread looking up a time
conversion could cache the result, but it would be using the global (shared) copy
of the map (because lookup is read-only, and so no write-copy is required). But
inserting into the lookup table wasn't lock protected (and shouldn't be because otherwise
that defeats the point of RCU).

So just drop it.
2023-07-14 13:03:26 -06:00
f2c5f9da25
Lua: allow to reserve STL vector size 2023-07-12 18:23:51 +02:00
72522dd05d
Lua bindings for TempoMap::get_grid 2023-07-11 23:01:09 +02:00
fd6d88583f
LV2 MIDI synths: only tx tempo-map if plugin asks for it
This is a slight improvement on 8d97db101 to further mitigate
excessive overhead introduce in a591fb64a.
2023-07-11 21:52:58 +02:00
8d97db101e
LV2Plugin: do not unconditionally call TempoMap::get_grid 2023-07-11 19:15:40 +02:00
459659d229 ControlList: do not handle mis-ordered OrderedPoints 2023-07-10 14:23:17 -06:00
9c590c1ed1 syntactic tweak 2023-07-10 14:17:10 -06:00
64dc7557cf automation drawing: some code cleanup and thinko fixes for ::editor_add_ordered() 2023-07-10 14:05:27 -06:00
45b02538e6 Evoral: extend ControlList API with ::editor_ordered_points()
Much more efficient than adding points 1 by 1
2023-07-10 11:20:47 -06:00
76ba032d3c
Fix creating session from template
bug was introduced in a36ddb72dd
2023-07-10 16:47:00 +02:00
de67226c90 provide PolyItem::pop_back() 2023-07-09 20:41:36 -06:00
1c54f0e4c0 handle MidiVelocityAutomation in the event type map code 2023-07-08 16:36:50 -06:00
3b1d4d8fa6 midi: fix playback of notes the start at playhead position (#9398/#9410)
The diskreader uses the route's monitoring state when deciding whether or not
to fetch MIDI data for playback. Route::monitoring_state() would determine
whether or not we were already rolling to affect its return value. However,
using Session::transport_rolling() is affected by pre-roll and consequently
returns the wrong value during transport startup. Instead, we now use
::transport_state_rolling() which ignores preroll conditions. This leads to the
DR actually reading MIDI data from the initial playback position, which fixes
this issue.

Note that the bug only occured if the track or the session was rec-enabled. The
monitoring state value was always correct for non-rec-enabled conditions.
2023-07-08 15:25:32 -06:00
920a6a46c3
VST3: work around UADx crash when in mono configuration
When using a UADx plugin on a Mono track in Ardour, the plugin
is configured to be Mono. by calling `setBusArrangements`.
The call succeeds and querying the Bus layout via `getBusArrangement`
as suggested by https://steinbergmedia.github.io/vst3_doc/vstinterfaces/classSteinberg_1_1Vst_1_1IAudioProcessor.html#ad3bc7bac3fd3b194122669be2a1ecc42
confirms this. The plugin acknowledges the speaker layout
for both input and output (Vst::SpeakerArr::kMono = 0x80000)

```
  Input BusArrangements: 0 chan: 1 bits: 80000
  Output BusArrangements: 0 chan: 1 bits: 80000
```

but UADx plugins crash later during process() if any of the lower
bits are unset and the bus is enabled.

PS. The plugin does NOT crash as long as a lower bit
(Vst::SpeakerArr::kSpeakerL or ::kSpeakerR) remains set
in addition to kMono.
2023-07-07 21:32:59 +02:00
883a83aca2
Fix windows builds (Lua signal bitset 9b8040a9f4) 2023-07-05 19:36:25 +02:00
d01dbcba83 Update minimp3
based on afb604c06b/minimp3.h
This reapplies be4bdb5365.
2023-07-05 18:05:33 +02:00
efed61af44
Amend d899441df1, fix duplicate device map entries 2023-07-03 19:57:55 +02:00
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