Commit Graph

382 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 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
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
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 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 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 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 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
Paul Davis ff89d998b2 triggerbox: steps toward sane trigger stopping API and design 2021-12-22 17:27:26 -07:00
Ben Loftis e7569eabe7 Trigger Cues: implement master Stop button (libardour part) 2021-12-13 07:26:47 -06:00
Robin Gareus f2ea9461f2
Fix API, Route::apply_latency_compensation() is not virtual 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 1927e4673b remove StepSequencer, BeatBox and BeatBoxGUI from wscripts and #ifdef code occurences. Files remain 2021-08-13 12:51:36 -06:00
Paul Davis c452dcda53 add access for triggerbox as a well-known (possibly null) processor in a route 2021-08-13 12:51:36 -06:00
Paul Davis eae9d276fe libardour: conversion to use timeline types (mega-commit) 2021-08-13 12:51:29 -06:00
Paul Davis 6b39febabc meet the beatbox 2021-08-13 12:51:26 -06:00
Robin Gareus c1f1cd5b3e
Prepare for foldback bus A/PF Listen 2021-03-24 17:47:53 +01:00
Robin Gareus cc7b8b1bc5
gcc-11 compat, volatile atomic variables (1/2)
"While 'atomic' has a volatile qualifier, this is a historical
artifact and the pointer passed to it should not be volatile."

Furthermore "It is very important that all accesses to a
particular integer or pointer be performed using only this API"
(from https://developer.gnome.org/glib/2.68/glib-Atomic-Operations.html)

Hence initialization of atomic variables is changed to also use
this API, instead of directly initializing the value.

This also fixes a few cases where atomic variables were
accessed directly.

see also libs/pbd/pbd/g_atomic_compat.h
2021-03-22 15:30:07 +01:00
Robin Gareus 1610b0baae
MonitorSection: fade input in/out for AFL/PFL
This slowly un/mutes the direct monitor signal when listen state
changes.

Listen sends already fade in as well. However un-soloing still
hard-removes the listen send path.
2021-02-22 00:59:57 +01:00
Robin Gareus a62fd0379e
Consolidate monitor-send setup 2020-11-26 23:58:15 +01:00
Len Ovens 5c6e8954ed Add pre/post fader to foldback send creation
add position param to send creation
	default all to prefader as first step
2020-08-08 18:41:03 -07:00
Robin Gareus e9ff843bb1
Implement master/loudness volume processor
This provides for a better user-experience than using a-amp.
Particularly since a-amp only has a 20dB range and can be automated.
2020-07-27 21:56:41 +02:00
Robin Gareus ba0dac92f2
Add a main-outs volume control and dedicated master-volume
This is intended for loudness normalization - #8318 to add
additional gain as last step.
2020-07-21 02:18:38 +02:00
Robin Gareus a7a938275f
Add API to query if an instrument was fanned out
Since fan-out happens (interactively) in the GUI thread,
we need to keep track of this, in order to prevent later
auto-connection of the track to the master-bus.
2020-07-18 22:59:43 +02:00
Robin Gareus fbe8075117
Update monitoring
This partially reverts 208c781248
in order to fix monitoring when using punch-in/out.

This also allows to revert to Ardour 5 style MIDI exclusive
Input or Disk monitoring when not using layered-recording.
2020-06-17 23:51:13 +02:00
Robin Gareus 0f95bf001d
Remove unused API (Input Metering)
Input metering is now handled by Track::prep_record_enabled()
explicitly setting meter positions.
2020-06-16 22:42:16 +02:00
Paul Davis 5a7b7b3bfb remove Route::reload_loop() and derivatives
Replacement to follow in subsequent commit
2020-05-12 11:34:37 -06:00
Robin Gareus 8aa4ae825d
Skip delayline updates if no change is required 2020-04-27 14:08:37 +02:00
Robin Gareus b9c29c478c
Remove unused signal 2020-04-25 17:53:49 +02:00
Robin Gareus 40eefeddd6
Micro optimization: cache output IO latency
IO::latency iterates over the port-set retrieving the
private_latency_range of each port. Since it can only change
when connections and latency changes, we can instead cache the value.

This is also in preparation to allow the auditioner to override it.
2020-04-23 04:56:45 +02:00
Robin Gareus 674554d978
Solo isolate foldback busses - #8020 2020-04-19 03:40:35 +02:00
Robin Gareus b7c7c02680
Optimize realtime listen-position change 2020-04-18 23:19:58 +02:00
Robin Gareus f0b25a776b
Update fan-out signal
* Signals use camelcase.
* use a static signal, independent of the route

Previously the signal was handled by RouteUI, which
caused various issues:
 * the RouteUI may not yet be available
 * There may be many RouteUIs for a single Route
   (mixer, editor-mixer, meter-bridge strips)
2020-04-02 20:27:51 +02:00
Robin Gareus 40e3364c66
Always delegate meter-point positioning to rt-thread
Previously set_state() -> set_meter_point() acquired the
process-lock to change meter-position, usually causing x-runs
when setting route-state.

This also fixes an issue introduced in fd414ec158. After
populating the processor list, force setting the meter-position
looks up the output streams of the processor before the meter.
However the processors are not configured. That will only happen
later from Session::post_engine_init().

---
#3 0x00007ff07b7d4102 in __GI___assert_fail at assert.c:101
#4 0x00007ff080d3224a in ARDOUR::PluginInsert::output_streams() const at ../libs/ardour/plugin_insert.cc:289
#5 0x00007ff080de8c30 in ARDOUR::Route::set_meter_point_unlocked() at ../libs/ardour/route.cc:4106
#6 0x00007ff080de8699 in ARDOUR::Route::set_meter_point(ARDOUR::MeterPoint, bool) at ../libs/ardour/route.cc:4037
#7 0x00007ff080ddfad3 in ARDOUR::Route::set_state(XMLNode const&, int) at ../libs/ardour/route.cc:269
2020-03-30 17:58:35 +02:00
Robin Gareus 8f37865070
Prevent freeze/bounce of sidechain processors
This also consolidates code to test if a processor can be frozen
from various places.
2020-03-14 13:25:54 +01:00
Ben Loftis d6315618da Enumerate the polarity buttons from the polarity processor itself, not the Input count. 2020-02-18 20:15:05 -06:00
Robin Gareus 2c24e6af36
Remove cruft, unused API 2019-12-16 23:37:57 +01:00
Robin Gareus 0a5837ec71
Fix loading plugin state from sessions
While loading a session XML state, set_state must use
`Stateful::loading_state_version`.

When later copying processor state,
`Stateful::current_state_version` is correct.
2019-12-11 16:25:08 +01:00
Paul Davis 1a2665e25f redesign of declicking and fades around loop boundaries 2019-11-22 23:41:56 -07:00
Robin Gareus 41ad43fa5f
Remove unused signal 2019-11-08 17:50:23 +01:00
Paul Davis febaa1ff2d fix unconditional note resolution during DiskReader::realtime_locate()
When looping, we do not want to resolve notes at the end of the loop via ::realtime_locate() -
::get_midi_playback() has already taken care of this. But when not looping, we need this. So,
add an argument to tell all interested parties whether the locate is for a loop end or not
2019-11-06 16:00:31 -07:00
Paul Davis e87e0ec028 add a MidiStateTracker to DiskReader and use to handle transport stop note resolving 2019-11-02 16:32:18 -06:00
Robin Gareus 0daee87803
Ardour::IO is not latent by itself 2019-09-29 18:25:14 +02:00
Robin Gareus d10c4c651c
Consolidate and extend "well-known" controls:
* Add new common strip controls (inspired from Mixbus)
* Remove duplicate documentation, document virtual API only.
* "azimuth" not "azi"
2019-09-25 14:02:45 +02:00
Robin Gareus a22f918d9d
Update libardour GPL boilerplate and (C) from git log 2019-08-03 15:53:16 +02:00
Robin Gareus cd5b0819bf
Consolidate meter-type state and API
In theory different UIs can show different meter-types, so it
can make sense to maintain the type in different places.
MeterType is a bit-set and PeakMeter implementation provides for this.

However, this is not being used, and the current implementation
was rather fragmented, cross-connected signals to keep types in sync,
allowed inconsistent meter-types in GUI and backend.

MeterType is now kept by meter itself, however it is still
saved/restored as part of the Route state.

N.B. This change breaks the API, various methods have been renamed
for consistency.
2019-06-09 19:56:15 +02:00
Robin Gareus 2f91bdfa53
NO-OP: <tab> after <space> fixes in libs 2019-04-13 19:19:29 +02:00