Commit Graph

949 Commits

Author SHA1 Message Date
Damien Zammit 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
Paul Davis 6cc116e6de Revert "add ProcessedRanges element to Session and update its contents appropriately"
This reverts commit 33047987a7.
2023-04-18 13:48:59 -06:00
Paul Davis 909a2ad639 Revert "modify API of MIDI Clock ticker to use ProcessedRange"
This reverts commit 720102f98a.
2023-04-18 13:48:59 -06:00
Robin Gareus 295dbd8e1e
Make RCU reader return a const pointer (omnibus commit) 2023-04-08 00:15:37 +02:00
Paul Davis 720102f98a modify API of MIDI Clock ticker to use ProcessedRange
This solves the faulty MClk output when we locate due to a loop end.
2023-03-24 14:19:16 -06:00
Paul Davis 33047987a7 add ProcessedRanges element to Session and update its contents appropriately 2023-03-24 14:19:16 -06:00
Paul Davis d513653912 API development for time domain flipping 2023-03-24 14:19:15 -06:00
Paul Davis 1cd1430975 skeleton code for global temporal domain change during tempo mapping 2023-03-24 14:19:15 -06:00
Paul Davis 4ba4cd69ff switch from glib atomic to std::atomic (libs edition) 2023-03-24 14:19:15 -06:00
Paul Davis b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
Paul Davis 39ed528e25 std-ize: convert all boost shared/weak ptr includes to <memory>
Also fix stdint.h -> cstdint and alphabetically order std includes
2023-03-24 14:19:15 -06:00
Robin Gareus 054e1c3c12
Retain pending state after recovery (#9215)
After recovering from a crash, the user still needs to
retain the option to ignore the changes that were done
just before the crash after investigating them (or save them
into a snapshot).

Previously crash recovery unconditionally overwrote the
session file (see discussion on bug tracker).
2023-02-03 07:50:32 +01:00
Robin Gareus 72995741bb
Adjust resampler quality when sample-rate mismatches
This also ensures that engine/session resampling is possible
when the config `port-resampler-quality` is 0.
2023-01-31 01:07:04 +01:00
Robin Gareus d89162745f
Consolidate base and nominal SR
Now that mismatched sample-rates are resampled, there is
no distinction between base and nominal sample-rate.
2023-01-31 00:54:28 +01:00
Robin Gareus 38c613cd9a Towards arranging sections
This allows to move or copy whole sections of the timline (everything
you hear) to a differnt position on the timeline.

NB. Markers and tempo-map are not yet moved, and interpolated MIDI
events are lost.
2023-01-23 04:07:46 +01:00
Robin Gareus 3b9a253a84 Bind weak pointers to rt_slot events
This fixes a crash when deleting routes, while there are still
automation events queued for the route.

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

The solution implemented here is to not bind a shared_ptr to the
realtime event. However, since deletion of the route happens in the main
UI thread, there may or may not still be a race.
2022-12-16 00:12:48 +01:00
Paul Davis c8e3d95109 add new Session global MIDI input port for trigger control 2022-11-19 10:22:16 -07:00
Robin Gareus 235d51a723
Revert "MixerScenes: implement 'undo' function for mixer scene recalls (libardour)"
This reverts commit a40c8d8e9a.
This reverts commit 01c7e14c6e.
This reverts commit 162a8c00b3.
2022-11-10 20:54:12 +01:00
Ben Loftis a40c8d8e9a MixerScenes: implement 'undo' function for mixer scene recalls (libardour)
* this allows the session to better report which scene was last recalled
* this potentially allows controllers (like OSC) to momentarily recall
2022-11-10 09:13:50 -06:00
Ben Loftis 44ff0e46ba MixerScenes: show last-selected scene (libardour part) 2022-11-08 17:29:40 -06:00
Ben Loftis 4f5106ae82 triggers: add convenience function to report # of trigger channels 2022-11-01 13:52:54 -05:00
Ben Loftis 756e0beb1b triggers: more session:: functions to access Triggers by index 2022-11-01 13:52:54 -05:00
Robin Gareus aaddf5f385 Add API to restore mixer scenes for given set or Routes only 2022-10-17 06:44:29 +02:00
Ben Loftis 2829f4385f triggerbox: publish some trigger functions to ::session (for the convenience of control surfaces)
Grid controllers will largely want to access clips in the order they appear on the Cue page

It is up to the device (and/or its ControlProtocol) to handle banking
2022-10-01 09:13:14 -05:00
Ben Loftis 1e283adb22 disambiguate trigger functions: stop_all_triggers -> trigger_stop_all 2022-10-01 09:13:14 -05:00
Ben Loftis 75ae0fd4b1 disambiguate trigger functions: cue_bang -> trigger_cue_row 2022-10-01 09:13:14 -05:00
Paul Davis 4f7c1aba24 libardour: infrastructure for notifying routes of tempo map change
The call to the Session is made before we call ::process(), from the
AudioEngine. Currently, only MIDI triggers care about this.
2022-09-30 17:21:43 -06:00
Colin Fletcher cef86efe1b libs/ardour: allow creating region source markers while recording
Add a list of marker locations to the session, for the the UI to add the
current location to when "add-region-cue-marker" happens whilst recording.
On record-stop, create source markers at the locations in that list in all
newly-recorded audio regions.
2022-08-09 14:03:03 -06:00
Robin Gareus f1226b6735
Fix session-archive, include Triggerbox Regions and Sources
This also consolidates code to collect used sources by checking
all playlists and all Triggerboxen, which have no playlists.
2022-08-08 23:03:53 +02:00
Robin Gareus 8cf3ff37ed
Do not save EngineHints with session-archives
This will prevent a "Engine I/O device has changed" warning dialog
when the archive is opened later.
2022-07-27 01:08:01 +02:00
Paul Davis 6bef80ae60 triggerbox: use regular transport request mechanism to get transport started
if a slot becomes active, and the transport is not rolling, it still
asks the transport to roll. however, (1) there's only 1 request across
all triggerboxen (2) the request will not be handled till the next
process cycle (3) the triggerbox returns after the request i.e. it
waits until the transport is rolling
2022-06-10 11:59:12 -06:00
Paul Davis cc2e6b3cf8 libardour: change API of Session::request_locate() to include "force" argument
No behavior should be changed by this modification; the argument has a default value of false, which
matches previous semantics, and every instance where the argument is specified, it is given as false.
2022-05-27 18:49:11 -06:00
John Emmas ee7e043855 class 'ARDOUR::Session::ProcessorChangeBlocker' gets used outside of libardour now (so needs to be exportable) 2022-05-25 12:26:09 +01:00
Robin Gareus baa30262b8
Be more specific about RouteProcessorChange signals
Session::route_processors_changed accumulates signals emitted
in realtime and processing is delegated to a dedicated rt-safe
thread. Previously this resulted in any changed to be converted
to a `GeneralChange`, which unconditionally triggered a route-reorder.

Record-arming a track causes a MeterPointChange (meters change to "in"),
and this caused routes to be resorted and a latency-update.

While the former is reasonable (Ardour prefers to process
rec-armed routes first), the latter certainly is not.
2022-05-24 02:26:56 +02:00
Robin Gareus 48fdfbab53
Implement Session support for Mixer Scenes 2022-05-19 23:31:54 +02:00
Robin Gareus 3f1420880b
Implement IOPlug processing using the Process Graph 2022-05-09 17:39:05 +02:00
Robin Gareus af6f8abdc7
Prepare IOPlug processing as GraphNode 2022-05-09 17:39:05 +02:00
Robin Gareus c45a6b80c7
Session support to add/remove save/load IOPlugs 2022-05-09 17:39:05 +02:00
Robin Gareus f5b280a850
Generalize graph processing
This allows to pass any GraphChain to the Graph to process.
It removes the need to use a mutex to swap two dedicated
chains (setup-chain <> active-chain, pending-chain).

Also various special cases pertaining to graph interaction
while auditioning and route-deletion can be removed.

This also unconditionally creates a graph-thread for GraphChains
to be processed, even if the main callback uses a special-cased
sorted RouteList if there is only one process thread.
2022-05-06 17:43:01 +02:00
Robin Gareus 9ad154f265
Untangle Graph from Route
The process-graph should only be concerned with GraphNodes,
which may or may not be Routes.

This also removes intrinsic connection information from
the graph-node. Connection information is to be kept separate
from the nodes.

When the graph is re-calculated in the background, old information
has to be retained until the new graph becomes active.

Previously *new* information was already stored in the nodes
while the graph is sorted, even though the new graph was not
active.
2022-05-06 14:02:34 +02:00
luz paz 3d395585c1
Fix various typos
Found via `codespell -q 3 -S *.po,./share/patchfiles,./libs -L ba,buss,busses,doubleclick,hsi,ontop,ro,seh,siz,sord,sur,te,trough,ue`  
Follow-up to 364f2f078
2022-04-08 19:51:02 +02:00
Paul Davis f8dc6d93ec constification: clean up final warning
This explains why we use const_cast<>. We also fix a logic error that
crept in here, in which a source might have its state saved twice
2022-04-07 15:13:30 -06:00
Paul Davis 7bf89ce109 Constification: make Stateful::get_state() const, with all other required const-ness added (libs) 2022-04-06 21:56:59 -06:00
Paul Davis a4459ebf9c avoid double-locates when locate-while-rolling
We know when we call non_realtime_stop() if we will be subsequently
locating. If so, do not do an additional non_realtime_locate() from
within the stop.
2022-03-17 17:43:43 -06:00
Paul Davis 1cc8a3f92c extend Session API to provide ::transport_locating() 2022-03-17 12:20:34 -06:00
Robin Gareus 3ae73eb242
Extend Session::Exported signal
Include timespan start position. This will allow to re-import
the file at the export-position.
2022-03-15 22:52:58 +01:00
Paul Davis 22b50c1716 ensure that Session handles tempo map changes synchronously in the main RT process thread 2022-03-14 14:03:07 -06:00
Paul Davis 00d8b08300 triggerbox: track empty slot status and ignore stop-at-session-end when appropriate 2022-03-14 14:03:07 -06:00
Robin Gareus 020051772e
Extend Session::Exported signal
Indicate if exported file should-be re-imported.
2022-03-11 04:55:24 +01:00
Paul Davis f77e9aa6c8 triggerbox: architectural changes to facilitate fast-forward 2022-02-08 20:57:32 -07:00