Commit Graph

983 Commits

Author SHA1 Message Date
Paul Davis f61f938503 remove debug message 2019-11-06 09:28:23 -07:00
Robin Gareus 27a3b93152
Update latency-compensation when re-ordering processors
When re-ordering processors, the route's own latency does not
change (at first).
But it might if sends or plugins with side-chains a involved.
2019-10-30 23:51:53 +01:00
Robin Gareus e2f5ce6f61
NO-OP: whitespace/comments 2019-10-30 23:45:27 +01:00
Paul Davis 7d3c2a4fee provide a mechanism to decide if Session::update_latency_compensation() is being called as part of a callback from the backend.
If it is, do not call AudioEngine::update_latencies() to avoid JACK1-style deadlock
2019-10-28 17:23:54 -06:00
Robin Gareus 7060ba4c1d
Fix strict-i/o override on session-load (amend 31847f88ef)
Plugins may override strict-i/o, and in order to know do this
the plugin needs to be instantiate first.
2019-10-23 01:36:33 +02:00
Robin Gareus 0daee87803
Ardour::IO is not latent by itself 2019-09-29 18:25:14 +02:00
Paul Davis 5ec5bc4523 goodbye USE_TRACKS_CODE_FEATURES and is_tracks_build 2019-09-25 12:16:13 -06: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
Paul Davis ba9e6ab869 add const and tweak variable name 2019-09-22 12:23:54 -06:00
Robin Gareus e8822e76d6
Add abstract API for latency compensated sends
This is in preparation for MixbusSends that are not derived from
Delivery : IOProcessor.
2019-09-20 21:27:16 +02:00
Len Ovens 220fa45d35 Add signal for foldback send add or remove 2019-08-26 17:48:22 -07:00
Robin Gareus b858b3b692
Detect monitor-send by instance, not name 2019-08-23 01:05:57 +02:00
Len Ovens a5828ba472 foldback may be mono don't set panner type 2019-08-06 11:13:30 -07:00
Robin Gareus a22f918d9d
Update libardour GPL boilerplate and (C) from git log 2019-08-03 15:53:16 +02:00
Robin Gareus 9cfcb0bd92
Mixbus uses K14 (not K20) master meter by default (see also 297ed001d) 2019-07-02 20:18:26 +02:00
Robin Gareus 297ed001d0
Mixbus/master is always using K20 by default
This only affects the meter-bridge, toolbar and editor track-header
(Mixbus' mixer is always using DPM, which is always enabled).
2019-07-02 16:12:06 +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 ef283ed29c
NO-OP: Unclutter -DGraph 2019-05-08 19:49:01 +02:00
Robin Gareus bf3e91e5cf
NO-OP: whitespace 2019-04-13 17:06:29 +02:00
Robin Gareus ff3b59fb4f
NO-OP: whitespace 2019-04-12 21:38:06 +02:00
Robin Gareus 4199156263
More Ardour/Mixbus codebase unification
Note Presentation-Info bits used by Mixbus to prevent conflicts
when sharing sessions.
2019-04-12 21:37:51 +02:00
Robin Gareus 5c94bd00b5
NO-OP: mixbus codebase unification 2019-04-12 19:22:59 +02:00
Robin Gareus 1ba391ab11
Fix bounce-process: skip all processors before disk-reader 2019-04-07 19:52:12 +02:00
Robin Gareus 73816d3e38
Bounce process always uses speed 1.0 2019-04-07 19:52:02 +02:00
Robin Gareus 60262275af
Do not create automation when shifting (insert/remove time)
This fixes a bug when shift() creates automation for parameters that
can not have any automation (hidden parameters, Mixbus PRE).

The GUI (RTAV) aborts() when it finds an automation lane for
a hidden parameter.

This also cleans up shift() operations in general. Empty automation
lanes should be left alone, no guard-point at zero should be added.
2019-03-25 17:05:19 +01:00
Paul Davis 851388e0b4 remove "rename_playlist" argument from Route::set_name_in_state().
We no longer find playlists by name when constructing tracks, so
the name of the playlist is not relevant
2019-03-20 20:02:07 -07:00
Robin Gareus 3fa3437c38
Remove unneeded calls to configure_processors during session-load
Those are superseded by b890cf73ad, which is done after
all IOChanges have been processed.
2019-03-17 17:32:06 +01:00
Robin Gareus 2f09f72b3d
Amend 883ee9c2, setup required invisible processor
This fixes a potential silent master-bus when re-loading a session
("mains_out" may be skipped).
2019-03-15 15:54:07 +01:00
Robin Gareus 883ee9c2a0
Allow to call set_state() on existing routes
Delaylines are not saved in the XML and internal-return is an
invisible processor not explicitly re-added when the state is restored.

They are [re]inserted during Route::setup_invisible_processors().
So this method need to be called after restoring processor state
(indirectly via configure_processors_unlocked as needed).

PS. During route creation this call happens explicitly and on session load
hookup_io() -> Route::output_change_handler() implicitly sets this up.
2019-03-06 00:57:49 +01:00
Robin Gareus 6a7750a55d
Tweak, optimize route setup
Speed up route creation: add_processor() takes a process-lock
and calls configure_processors() but this is done explicitly at the
end of init() already.
2019-03-06 00:03:46 +01:00
Robin Gareus 2cf57e9257
Fix recursive WriteLock crash due to signal emission
Route::processors_changed() signal connects to a same thread session-slot
Session::route_processors_changed() which can end up iterating over
Routes and Processors to re-calculate latency.
This takes a ReadLock after WriteLock, which eventually leads a duplicate
unlock and segfault.
2019-03-05 00:25:53 +01:00
Nikolaus Gullotta 711965b1a9 Amend d61efbee3 - remove check for Mixbus 2019-02-26 09:45:58 -06:00
Nikolaus Gullotta d61efbee3e Route::save_as_template() needs call state() with true, and add modified-with node to state for template-files 2019-02-26 09:42:30 -06:00
Paul Davis 63fdfd9e85 remove PostTransportWorkCurveReallocate (no longer used) 2019-02-22 14:54:34 -07:00
Robin Gareus 3cffaeac74
Prepare to allow to disable latency-compensation
Previously "zero custom/user latency" meant "default plugin latency".
This is now saved in a separate boolean allowing a user to reduce a
processor's latency to zero.

This also prepares for a global switch to use zero latency throughout
the whole session.
2019-02-16 01:10:50 +01:00
Len Ovens da347c3b37 Hmm, balanced panner didn't seem to make it in 2019-01-18 10:24:13 -08:00
Len Ovens 80df6b84b0 foldback sends should have unlinked balanced panner
Or 1+2 for mono sends.
2019-01-18 10:24:13 -08:00
Robin Gareus 9ec031cfce
Remove duplicate automation shift
Amp, Trim are now processors, moving processor-automation takes care
of gain automation.
2018-12-21 17:33:51 +01:00
Robin Gareus 81857a947c
Consolidate ambiguous engine API calls
available(), connected(), running() were ill-defined and
used interchangeably.
2018-11-28 15:24:47 +01:00
Robin Gareus 2e3e183204 Load audition synth on demand
This saves some memory (gmsynth loads a 30MB soundfont), and also
re-initializes the synth every time to gm defaults in case some
.mid changes patches or parameters.
2018-11-23 22:00:04 +01:00
Len Ovens f27ca29d6c Changed send/deliver role "Personal" to "Foldback" so bus type can match 2018-11-12 22:30:32 -08:00
Johannes Mueller 732fd75f9b Update names of sidechains.
When a PluginInsert is created it does not have an owner right away. That's why
a we need to set the sidechains name once the owner is known, in order to
include owner's name into the name.

Furthermore we need to follow renames of the owner.
2018-11-01 18:53:27 +01:00
Robin Gareus 5bd9bf868f Safe-guard non-rt-safe sidechain operations
This is required by 7d8b93ad for showing error when actively recording.
It also prevents other UIs (OSC, Lua,..) to change re-configuring
sidechain ports/plugins while recording.
2018-10-29 21:52:47 +01:00
Len Ovens 777fe3c68f Add personal monitor sends 2018-10-19 08:51:29 -07:00
Len Ovens 87ab15c862 OSC: personal monitor send hidden follows aux hidden 2018-10-16 13:56:52 -07:00
Robin Gareus 5c47ce32ec Fix master_send_enable_controllable for Mixbusses 2018-10-10 22:41:49 +02:00
Robin Gareus 87559a6054 Fix Mixbus master-bus tape-saturation controllable 2018-09-30 15:34:59 +02:00
Robin Gareus f4c1166651 Fix track rename oddity, don't skip over current name.
ensure_track_or_route_name() can produce the current name.

This fixes the following issue:
Create a two audio tracks. Their names are "Audio" and "Audio 1".
Try to rename "Audio 1" to "Audio", its name becomes "Audio 2".
2018-08-06 19:52:51 +02:00
Robin Gareus cdec333bfe move rt-stop to route
currently this is only used to resolve midi events for plugins
(this is conceptually not correct, note offs should be resolved by
the disk-reader only), but it calls into all processors now (incl
disk-reader if present), which is handy (e.g. flush delaylins)
2018-07-09 17:30:38 +02:00
Robin Gareus 249640267c Remove global declick API
De-click will be per disk-reader, latency compensated and buffer-size
independent. Cue-monitoring should not be affected by de-click.
2018-07-09 17:30:38 +02:00
Ben Loftis 208c781248 Auto-monitor == Cue for MIDI tracks. 2018-02-14 18:04:57 -06:00
Ben Loftis e6da4c4846 SoloSelection: libardour part. 2018-02-11 09:39:36 -06:00
Robin Gareus 9fc68378c6 Process Panner Automatables (emit Changed)
Pan-automation is evaluated directly from the control-list.
::distribute_automated() does not update the controls.

However, the *owner* of each automation-control is responsible to
evaluate automation of automated automation-controls (and emit Changed()
signals to notify the GUI and slaved controls).

This follow the same concept as PluginInsert: The Changed signal
is called on demand when evaluating automation.

This fixes pan-automation-sliders (automation-lane header) not updating.
2017-12-31 18:15:34 +01:00
Robin Gareus e02952a26c Sidechain latency compensation - part one
This properly sets the port-latencies of PluginInsert owned ports as well
as handles external sends (send-target playback latency).

NB. This needs more work to ensure that Sidechain input port playback
latency is set before the feeding send queries it the connected latency.
Re-ordering process may change sidechain or external-send latencies,
but since re-ordering does not change the route's latency,
engine.update_latency() may not be called.
2017-11-26 09:51:00 +01:00
Robin Gareus 5fdd6ca21e Clean up delayline API: don't use 'get_' for accessor method-name 2017-11-04 07:14:12 +01:00
Robin Gareus 0c041dc372 Fix polarity-control size (and crash during audition)
Also initialize new polarity-invert with gain 1.0, not inverted.
Don't fade-in.
2017-11-03 03:06:22 +01:00
Robin Gareus 79b1275b7c Fix set_loop() return value (amend 00a4ad) 2017-10-31 22:00:22 +01:00
Robin Gareus 8cf323c15d Relax assertion to allow rolling backwards into 0. 2017-10-31 19:54:08 +01:00
Robin Gareus 00a4ad712c Move Loop Location to Processors
The processors will becomes responsible to know about loop-positions
and map latency-compensated start_sample, end_sample into the loop-range
as needed.
2017-10-31 18:32:26 +01:00
Robin Gareus 3b785b9d35 Small steps towards rolling backwards.. 2017-10-31 03:51:08 +01:00
Robin Gareus 9a2433eacf Migrate to Polarity-inversion processor & fix proc positions
* invert polarity after disk i/o proc or return
* fix position of export-proc (after polarity)
* fix input-meter (before disk-writer or after return)
2017-10-31 03:18:59 +01:00
John Emmas 63b6ab1101 'Route::tape_drive_controllable()' needs to return something 2017-10-21 11:23:05 +01:00
Ben Loftis 23c2b751aa US2400: map knobs for mixbus strips, when selected. 2017-10-19 11:53:55 -05:00
Robin Gareus 47246c86e2 add missing lock (for audition + mon section) 2017-10-10 22:12:54 +02:00
John Emmas ad226cf2bb For 'Route::send_pan_azi_controllable()' (when building non-Mixbus) I'm assuming the intention was to return an empty object
(i.e. similar to 'Route::send_enable_controllable()')
2017-10-07 10:11:12 +01:00
Ben Loftis 28d8f2f6b9 US2400: send_pan_azimuth lookup function (currently mb-only) 2017-10-05 09:59:03 -05:00
Robin Gareus e31f5d9998 Clean up State API:
* Processor implement get_state(), classes derived from Processor
  implement protected ::state() -- as documented in processor.h
* likewise for Route, Track: make ::state() a protected interface
* removal of "full_state", use explicit "template_save"
* use RAII/Unwind to skip saving automation-state
2017-10-04 00:54:55 +02:00
Robin Gareus eb0dded095 Immediate-event/out-of-band injection update & tweak clearing buffers
Immediate events are used for MIDI-Panic and to inject GUI generated
events e.g. patch-changes, note-events from the track-header
(scroomer-keyboard) and patch-change audition.

Current behavior:

- snapshot copy immediate events from ringbuffer into a buffer at
  the beginning of each the cycle.
- Inject immediate events into input-buffer directly after reading the input
- process "normally"
- pass immediate event-buffer to disk-writer, so it can skip them
  (don't write immediate events to disk)
- if the Route is not monitoring input: clear buffer before disk-reader
  and re-inject (original) immediate events after the disk-reader
- immediate events process normally and are also sent to outputs.
2017-09-30 23:16:04 +02:00
Robin Gareus 56edd3767c NO-OP, re-order code, put all *roll() methods next to each other. 2017-09-30 18:54:47 +02:00
Robin Gareus dec10f2f3c First part of consolidating ::roll(), ::no_roll()
This moves common code (get and fill buffers) into ::passthru()
and renames ::passthru() to ::run_route().

passthru_silence() is no longer used (it was only needed A5 style
Track::no_roll_unlocked for no-roll + disk-monitoring)
2017-09-30 18:53:02 +02:00
Robin Gareus 0fc3bbddb2 remove unused Route::_silent 2017-09-30 18:46:24 +02:00
Robin Gareus de4c0eb27c Remove Input-meter special-case
Now that disk is no longer topper-most but a processor, the special
case is no longer needed.
2017-09-30 18:01:45 +02:00
Robin Gareus 5fa9f8b399 Towards fixing no_roll()
Currently ::roll() may actually be a ::no_roll() under some circumstances.

This can also happen during count-in:
  transport_stopped () == transport_rolling()

and during latency-preroll:
   Global session-transport speed != 0, some tracks already roll,
   read data from disk and feed latent plugins.
   but other non-latent tracks or busses don't roll and still have to
   behave like the switch from no_roll() to roll() has not yet happened.

This changes the game WRT to monitoring as well, previously, Route:roll()
called Route::no_roll_unlocked () for conditions outlined above.
Now Track::no_roll_unlocked is called and in some cases wrongly clears
the buffers before the signal hits the disk-writer. (more work is needed
related to 61f8e53b)

On the upside this also fixes an issue with MidiTrack::no_roll not keeping
a lock while pushing data into the step-edit-ringbuffer.

This is also a step towards consolidating all entry points:
::roll(), ::no_roll(), ::silent_roll() in the Route class.
2017-09-30 16:45:45 +02:00
Robin Gareus 697d29cdc2 Fix thinko in 8139becb -- route split cycle
Individual Routes cannot split the process-cycle in no_roll(); roll()
by themselves. Each of the calls will flush output buffers (and offset
port-buffers). If a route feeds another route the inputs of the other
route will only see partial data.
2017-09-30 13:10:17 +02:00
Robin Gareus 72fb8a5342 Align punch in/out recording with latency-compensation 2017-09-30 02:45:13 +02:00
Robin Gareus ccedb2d44e Remove unused punch+preroll API
This API was not used, also superseded by record w/preroll.
2017-09-29 21:02:22 +02:00
Robin Gareus 2b20f30d81 Aux-Send Latency compensation, part 2 & code-consolidation 2017-09-29 05:03:48 +02:00
Robin Gareus ddd4e3cf1d Aux-Send Latency compensation, part 1: latent sources 2017-09-29 05:03:48 +02:00
Robin Gareus 5a2ea4d0e2 Delayline naming -- for debug purposes 2017-09-29 05:03:48 +02:00
Robin Gareus 8139becb18 Ongoing work on latency compensation
The general goal is to align transport-sample to be the audible frame
and use that as "anchor" for all processing.

transport_sample cannot become negative (00:00:00:00 is the first audible
frame).

Internally transport pre-rolls (read-ahead) before the transport starts
to move. This allows inputs and disk to prefill the pipeline.

When starting to roll, the session counts down a global "remaning preroll"
counter, which is the worst-latency from in-to-out.
Each route in turn will start processing at its own output-latency.

Route::process_output_buffers() - which does the actual processing
incl disk i/o - begins by offsetting the "current sample" by the
route's process-latency and decrements the offset for each latent
processor.  At the end of the function the output will be aligned
and match  transport-sample - downstream-playback-latency (if any).

PS. This commit is a first step only: transport looping & vari-speed have
not yet been implemented/updated.
2017-09-29 05:03:48 +02:00
Robin Gareus 69b9ad6bcc Prepare removal of initial_delay 2017-09-29 05:03:48 +02:00
Robin Gareus 3d1e1d7213 clean up route header, NO-OP (except variable re-order) 2017-09-29 05:03:48 +02:00
Robin Gareus abb7cb90e7 NO-OP: Whitespace 2017-09-29 05:03:48 +02:00
Robin Gareus d98f87d542 No more disk-reader roll-delay
It was not working in sdio/6.0-pre anyway and with upcoming changes to
latency compensation the concept of per disk[stream/reader] will go away.
2017-09-29 05:03:48 +02:00
Robin Gareus 13cf4da011 Consolidate check for internal/non-removable processors 2017-09-23 00:34:01 +02:00
Robin Gareus aac8040e95 Enforce disk-reader to be after the disk-writer
If disk-monitoring is disabled: disk-reader position is not relevant.
If Rec-arm is off: disk-writer position is not relevant.

But...

   Play -> [plugins] -> Record

is basically a bounce and best done using the bounce operation.
(faster than realtime).

   Input + Play -> Record -> Output

Ardour would need to align playback with the Input to be recorded
and at the same time align it with output, so that a player can play
along on the same track. That's not possible without a time-machine (or
a 2nd play processor).

While it can work in theory under some special circumstances, allowing
the disk-reader before the disk-writer is really just confusing,
error prone and valid uses cases are better handled by dedicated
operations.
2017-09-22 03:47:38 +02:00
Paul Davis 48d11000e5 attempt to fix roll delay logic by moving it into DiskReader (the only place it matters) 2017-09-19 18:53:27 -04:00
Robin Gareus 21aa2f529f Fix nightly typos'n'thinkos: initial-delay calculation 2017-09-19 17:03:28 +02:00
Robin Gareus 29e553ab86 Amend c8a9b28d3 and 40aebce. Fix gain automation edge-cases:
* drop Trim/Fader automation for bypassed processor
* Trim/Fader automation for Busses is always active when rolling
2017-09-19 04:54:42 +02:00
Paul Davis c8a9b28d3b remove getter for Amp::_apply_automation_gain; reset member to false after use, and true after ::setup_automation_gain
runs successfully
2017-09-18 22:21:27 -04:00
Paul Davis 40aebce699 consolidate roll methods into Route::roll()
We want Track to shrink, and logic consolidation is always good. Route already knew about
disk_reader and disk_writer, now it knows about _monitoring_control too
2017-09-18 21:28:02 -04:00
Robin Gareus 10b76ae631 Various updates and fixes for Latency Compensation
* centralize signal_latency_at_***_position to processors
* update initial-delay/roll-delay when processor order changes
* consolidate signal-latency calculation: use the same method
  for processor-changes and session's post_playback_latency.
* include relative output-delay in roll-delay
* fix capture processor position & optimize stem-export latency

(roll-delay fixes pending Route:roll() update)
2017-09-19 02:11:22 +02:00
Paul Davis 0a53b13de5 Disk IO "pre-fader" means pre-trim, not post-trim 2017-09-18 13:41:28 -04:00
Paul Davis 30b087ab3d globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
2017-09-18 12:39:17 -04:00
Paul Davis 24df2b5594 NO-OP: mark various state property names as explicitly non-translated 2017-09-18 11:40:53 -04:00
Paul Davis 13d44c4d76 move disk_{writer,reader} into Route to allow for simple, sensible implementation of DiskIOPoint 2017-09-18 11:40:53 -04:00
Paul Davis 6038ef44f9 auditioner always runs at normal speed, independent of transport speed 2017-09-18 11:40:53 -04:00
Paul Davis 4bfc5ddf71 mechanism to allow Track (or other Route-derived type) to add its own processors at the right time 2017-09-18 11:40:53 -04:00
Paul Davis dc4f730ac9 initial (incomplete) framework for DiskIOPoint manipulation 2017-09-18 11:40:53 -04:00
Paul Davis 79abf3dfa6 set + store signal chain latency for all processors; DiskWriter sets its capture_offset appropriately 2017-09-18 11:40:53 -04:00
Paul Davis 982d173b57 cue monitoring for audio (libardour aspects) 2017-09-18 11:40:53 -04:00
Paul Davis 2a1dccabc9 get diskreader working, and remove per-track varispeed API and mechanism 2017-09-18 11:40:53 -04:00
Robin Gareus b9f2a2ab3f Fix signal-emission order (first re/set instrument info) 2017-09-09 18:21:00 +02:00
Robin Gareus 5637bdd29b Prepare for singleton patch-selector per midi-track UI (mixer, editor,..) 2017-09-09 18:20:36 +02:00
Johannes Mueller bd4db1e151 Remove the template description XMLNode before saving the template
... to avoid that the new template description is concatenated to the old one.
2017-08-20 21:09:30 +02:00
Johannes Mueller 245154d06a Let user add a route template description on saving route templates 2017-08-20 21:09:30 +02:00
Robin Gareus 681ab52330 fix e838e7f359 2017-07-24 22:26:04 +02:00
Robin Gareus e838e7f359 Fix Mixbus "well known" send-names and enable ctrls 2017-07-24 21:54:31 +02:00
Robin Gareus fba2c2467d Fix Route mute automation touch (owned control) 2017-07-22 15:16:54 +02:00
Robin Gareus 24e92c1861 NO-OP: consistent [internal] API name for Automatables 2017-07-22 04:45:48 +02:00
Robin Gareus f756dc69f4 NO-OP: Consistent API name 2017-07-22 04:25:07 +02:00
Johannes Mueller 67bec5b5be Set the name of the route in a route template to the template name 2017-07-20 20:09:53 +02:00
Robin Gareus adc2c756e6 Allow adding tracks w/o running backend 2017-07-20 16:45:24 +02:00
Robin Gareus 7893cac718 Fix well-known send API for mixbusses. 2017-07-19 02:11:10 +02:00
Robin Gareus dee990103a Consistent Automation evaluation:
Rule #89: The *owner* of each automation-control is responsible to
evaluate automation of automated automation-controls (and emit Changed()
signals to notify the GUI and slaved controls).

This can happen during run(), when the Processor evaluates automation
(eg. PluginInsert does that), but needs to regardless, every cycle.
Emit Changed signal for GainControl

This follow the same concept as PluginInsert: The Changed signal
is called on demand when evaluating automation.
2017-07-16 16:53:39 +02:00
Robin Gareus 60df2a342c Don't drop processor references with process-lock
_processors = new_list; may drop the last shared-ptr reference.
This may deadlock in ~IO() for I/O processors or plugins with sidechain
inputs. It's been mostly a non-issues since the GUI usually holds a last
shared-ptr reference for a processor to be deleted, but that is
not always the case.
2017-07-07 23:05:59 +02:00
Robin Gareus 9334c99b35 Update Slavable API
Do not use AutomationType to identify parameters, use complete
Evoral::Parameter and Automatable.

For "batch connections", a Slavables needs to implement an API to return
the relevant controls.

This is only a first step towards a more generic Master/Slave framework.
2017-06-22 22:04:10 +02:00
Tim Mayberry 6d35b3c4e4 Remove locale_guard.h from ardour/ardour.h header
Add to source files that use LocaleGuard

Results in far less recompiling when pbd/locale_guard.h changes
2017-06-22 10:48:38 +10:00
Tim Mayberry 5694d877aa Remove LocaleGuard from ARDOUR::Route class
Route and all members are now using locale independent string <=> float
conversions.
2017-06-22 10:48:38 +10:00
Robin Gareus 31c6f66d9b Fix duplicate Gain+Trim AutomationLists in session file. 2017-06-21 13:15:34 +02:00
Robin Gareus 3d26a29e8a Sanitize "well-known" ctrl API 2017-05-14 00:17:11 +02:00
Ben Loftis b92f75481e Fix copy+paste error for mb32c filter freq. 2017-05-13 07:27:08 -05:00
Robin Gareus 257cc06cfc amend efc2660f, well-known stripable controls:
* consistent hpf/lpf controllables (actually hi/lo bell in 32C)
* HPT, LPF frequencies are exposed as EQ band
* don't expose filter ctrl for mixbuses/master
2017-05-13 02:02:54 +02:00
Ben Loftis efc2660fec MCP: Mixbus32C: Restore missing filter controls to the Dyn page. 2017-05-12 15:44:01 +02:00
Paul Davis bcbdd858fa Selection::get_stripables() needs to recurse into an Automatable's child Automatables when looking for for an Automation Control
It also needs renaming (to come)
2017-05-10 08:52:55 +01:00
Paul Davis 0c035778e1 libardour now has CoreSelection object to manage selection status of Stripables and AutomationControls 2017-05-05 18:56:25 +01:00
Tim Mayberry af1f4b933b Use std::string::operator+() instead of string_compose template in Route class
Using string_compose in this instance doesn't seem necessary, is worse in terms
of readability and is no doubt slower.
2017-04-19 09:37:01 +10:00
Tim Mayberry 04a027a031 Use PBD::string_to<bool> in legacy ARDOUR::Route methods 2017-04-19 09:36:58 +10:00
Tim Mayberry f2fb8523d8 Use XMLNode::get/set_property in ARDOUR::Route class 2017-04-19 09:36:49 +10:00
Tim Mayberry 334ec95e43 Use ID::to_s() in libardour instead of ID::print() 2017-04-19 07:49:58 +10:00
Ben Loftis dbb3c47eee Only check active_state when potentially skipping the route processing.
In the past, we skipped processing if the routes had no inputs or outputs.
But:
  A route with a generator plugin should work even if it has no inputs.
  A route with "sends" should work even if it has no outputs.
2017-04-17 19:36:31 -05:00
Robin Gareus d6b36a13a1 Flush processor (re-activate) on route active change
(flush reverb tails etc)

PS. That comment "from RT audio thread" was wrong.
Route::flush_processors () is called from flush_all_inserts()
from Session::non_realtime_stop() which is not in rt-context.
Besides, the processor-lock regardless of the process_lock.
2017-04-17 21:15:27 +02:00
Robin Gareus 515c0687b4 amend 649b9e92f, backport MB code 2017-04-17 20:34:18 +02:00
Robin Gareus 649b9e92ff Backport some MB specifics (to avoid -Wmisleading-indentation) 2017-04-17 20:23:07 +02:00
Robin Gareus 91e56ee8ca Update well-known controls (Ardour, Mixbus, 32C) 2017-04-17 20:13:46 +02:00
Robin Gareus 181b85c95c Exclude MB EQ/Comp from visible processors de/activate. 2017-04-14 00:52:43 +02:00
Robin Gareus ddf7ceaaea Don't A/B en/disable invisible processors, nor MB channelstrip 2017-04-14 00:32:51 +02:00
Robin Gareus ba2e80134b Convert polarity-invert from older session-formats 2017-04-14 00:19:33 +02:00
Robin Gareus d64ca9be08 Properly expose "well known" comp_redux output. 2017-04-12 21:14:50 +02:00
Robin Gareus 85c587d702 fix mb32 well-known EQ (4 bands, different ports) 2017-04-12 15:01:13 +02:00
Robin Gareus 333e3c6019 Add track/bus rename safeguards to the backend (handy for scripting) 2017-03-13 18:44:37 +01:00
Robin Gareus ac9bc19762 Fix crash when adding a plugin immediately after re-order (via script)
The re-order is queued to be performed click-free in realtime-context.
Meanwhile adding plugins will result in a race-condition.
2017-03-01 18:52:40 +01:00
Paul Davis 948a041736 remove debug output 2017-02-07 17:09:28 +01:00
Paul Davis e42c0ff1ea only reverse propagate solo-by-others-downstream if connections on a Route change, not just configuration changes.
This prevents a scenario where the route has had its solo control's state set from
XML, but then we configure the route's output, and invoke output_change_handler().
Without the new conditional, this would check which downstream routes are soloed,
find none, and then unset the soloed-by-downstream state of the solo control.
2017-02-07 16:51:32 +01:00
Paul Davis 08657843ac don't call shared_from_this() for every route when doing solo-downstream propagation 2017-02-07 16:51:32 +01:00
Robin Gareus 7a36ce4925 Instrument insert options:
* allow to directly fan-out when adding a multi-channel instrument
 * Mixbus: move multi-channel instruments after Comp & EQ.
2017-01-21 00:38:43 +01:00
Robin Gareus dc11651694 Relax monitor-section processor channel restriction 2017-01-19 18:32:45 +01:00
Robin Gareus d0596d815f prototype track/bus sharing: state-export 2017-01-08 01:23:01 +01:00
Robin Gareus 295562dd52 Save/Restore MIDI Automation Controls (current CC, PGM) 2016-12-07 19:47:04 +01:00
Paul Davis 17e803fef4 Do not try to restore Route solo state after clearing all solo state 2016-11-25 11:48:58 +00:00
Paul Davis c5eda4cfe1 provisional changes to speed up solo changes to large numbers of routes.
Moves global update of solo state and emission of Session::SoloChanged to
a single point after 1 to N solo controls are changed.

Also avoid unnecessarily emitted Activated() signal for listen controls,
though Process::{activate,deactive}() should probably be redesigned to
avoid this in a "deeper" way
2016-11-25 10:29:42 +00:00
Robin Gareus 8b93fb02f3 Mac VST-2.x support 2016-11-13 16:35:06 +01:00
Robin Gareus 4f8fdf0af7 Allow to get a route reference from SessionObject*
The motivation is to allow a Processor (here Lua) to get a pointer
to the owning Route without resorting to iterative lookup.
2016-10-10 17:34:18 +02:00
Tim Mayberry 441eaebd92 Restore ARDOUR::MuteControl state, fixes bug #7025
This should be the final part of a fix for bug #7025, which means the id
property of PBD::Controllable is restored and a new id is not generated at
first save.

I'm assuming this was a typo, comparing with the wrong name meant the state of
the MuteControl was never being restored. This also fixes restoring bindings
associated MuteControl instances.
2016-09-20 15:52:31 +10:00
Robin Gareus 7bdf4e12ba Take process-lock before processor-lock
This [hopefully] fixes jack1 zombification on session-load with large
plugin-states. Previously it was possible to block
Route::process_output_buffers().
2016-08-24 17:21:43 +02:00
Robin Gareus ef4facca11 fix Aux-Send Panner Linking 2016-08-19 01:14:21 +02:00
Robin Gareus c8c6bca658 fix crash when copy'ing latent plugins 2016-08-10 16:32:34 +02:00
Robin Gareus 43e20fd3e8 add Sidechain change handler for automatically added initial SC ports 2016-07-26 04:20:18 +02:00
Paul Davis 52d746c5fb MuteMaster should (a) use a Muteable's own ::muted_by_others_soloing() (b) not try to use its own _solo_ignore to track Muteable::can_solo() or solo isolate state 2016-07-20 16:10:11 -04:00
Paul Davis 316562ee9e ensure that Route::_phase_control has its state restored, and also re-arrange Route::set_state() to avoid duplicated control set_state() calls 2016-07-20 14:47:24 -04:00
Julien "_FrnchFrgg_" RIVAUD 522b288526 Make bus's trim control also affect sends to the bus
The trim processor was moved to the front after the internal return was,
so the trim setting was applied before the signal coming from other
tracks/busses sends was mixed in. Change the order so that trim applies
to audio from internal sends as well.
2016-07-20 13:58:42 +02:00
Robin Gareus b7d730433b add a note to self 2016-07-16 14:48:49 +02:00
Robin Gareus 19a9d8415f allow inserts to connect it itself - #6924 2016-07-16 04:14:27 +02:00
Julien "_FrnchFrgg_" RIVAUD 8c3551341c Make Route and Track ::silent_roll() also flush out ports buffers
So that MIDI in the ports is really made silent.
2016-07-14 21:55:49 -04:00
Julien "_FrnchFrgg_" RIVAUD 9ba6e938d8 Also flush buffers of the inner delivery of inserts
When flushing the buffers of Delivery processors owned by a Route/Track,
inner deliveries of PortInsert processors were missed since PortInsert
is not a Delivery subclass, but rather owns a Delivery as a private
member. Expose a flush_buffers() for PortInsert and call it too.

This is correct since (external) Send is a Delivery subclass, so that
just makes the send part of inserts behave as external sends do.
2016-07-14 21:55:49 -04:00
Julien "_FrnchFrgg_" RIVAUD 8af589b322 Consolidate delivery buffer flushing of all route types
Route::no_roll(), Route::roll(), Track::no_roll(), AudioTrack::roll()
and MidiTrack::roll() all had the exact same loop for flushing buffers
of their Delivery processors. That was a lot of replicated code that had
to be kept synchronised by hand. Put that code into a protected method
Route::flush_processor_buffers_locked() which is called instead.
2016-07-14 21:55:49 -04:00
Paul Davis cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
Robin Gareus 0a52b325f4 align stem-export (raw track outputs (with and w/p processing) 2016-07-10 03:21:29 +02:00
Julien "_FrnchFrgg_" RIVAUD 6911702f21 Don't add audio outs to non-audio routes with strict I/O
If a route has strict I/O then the main delivery follows the output of
the last processor, but libardour ensures it has at least as many
outputs as inputs in the master strip. A good consequence is that mono
tracks get their expected panner.

An akward side-effect is that MIDI-only routes (e.g. midi tracks or busses
without a synth) get two audio channels that have no use (and indeed no
panner is added because there is nothing to pan).

Skip the completion of audio outs if there was no audio out to begin
with.
2016-07-07 01:33:42 +02:00
Robin Gareus 6cff31c878 update route/processor semantics
* active(): hard bypass: en/disable. When disabled, run() is not called.
* enabled(): plugin run()s but may do nothing (or only be latent)
2016-07-05 23:30:21 +02:00
Robin Gareus 402e9cb20d flush output buffers after processing - fixes midi-bus chaining 2016-07-04 03:13:35 +02:00
Robin Gareus e9a8ccc7e2 major internal plugin & processor API change:
Pass current (latency compensated) cycle times to plugin.
This fixes time-reporting to plugins and also fixes automation
and when bouncing (the session->transport* is not valid) etc.
2016-06-25 02:23:56 +02:00
Robin Gareus a9c09af816 set latency of sidechain port 2016-06-16 15:08:25 +02:00
Robin Gareus 00caabf735 ignore midi on monitor-section and force strict-i/o 2016-06-12 20:16:27 +02:00
Robin Gareus a223b96725 fix mute automation for busses & consolidate code. 2016-06-08 15:39:04 +02:00
Paul Davis d58cb3daa3 extensive changes to PresentationInfo API
Now handles color, partially.
2016-06-05 16:33:01 -04:00
Robin Gareus 8566d898b5 fix possible deadlock replacing processor state. 2016-06-02 22:25:41 +02:00
Robin Gareus a03217c27f update lua bindings for API changes
luaBridge implicit inheritance uses a single direct parent
(other parents object need casts). This motivates
 Route -> Stripable -> SessionObject
2016-05-31 23:51:22 +02:00
Paul Davis b2df48263b add generic ::slaved() method to Route 2016-05-31 15:30:43 -04:00
Paul Davis 6ef7139fb3 missing initialization 2016-05-31 15:30:42 -04:00
Paul Davis e0ff70cf86 first vaguely working version using PresentationInfo
remote control ID and "order keys" have been removed.
2016-05-31 15:30:42 -04:00
Paul Davis f485cfa324 rearrange inheritance so that Automatable IS-A Slavable
Share assign code via Slavable; add visibility tags to Slavable+SlavableAutomationControl
2016-05-31 15:30:41 -04:00
Paul Davis eee3837245 remove explicit setting of Toggle flag for AutomationControls
Make it be based on the ParameterDescriptor, which indicates toggle status anyway
2016-05-31 15:30:41 -04:00
Paul Davis 1e9b2abe73 save and restore vca assignments 2016-05-31 15:30:41 -04:00
Paul Davis 83e51ee69b add Slavable API for VCA assign/unassign 2016-05-31 15:30:41 -04:00
Paul Davis be4e898996 improve cleanup of VCA related objects 2016-05-31 15:30:41 -04:00
Paul Davis 5b5e64d860 remove Route::listening_via_monitor()
This is better tested with direct use of the solo_control and
Config->get_solo_controls_are_listen_controls()
2016-05-31 15:30:41 -04:00
Paul Davis 01bba9f910 fix backend logic for PFL/AFL when mastered 2016-05-31 15:30:41 -04:00
Paul Davis 69250b64ea move ever close to working master/slave logic, this time with audio testing 2016-05-31 15:30:41 -04:00
Paul Davis 6de4953be8 a variety of changes that get closer to correctly functioning behaviour for VCA solo+mute (BUT ARE NOT DONE YET) 2016-05-31 15:30:41 -04:00
Paul Davis e1bcd70712 a slew of as-yet incomplete work to get VCA solo+mute closer to working 2016-05-31 15:30:40 -04:00
Paul Davis 86a9fb2844 stop crash caused by missing conditional 2016-05-31 15:30:40 -04:00
Paul Davis 5499bad836 add back some amount of XML save/restore for route controls 2016-05-31 15:30:40 -04:00
Paul Davis 653ae4acd6 universal change in the design of the way Route/Track controls are designed and used. The controls now own their own state, rather than proxy for state in their owners.
Massive changes all over the code to accomodate this. Many things are not finished. Consider this a backup safety commit
2016-05-31 15:30:40 -04:00
Paul Davis 194b213456 add implicit mute state to MuteMaster and use when a master of a mute control is enabled/disabled. Add AutomationControl::master_changed() as a virtual method to handle ... master value changes 2016-05-31 15:30:40 -04:00
Paul Davis 5531c83496 change API of Controllable::Changed signal to include (from_self, GroupControlDisposition)
This allows the signal to convey more information, which may be required by some handlers of a control's Changed signal
2016-05-31 15:30:40 -04:00
Paul Davis 1c0c9b40b7 new API for route solo/mute state mgmt
Route now calls back into Session when solo/mute/listen state changes. All other interested
parties must use the Route::{solo,mute,...}_control()->Changed() to be notified of changes.

The Session requires more information than the Changed signal can provide, in order to
propagate solo/mute changes across the entire Session correctly.

Note that this uses an experimental use of CRTP to isolate a public API within Session
2016-05-31 15:30:40 -04:00
Paul Davis 8eb45c518d rearrange AutomationControl and RouteAutomationControl to get more shared logic and consistent master/slave behaviour 2016-05-31 15:30:40 -04:00
Paul Davis c660703f95 redesign control slave/master system, move code from GainControl to AutomationControl 2016-05-31 15:30:40 -04:00
Paul Davis 9a0f4b1ef3 move vca assignment up to the Route level (from GainControl) 2016-05-31 15:30:39 -04:00