Commit graph

358 commits

Author SHA1 Message Date
Robin Gareus
a13a797600
Ignore "stop at end" when exporting
Exporting a dedicated Range should not be constrained by
session markers. This fixes at least 2 issues:

* export could be cut short when using latent plugins
* exporting a range crossing the session end marker was cut short
2023-12-08 17:22:09 +01:00
Robin Gareus
3e8cde5ad6
Always allow playback w/o session-range 2023-11-06 16:49:46 +01:00
Paul Davis
36048ea651 triggerbox: change API to allow providing velocity information when "banging" triggers
... and by extension using it (based on the magnitude of the velocity effect setting) to set the gain of
audio triggers
2023-09-08 14:41:21 -06:00
Paul Davis
68678aa957 triggerbox: add API to clear a cue (row) 2023-09-06 14:46:24 -06:00
Robin Gareus
6aa2ad26b5
Clear transport sub-state at RangeStop, disable play-range 2023-06-08 18:06:28 +02:00
Robin Gareus
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
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
Robin Gareus
295dbd8e1e
Make RCU reader return a const pointer (omnibus commit) 2023-04-08 00:15:37 +02:00
Paul Davis
33047987a7 add ProcessedRanges element to Session and update its contents appropriately 2023-03-24 14:19:16 -06:00
Paul Davis
a486fba3e9 std::atomic - 2nd batch of changes to convert from glib to std::atomic 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
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
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
aedf697646
Fix crashes due to missing return value
due to -fomit-frame-pointer a missing return value leads
to stack corruption. This also fixes the return type.
2022-10-03 19:38:30 +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
75ae0fd4b1 disambiguate trigger functions: cue_bang -> trigger_cue_row 2022-10-01 09:13:14 -05: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
Robin Gareus
c713841f39
Re-implement RTTaskList using Graph Threads
There is no longer an extra set of rt-threads, but existing
process-graph threads are reused.

There are two main benefits to this approach: graph-threads
have a SessioEvent pool and ProcessThread buffers. They are
also joined to work-groups (on macOS), or  JACK created threads
(cgroups).
2022-06-04 17:22:50 +02:00
Robin Gareus
543bb85157
Use process-graph for silencing routes during audition
Route::silence() runs plugins. With a heavy session
that relies on multi-core processing, sending silence
to processors will have to be done in parallel.
Otherwise it can result in large DSP load and xruns.

This may allow to revert b3497b3f8f, which was
a prior attempt to resolve this, before understanding
the actual cause.
2022-06-03 22:50:13 +02:00
Robin Gareus
5c85695362
Add Input Port meters for I/O Pre-Plugin outputs 2022-05-17 02:26:28 +02:00
luz paz
1e640563d6
Fix source comment typos in libs/ardour
Found via `codespell`
2022-05-11 00:14:28 +02:00
Robin Gareus
3f1420880b
Implement IOPlug processing using the Process Graph 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
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
Ben Loftis
b506a243a2 move cue-behavior from rc_configuration to per-session config 2022-02-19 11:48:56 -06: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
c870c22c87
Process Audition: process events before run
Calls DR::set_pending_overwrite() sets DR::run_must_resolve
before the first run.

Previously this variable was set after the first ::run,
which resulted in notes at the beginning of audition to be
cut short.
2022-02-05 19:16:00 +01:00
Robin Gareus
031a05b07a
Return early if processing is blocked
There is no need to setup thread-local variable
if they are never used.
2022-02-01 21:40:11 +01: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
Paul Davis
b023b97538 triggerbox: flush newly recorded cue markers back to RT context 2022-01-21 10:55:55 -07:00
Paul Davis
8d1684e1f7 triggerbox: store cue bangs in process thread when discovered 2022-01-21 10:55:54 -07:00
Paul Davis
8bf494e5a8 change nature of CueBehavior enum to be bitwise
This allows us to OR-in the ImplicitlyIgnoreCues bits, and still toggle
FollowCues on and off to indicate user-requested behavior
2022-01-06 11:59:58 -07:00
Paul Davis
44d52133ae triggerbox: ignore cue-marker cues if told to do so 2022-01-06 11:23:02 -07: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
Paul Davis
ff89d998b2 triggerbox: steps toward sane trigger stopping API and design 2021-12-22 17:27:26 -07:00
Paul Davis
91a28b78c4 modify and extend both Session and TriggerBox API to allow better transport control
This allows a stop transport request to first stop all active triggers and then stop the transport
2021-11-10 15:55:58 -07:00
Paul Davis
241948635b new session event type for triggering scene changes 2021-11-03 22:58:17 -06:00
Paul Davis
07a98734f3 triggerbox: tentatively add static calls to check for scene triggers inside Session process() 2021-11-01 12:11:57 -06:00
Robin Gareus
5eee8bf1a3
Allow to change process graph while auditioning
This fixes an issue with adding/removing tracks while auditioning.

Session::remove_routes() calls Graph::clear_other_chain(),
which will block until the graph chains have been swapped.
2021-09-15 04:03:18 +02:00
Paul Davis
c64db47b37 use new libtemporal sample rate mechanism (libs edition) 2021-08-13 12:51:31 -06:00
Paul Davis
ae01dafcce use Temporal::set_thread_sample_rate() rather than explicit assignment 2021-08-13 12:51:30 -06:00
Paul Davis
c9055547f3 set thread-local variable infrastructure for process thread & process graph 2021-08-13 12:51:29 -06:00
Paul Davis
68850892b8 NO-OP: make logical statement precedence more visually obvious 2021-07-26 17:27:43 -06:00
Paul Davis
e01f898f3b libardour: adjust names for default speed APIs and make ::set_default_play_speed() private 2021-07-18 19:48:13 -06:00
Paul Davis
3bdf009e11 libardour: provide infrastructure for requesting default play speed 2021-07-18 19:40:21 -06:00