13
0
Commit Graph

20637 Commits

Author SHA1 Message Date
2e08ff01f5 temporal: add TempoMapCutBuffer::empty() 2023-08-30 14:16:21 -06:00
6b8c7292a5
Do not use session-range as implicit section 2023-08-29 00:29:06 +02:00
8c9b6812d7 fix crash during tempo mapping
Region _length values are not stashed during tempo mapping
if the region is already in the intermediate time domain, so do
not assert when they cannot be found at the end of the operation
2023-08-27 09:41:47 -06:00
8fd8eaa01d UF8: parameterize the device name and pass to MackieControlProtocol 2023-08-26 17:34:04 -05:00
845600b261 fix off-by-one pixel error caused by using floor() instead of round() 2023-08-26 10:07:41 -06:00
46a916f0b4
Add method to query sections 2023-08-26 14:09:53 +02:00
6cf2659f8b
Add Location flags to define sections 2023-08-26 14:09:53 +02:00
32ef2d5a0f temporal: add a music-time (BBT) point at the cut site 2023-08-25 17:39:00 -06:00
4d8ba938f1 temporal: during cut(), break out of loop once we pass the end time 2023-08-25 17:39:00 -06:00
848f74d803
MCU/UF8: Fix issue with windows build
Enable Surface, show GUI, disable surface. repeat.
Previously this cased a crash in glibmm:

The type name `glibmm__CustomBoxed_N13ArdourSurface6NS_UF86Button2IDE'
has been registered already.
2023-08-25 21:08:14 +02:00
c6b43155bc gain-like automation controls need to use the right limits for group value setting 2023-08-25 12:23:44 -06:00
4f7bd872be
MCU/UF8: use dedicated ctrl-protocol 2023-08-25 18:12:35 +02:00
c0366a5f13
MCU/UF8: Continued work to special case Mackie surface
* Use dedicated port-names for UFx
* Do not show SSL-UFx device-info files in MCU
* Fix Window namespacing/missing symbols
* Address Windows ambiguous symbols (Button, Surface)
  Those used to have a Mackie:: prefix, now they need
  MACKIE_NAMESPACE

When re-opening the GUI, there is still a somewha mysterious warning:
```
glibmm-WARNING **: file value_custom.cc: (Glib::custom_boxed_type_register): The type name `glibmm__CustomBoxed_N13ArdourSurface6NS_UF86Button2IDE' has been registered already.
```
2023-08-25 18:09:27 +02:00
70a4f29c59
Fix location ripple when cutting locations 2023-08-25 04:01:58 +02:00
f38a984396
Fix deadlock when undoing Location removal 2023-08-25 03:36:04 +02:00
efcef70d9a
Ensure that fatal does exit
Previously it was possible to just press "Esc" which closes the
dialog with Gtk::RESPONSE_DELETE_EVENT and Ardour continues
to run (and may or may not crash later).
2023-08-24 20:00:45 +02:00
ec365820d8
MCU/UF8: reuse and special-case Mackie ctrl surface for SSL-UF8
This adds a unique namespace to the MCU source code, so it can be
compiled multiple times resulting in different ctrl surfaces.
2023-08-24 19:19:10 +02:00
e3297a6a84
Fix MIDI deinterlace #9422
De-interlace works by first creating 16 SMF Sources, and then
only using sources that are actually required.

However SourceFactory::createWritable by default emits SourceCreated,
which added all the 16 Sources to the Session. Later adding only the
required Sources resulted in duplicate IDs.
2023-08-22 19:00:58 +02:00
dd4e5dfc96
Build-system: remove duplicate dis/en/able options
e.g. we had both --vst3 (default) and --no-vst3.
A user could specify both, which is confusing.
2023-08-21 19:25:26 +02:00
e9be3beb2a add get/set state methods to TimeDomainProvider
These are not used yet, because only the Session really acts as a Provider
and it uses the Config::default_time_domain to serialize that state
2023-08-16 16:33:17 -06:00
0227eab138 remove unused source file 2023-08-16 12:33:09 -06:00
c5a0c0f6e0 remove some debug output 2023-08-16 09:33:16 -06:00
0e40f030ad reversible domain swaps for Locations 2023-08-16 09:32:41 -06:00
06e9bf6ca4 domain swaps for MIDI CC and other controls 2023-08-16 09:06:10 -06:00
b240423e50 session: add API to get access to the current reversible command (if any) 2023-08-16 09:04:22 -06:00
f7fd015cb3 no, really, no Pitches handling (extends previous commit) 2023-08-15 11:29:52 -06:00
4246009864 no need for domain bouncing for "pitches" in a MIDI model
The Pitches representation is just an optimization in Evoral::Sequence, and just
represents note data differently
2023-08-15 11:25:54 -06:00
a50f38d164 domain bounce handling for sysex and patch changes 2023-08-15 10:27:21 -06:00
f92dcfa068 domain bouncing for Automatable/ControlLists 2023-08-15 08:34:42 -06:00
457b94ba65 fix computation of note length after tempo mapping 2023-08-15 00:04:19 -06:00
71d27e7d81 add a couple of #warnings 2023-08-14 23:42:08 -06:00
076cb86912 next iteration of changes to handle time domain bounces as undoable 2023-08-14 23:42:08 -06:00
fd5dfe27c5
region groups: some operations should implicitly group new regions
* imported regions
* newly-recorded regions
* regions that result from a Split or Separate
* pasted regions
2023-08-10 16:55:25 +02:00
d1ee95e886
region groups: use group-id instead of equivalent-region, when provided 2023-08-10 16:55:25 +02:00
8cd69a633b
region groups: save and restore the group-id counter for this session 2023-08-10 16:55:25 +02:00
1d5ec57794
region groups: define an API in region.h for grouped regions 2023-08-10 16:55:20 +02:00
92fbee6312 do not abort when handling a region whose length has the wrong time domain 2023-08-07 16:36:11 -06:00
e7c35cf601 API change for the start of making tempo mapping undoable 2023-08-07 16:33:16 -06:00
0223be5312 pbd: fairly unconscionable that Undo stuff in libpbd is not namespaced, so now it is 2023-08-07 16:33:16 -06:00
6b34578dfd minor fix for previous commit (this change is still pending) 2023-08-07 16:33:16 -06:00
afe5331a0b pbd: fairly unconscionable that Command in libpbd is not namespaced, so now it is 2023-08-07 16:33:16 -06:00
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