Commit Graph

935 Commits

Author SHA1 Message Date
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
Robin Gareus 2328df23e5
Collect and postpone send delayline updates
In order to detect if route delaylines need to be updated,
aux-send delaylines need to be updated first. This was previously
done directly in the latency-callback, which may be concurrent
with processing.

Now only the information (pending_delay) is set, and the actual
change happens later at the end of process().
2022-02-07 04:31:42 +01:00
Robin Gareus 6900facef2
Fix potential deadlock
block_processing() may hold the process-lock, waiting
for the latency-lock. at the same time audio-engine
may hold the latter, trying to acquire the former.
2022-02-02 14:16:50 +01:00
Ben Loftis 63e134097c Session::trigger_by_id finds a trigger from its pbd::id 2022-01-27 13:15:27 -06:00
Paul Davis 15f0e4dbbf triggerbox: fix cue playback and recording
Somewhat alarmed that gcc (at least) allows if (cue_recording ...) to be
used just like if (_cue_recording) even though the former is a class method
and the latter is a class member.
2022-01-27 11:36:04 -07:00
Robin Gareus 729ff35faf
Mark session as modified when stripable order chanes
Previously this was handled by the Editor/Mixer Treeviews,
centralizing it in Session makes more sense.
2022-01-27 01:28:49 +01:00
luz paz 364f2f0788 Fix typos in gtk2_ardour/ directory
Found via `codespell -q 3 -S *.po,./share/patchfiles,./libs -L ba,buss,busses,doubleclick,hsi,ontop,ro,seh,siz,sur,te,trough,ue`
2022-01-26 12:35:38 -05:00
Paul Davis d830800ed9 triggerbox: add flush-at-transport-stop from recorded cues to locations 2022-01-21 10:55:54 -07:00
Robin Gareus 670e1f9025
NO-OP: clarify variable name (1/2) 2022-01-15 00:06:26 +01:00
Robin Gareus 76facc0b13
Unconditionally create Triggerbox for each Track
This addresses and issue when loading old sessions or creating
tracks from [old] templates.
2022-01-14 22:46:50 +01:00
Robin Gareus 30539716ca
Fix various Wcast-qual
g_atomic_int_get() requires a non-const pointer, however
many APIs are declared virtual const, so const_cast<> is
preferred over an API change.
2022-01-10 00:06:20 +01:00
Paul Davis a187b5e1fb triggerbox: reimplement timeline cues without session events 2022-01-06 00:23:27 -07:00
Paul Davis fd2f2f46cc triggerbox: implement cue-triggering session event handling (sync with location markers)
Still requires handling tempo changes
2022-01-05 13:27:47 -07:00
Paul Davis 93b30976e5 cue events: some basic handling framework for syncing cue markers with session events that implement them
This doesn't actually do anything yet
2022-01-05 13:27:47 -07:00
Robin Gareus 3c2878974c
Always create a triggerbox with new tracks
This fixes an issue when creating tracks from the import dialog,
or via Drag/Drop, or using a template.

All tracks should always have trigger-boxes.
2022-01-03 23:41:58 +01:00