Commit Graph

983 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 efe943c98e Reimplement Route::shift, move all automation 2023-01-23 04:02:08 +01:00
Paul Davis d7895ab1d2 triggers: remove sidechain and use global port for trigger control 2022-11-19 10:22:16 -07:00
Robin Gareus 08a10b7e84
Replace AutomationControlSet with ControllableSet (1/2) 2022-10-18 00:08:27 +02:00
Robin Gareus 800d07a633 Add API to query all AutomationControls from an Automtable
This is in preparation for selective MixerScene restore.
2022-10-17 06:42:49 +02:00
Robin Gareus f3423b8a77
Consolidate send/delivery gain control
This moves the _amp from send to delivery (which already
applies gain for the master-bus normalization). This generalizes
the use of a gain stage for use in port-inserts.
2022-10-14 02:21:49 +02:00
Ben Loftis ddfefa2583 remove some debug printfs 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
Paul Davis 1c59a2dff0 triggerbox/route: a cleaner method of ensuring trigger alignment
This change still runs the triggerbox during latency-preroll, but as with the disk reader,
the transport speed argument is set to zero. The triggerbox notices this and behaves
appropriately (I think !)
2022-08-09 12:33:37 -06:00
Paul Davis dd5003eb1e triggerbox: must run when speed is zero
We only want to not run triggerbox during latency pre-roll
2022-08-09 09:29:46 -06:00
Paul Davis d65bc2a798 triggerbox: fix lack of alignment after a locate.
Triggerboxen were being executed during the latency preroll phase, which is
inappropriate. ::fast_forward() will prepare them to run at precisely the
correct time. So we add an explicit clause to avoid this.
2022-08-08 09:13:04 -06:00
Robin Gareus 0295e05d04
Force latency update callback after measuring port-insert latency 2022-07-03 02:16:11 +02:00
Robin Gareus 471330a292
Fix uninitialized variable (leading to crashes when adding routes)
A route may be processed before latency-compensation callback
sets the route's output_latency. In this case a random offset
was added to the start/end position (via latency_offset).
2022-06-15 14:15:24 +02:00
Robin Gareus 57a1dbb375
Update route API for silent processing 2022-06-03 22:50:13 +02:00
Robin Gareus 4d5ac90248
Only emit RouteProcessorChange if disk-i/o point actually changes 2022-05-24 02:26:56 +02:00
Robin Gareus e528c4df92
Fix export-processor position, include triggerbox output 2022-05-16 14:32:47 +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 5fa7d481c1
Optimize Route::direct_feeds_according_to_reality
Consolidate duplicate function calls, cache result in local variable.
2022-05-06 14:02:35 +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
Robin Gareus 95693f9364
Fix endless recursion when creating cyclic connection graphs
This is mainly relevant for Mixbus, which allows cyclic-connections
to record Master-out on a Track (which unconditionally has Mixbus send
and feeds master).

In Ardour it may also cause issues when creating loopback connections,
however latency is not usually updated with invalid graphs (old
process graph remains in use).

Otherwise it fixes a crash connecting Track 1 -> Track 2 -> Track 1.

This also optimizes Route::output_effectively_connected by caching
any prior lookup. This helps e.g. Track 1 -> Track 2 -> Master.
The connection "Track 2 -> Master" now only need to be looked up once.

See also 7958031287 and a556e96ed0
2022-04-23 15:37:57 +02:00
Paul Davis 04d34c4061 constification: use const_cast to resolve a CONSTIFICATION warning 2022-04-07 11:27:46 -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
Robin Gareus e603b2e12d
Remove debug messages (1/2) 2022-03-16 17:08:14 +01:00
Robin Gareus 6c0d3651cf
Cont'd work on track bounce/export alignment
Due to recent changes, when the master bus is disconnected its
private port latency was never unset. This lead to misalignment
when using stem-export if master (or monitor) output was not
connected.
2022-03-13 18:28:00 +01:00
Robin Gareus d5ee0342a2
Cont'd work on track->track bounce alignment
see also e58c312420
2022-03-11 21:53:22 +01:00
Robin Gareus e58c312420
Fix track->track bounce alignment
When a track's output is not connected, we assume
its output playback latency matches that of the master-bus.

This is to prevent the track's output latency to float
freely (see also a556e96ed0).

This failed if a track is connected to another track which is
not connected.
2022-03-11 04:55:24 +01:00
Robin Gareus 4965c83ef3
Do not allow to remove the triggerbox processor 2022-03-07 23:32:02 +01:00
Robin Gareus fbce2d73a8
Retain sidechain ports into unknown processors
This fixes an issue when loading sessions in "safe mode".
Internal side-chain sends are removed if the target port
does not exist. Also other port connections are lost if the
target port does not exist.
2022-03-06 17:13:56 +01:00
Robin Gareus bc1be2fc24
Fix stem export alignment
When a track's output is not connected, but the track feeds
other tracks via sends (common case in Mixbus) the stem
export of the track was not correctly aligned.

The track is correctly latency compensated (due to sends), but
the unconnected port's latency is not set.
However stem-export uses the private latency of the port as alignment.
2022-03-04 01:40:29 +01:00
Paul Davis 0ad90f826e triggerbox: handle realtime part of transport stop explicitly in TriggerBox 2022-02-09 17:26:25 -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 3694009176
Fix silence w/MonitoringSilence and triggerbox 2022-02-05 01:10:27 +01:00
Robin Gareus 5e2912b7eb
Auto Monitoring takes TriggerBox into account
MonitoringDisk is now only set implicitly if the triggerbox
contains no cues.
2022-02-04 01:47:20 +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
Robin Gareus 7128c9958f
Fix crash when duplicating track(s)
Compare to PluginInsert::set_state(). The sidechain must not
inherit the name from the template track. That leads
to port-name ambiguities.

Also later there will be a crash when ::update_sidechain_name()
calls IO::set_name since: _name is not found in _current_name.
2022-01-24 21:25:20 +01:00
Robin Gareus 687149d8d2
Require Session MIDI buffer for Triggerbox sidechain
This fixes an issue when adding a MIDI track, but there there
are no session-buffers for it, leading to:

ARDOUR::Buffer& ARDOUR::BufferSet::get_available(ARDOUR::DataType, size_t): Assertioni < _available.get(type)' failed.
2022-01-22 04:20:54 +01:00
Robin Gareus b72268f6e1
triggerbox: rename sidechain port when track's name chanes
Just like PluginInsert::update_sidechain_name, the name is
implicitly set, using the owning route's name, suffixed with the
[i18n localized] Processor name.

This fixes an issue if a track is renamed and a new track with
the old name is created. This commonly happens during File Import:
For each ImportAsTrack a generic named track (e.g. "Audio") is created
before it is renamed.

Previously this lead to
Failed to register port "Audio 1-trig/midi_in 1", reason is unknown from here
2022-01-04 01:22:34 +01:00
Paul Davis 610125b87c remove call to #ifdef'ed code 2021-12-27 11:24:03 -07:00
Paul Davis 75d5d54cb6 triggerbox: position triggerbox after disk reader, before polarity, by default 2021-12-27 11:20:40 -07:00
Paul Davis d82d8dd7d4 NO-OP: fix spelling mistake 2021-12-27 11:20:40 -07:00
Paul Davis ff89d998b2 triggerbox: steps toward sane trigger stopping API and design 2021-12-22 17:27:26 -07:00
Paul Davis 0fcc873ec5 correctly hide/show/position triggerbox in route processors 2021-12-13 16:24:13 -07:00
Ben Loftis e7569eabe7 Trigger Cues: implement master Stop button (libardour part) 2021-12-13 07:26:47 -06:00
Paul Davis 6326222a48 triggerbox: change APIs so that we can add a triggerbox to either type of track 2021-10-08 13:45:27 -06:00
Robin Gareus 8e5af55ae5
Prevent identical port-names when renaming tracks
Audio ports are sorted using PBD::naturally_less.
PBD::naturally_less is also used as compare function
for port-lists, port-sets, and port-maps.

So in sets and maps, the function is used to test
for uniqueness. This lead to issues since naturally_less
treats whitespace and underscores as identical.

While it was possible to have routes named "Audio_1",
and "Audio 1", this resulted in missing ports for one
of the routes.

see also 60ff3ef764
2021-10-08 04:12:55 +02:00
Robin Gareus 4998b2711b
Amend f301e692a: expose compensated port-latency
Retain min/max when copying inherited latency from
connected ports.

When there is a direct connection port A out -> port B in,
min/max latency range should be retained in direction
of signal flow.

Ardour can only adjust latency in reverse direction of signal flow
to match min = max with an internal delay-line. ie set playback
latency of an input port, or capture latency of an output port.
2021-09-14 21:39:53 +02:00
Robin Gareus f301e692a7
Expose compensated port-latency, fix ambig. latency detection
Previously Ardour only announced processor latency.
Routes that had additional latency to compensate for those
have not published this delay.

This is of no concern with internal backends, however with JACK,
Ardour reported incorrect *individual* port-latencies of
routes that perform PDC.

Since public port latency now includes delay-compensation,
some extra work is required to unset it before recalculating
latency of paths that include external ports.
2021-09-08 22:39:32 +02:00
Paul Davis dcfbdb482d triggerbox: reload sessions containing triggerboxen 2021-08-31 19:03:32 -06:00
Robin Gareus a556e96ed0
Fix latency report for unconnected tracks
When a track's output is not connected, its alignment
can /float/. Previously it assumed the worst (compensate
for worst-case latency).

The track itself has no playback latency, so any send would
delay the 'thru' path to match the send's playback latency.
This resulted in the track reporting a non-zero latency which
is not really present, nor relevant.
2021-08-16 22:33:15 +02:00
Paul Davis 1927e4673b remove StepSequencer, BeatBox and BeatBoxGUI from wscripts and #ifdef code occurences. Files remain 2021-08-13 12:51:36 -06:00