Commit Graph

983 Commits

Author SHA1 Message Date
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
Paul Davis 04e26fe7e6 move VCA assignment up to Route level 2016-05-31 15:30:39 -04:00
Paul Davis 1f6800d421 redesign Route and VCA objects to inherit from ARDOUR::Stripable 2016-05-31 15:30:39 -04:00
Paul Davis 35172bb369 change API for GainControl, VCA and VCAManager
This allows sane state save/restore
2016-05-31 15:30:39 -04:00
Paul Davis acaaa98bd0 start shaping up VCA assign process 2016-05-31 15:30:38 -04:00
Robin Gareus 56471fd352 ensure that amp/fader is present on every route 2016-05-26 15:42:33 +02:00
Robin Gareus 00967a1982 take read-lock when saving processor order 2016-05-26 15:05:06 +02:00
Robin Gareus b4d4cb805e prepare plugin configuration and replacing instruments 2016-05-19 16:29:08 +02:00
Robin Gareus 7e463bab6e consolidate add_processor code
* fixes drag/copy'ing sidechain sends (autodestruct)
* reduce duplicated code
* prepare for instrument replacement
2016-05-19 01:44:44 +02:00
Robin Gareus d53d9b01ab prepare route pin display (shared mixer + editor-mixer window proxy) 2016-05-10 20:54:11 +02:00
Paul Davis a232673454 make boost shared_ptr debugging a little easier to turn on/off 2016-05-07 13:36:04 -04:00
Robin Gareus e59ab55831 a few strategic LocaleGuards..
..to prevent switching forth and back during  individual
::state(), ::set_state() when loading/saving the session or locating.
2016-05-07 17:16:59 +02:00
Robin Gareus a6e4494482 Revert "Add a global state localeguard (and one for route templates)"
This reverts commit 2b7a047e92.
2016-05-07 12:20:40 +02:00
Robin Gareus 6d343ba3c6 fix LocaleGuard contstructor (3dc77280) 2016-05-07 12:19:41 +02:00
Robin Gareus 2b7a047e92 Add a global state localeguard (and one for route templates) 2016-05-07 01:11:28 +02:00
Robin Gareus 3dc7728038 we always only use the "C" locale when saving. 2016-05-05 21:49:56 +02:00
Robin Gareus a644212506 no need to force a change here.
Fixes an issue with Mixbus where set_active() is a NO-OP for mixbusses.
2016-05-05 18:33:50 +02:00
Paul Davis 17ace643e4 OMNIBUS COMMIT: prefer const XMLNode::property method (and provide a real one) 2016-05-04 23:09:45 -04:00
Robin Gareus 8882ef79d3 use existing API to find the instrument 2016-05-04 17:52:17 +02:00
Robin Gareus 633f218911 fix a deadlock with jack2 when inserting a plugin adds ports.
When adding a processor, the processor may add ports leading to
a call to jack_port_register(). while Ardour holds a WritertLock on the
processor-list (this commit removes this WriterLock).

with jack2 that results in a graph-reorder callback (WHY?)

jack2 issues that graph-reorder in a separate thread BUT
port-registration does not return until the graph-reorder is complete.

On Ardour's side, graph_reordered() calls Session::resort_routes ()
which eventually checks Route::direct_feeds_according_to_reality()
which needs a ReadLock on the processor-list to check I/O.

Since jack_port_register() does not return, this constitutes a deadlock.

THE ACTUAL PROBLEM IS JACK2's THREAD DESIGN!
Why does jack_port_register() trigger a graph-order in jack2?
No connections are made.
..and why does it block jack_port_register() from returning if
that graph-order callback is in a different thread?
http://pastebin.com/DZANXJLz
2016-04-28 21:15:26 +02:00
Robin Gareus c30b47f0eb allow to customize variable i/o plugin inputs 2016-04-27 23:34:55 +02:00
Robin Gareus d32333f4ef fix stuck solo w/sidechain (when using port, not send, connections) 2016-04-19 22:15:57 +02:00
Robin Gareus bb090c0012 add self-removing Sends (remove on disconnect)
The idea is to dynamically add/remove sends for feeding a sidechain
and re-use all existing "External Send" infrastructure in particular
latency compensation.
2016-04-17 14:01:09 +02:00
Robin Gareus 241f734af4 disallow strict-i/o output on monitor and auditioner
monitor follows the master bus outs,
auditioner is fixed stereo and synth dependent.
(fixes crash when adding/removing the monitor section)
2016-04-16 00:10:48 +02:00
Robin Gareus 424cacfbc8 variable plugin port config.
* extend plugin API (query IO ports)
* collect possible variable plugin configurations (AU, Lua)
* prepare semi-automatic configuration (presets: mono, stereo, N)
2016-04-15 17:57:40 +02:00
Robin Gareus ed3eddaf19 special case mixbus routing 2016-04-15 14:52:19 +02:00
Robin Gareus 03db4805fd fix locking when switching strict i/o.
try_configure_processors_unlocked() needs process lock
2016-04-14 22:13:25 +02:00
Robin Gareus a3eaa4d3f0 Mixbus enforces output port count
Ardour features  N in -> M out panners. It can make sense that
the last processor has fewer outputs than the route.
In Mixbus this is not the case.
2016-04-14 20:01:52 +02:00
Robin Gareus 7962176219 properly calculate requrired thread buffers 2016-04-14 14:13:26 +02:00
Robin Gareus 9fedb74b36 strict i/o sets enforces output port count. 2016-04-13 20:54:42 +02:00
Robin Gareus bc0bb9662e prepare fix for copying plugin state 2016-04-13 18:53:47 +02:00
Robin Gareus 66b14b7bbb special case strict-i/o on the master-bus 2016-04-13 13:23:17 +02:00
Robin Gareus 7239cb09d9 extend strict-i/o to include route outputs. 2016-04-13 12:28:57 +02:00
Robin Gareus 04c56a0618 some strategic documentation
Prevent class descriptions inheriting the doc from PBD:Stateful by
adding some specific doc.
2016-04-12 17:03:44 +02:00
Robin Gareus 3fef6a3b8d hotfix process-graph: include internal-send -> internal return 2016-04-12 00:33:06 +02:00
Robin Gareus 021a52cc75 Route API to query all outputs (incl sends) and graph-feeds 2016-04-06 02:01:17 +02:00
Robin Gareus e84453e878 cement daa10a6a38 2016-04-03 23:51:59 +02:00
Robin Gareus daa10a6a38 Fix graph ordering incl. Inserts, Returns and SideChains
When building the process graph. Ardour usess
   Route::direct_feeds_according_to_reality()
This function only tests if the current route (or any ioprocessors)
is feeding another route's *input*.

Inserts, Return and now Sidechains are ignored as destinations on the
destination route are not taken into account.

This is now resolved by adding an IOVector, a collection of all inputs
of the destination route.
2016-04-03 22:45:23 +02:00
Robin Gareus 6739b6a1e3 handle sidechain input changes 2016-04-03 05:16:54 +02:00
Robin Gareus 91b875148a expose plugin sidechain (via route):
Processor and Process lock are needed, and the plugin chain needs to be
reconfigured, so this cannot be directly performed by the plugin.
2016-04-03 03:11:18 +02:00
Robin Gareus 0989209cf0 set processor owner early on (when loading session) 2016-04-02 14:03:23 +02:00
Robin Gareus f8d065d030 revert bd5da84928 - separate i/o-map & config reset. 2016-04-02 14:02:42 +02:00
Robin Gareus bd5da84928 reset pin-maps with custom config. 2016-04-02 01:22:57 +02:00
Robin Gareus 66e488e38d custom config trumps strict-i/o
This allows a user to override strict-i/o per processor.
The downside (currently): all downstream effects will be clamped to
the customized outputs (not the actual track's inputs)

This also introduces an new issue with re-config on session-load (missing
code to handle this).
2016-04-01 01:41:10 +02:00
Robin Gareus 884cb35523 plugin-pin-map:
* fix MIDI-bypass
* prepare combined channel-map report (for GUI)
* fix route failed config return
2016-03-31 20:28:48 +02:00
Robin Gareus 3a43e31d07 abort if configuration fails 2016-03-29 23:37:36 +02:00
Robin Gareus c444105710 closing in on pin management.
overall the PluginInsert API is complete.
many implementation details remain.
2016-03-27 21:33:40 +02:00
Robin Gareus d5c1ea11c3 allocate buffers for all possible plugin configurations 2016-03-26 15:02:03 +01:00
Robin Gareus edaeaf57ba prepare strict-i/o configuration. 2016-03-25 20:00:48 +01:00
Robin Gareus e41d4e8248 prepare Instrument slots -- replace processor in place 2016-03-19 16:41:59 +01:00
Paul Davis 420cc9b447 use ForGroup to flag and detect route-group based control changes 2016-03-14 10:42:01 -04:00
Robin Gareus 53a9751532 fix processed region export (track output) 2016-03-04 17:01:28 +01:00
Robin Gareus 51385ced3c Implement Lua DSP processor/plugin 2016-02-23 15:41:08 +01:00
Ben Loftis 8f7ae26a96 Fix reporting of compressor mode (Mixbus) 2016-02-04 11:41:17 -06:00
Len Ovens 7d5671a411 mackie control: Fix crash when selecting Track on MIDI strip, don't create phase control if there is none. 2016-02-03 10:35:35 -08:00
Paul Davis b728d3c9ff clean up mess in Route/Track controllables caused by not understanding the significance of ParameterDescriptor 2016-02-01 15:15:02 -05:00
Paul Davis 7d81ad1d68 very very slightly more robust exclusion of monitor send from Route::nth_send()
some sessions name that send "Monitor" and some "Monitor 1"

The correct solution is a test of whether the send is connected to the monitor section.
2016-01-31 22:46:00 -05:00
Paul Davis c56058b9de provide route solo isolate and solo safe automation controls 2016-01-31 21:49:18 -05:00
Paul Davis 9128fbd68f add a new constructor for RouteAutomationControllable that takes a ParameterDescriptor 2016-01-31 21:45:36 -05:00
Paul Davis e2a085190f break out Route controllables code into its own source module 2016-01-31 13:20:18 -05:00
Len Ovens 0fa208015e Mackie Control: Make Monitor send not show in Sends subview. 2016-01-30 21:05:45 -08:00
Paul Davis 17301b87f9 mixbus: don't assert(ch_post()) in case we use various methods on "odd" Routes in the future 2016-01-29 13:02:00 -05:00
Paul Davis fd291d1fa5 add new Route API ::master_send_enable_controllable() to provide generic access to a mixbus-centric control 2016-01-29 12:58:15 -05:00
Paul Davis 4a5b81a838 add new API to Route to get name of "well-known" nth-send
Route::nth_send() has the wrong semantics in Mixbus for this purpose. Probably
need to revisit this at some point
2016-01-28 23:05:28 -05:00
Paul Davis 7513176501 monitor send does not count in Route::nth_send() 2016-01-27 16:26:41 -05:00
Paul Davis c9e85c91fe return relevant AutomationControl for send_level_controllable() in Ardour 2016-01-27 11:38:14 -05:00
Paul Davis 708d80029b make Route::nth_send() and Route::nth_processor() be const 2016-01-27 11:37:54 -05:00
Paul Davis c79243c805 add stubs and enums to access "well-known" send controls 2016-01-27 11:16:22 -05:00
Paul Davis 22a20c7333 change exposed type of various objects' gain controls; remove Amp::gain() as a shortcut 2016-01-25 11:47:21 -05:00
Paul Davis 8dad6fa2d1 remove incorrect/out of date comment 2016-01-22 11:58:31 -05:00
Paul Davis 9e5b7db89f first compiling, mostly working version of group controls changes 2016-01-22 11:58:31 -05:00
Paul Davis 64c9198d60 add group disposition argument to Route::set_gain() and use it in various UIs
Executive decisions were necessary in a couple of places about the correct group disposition
behaviour, notably faderport and OSC surfaces
2016-01-18 12:11:09 -05:00
Paul Davis 1948b50a68 working version of new gain control design 2016-01-18 12:11:08 -05:00
Paul Davis 55094b7237 move Amp::GainControl out into its own source module and out of Amp 2016-01-18 12:11:08 -05:00
Paul Davis d1033819bd change ownership of the AutomationControl used by Amp.
It used to be owned by Amp. Now it is owned by Amp's owner
2016-01-18 12:11:08 -05:00
Robin Gareus 13148d29e2 translatable "Monitor" processor name 2016-01-08 14:21:14 +01:00
Paul Davis 9e3299f97d change Controllable::set_value() API to include grouped control consideration.
This also removes Route::group_gain_control() and associated machinery.
Not yet tested with Mackie or other surfaces. More work to done to
start using the group capabilities, and also potentially to add
or derive more controls as RouteAutomationControls
2016-01-02 04:58:30 -05:00
Robin Gareus dd9e0e49a0 proper display name for Monitor Processor 2015-12-27 18:36:20 +01:00
Robin Gareus 9cddc7cda0 add monitor-processor pre-fader (not at the top) 2015-12-23 14:35:31 +01:00
Robin Gareus 66bc06051b add monitor-section processor limitations. 2015-12-21 14:38:16 +01:00
Robin Gareus d9eb5e00c5 cont'd work on plugin-state templates - #6709
Refactor and consolidate code and re-use it for session-templates.
This avoids recursive copying of the plugin-dir()
2015-12-19 14:46:15 +01:00
Robin Gareus 3eb04c3c23 save/restore plugin state with track-template 2015-12-18 14:27:15 +01:00
Robin Gareus 7b6ef41f0c leave some todo-notes #6709 (track templates & state) 2015-12-17 23:48:06 +01:00
Paul Davis cfff528ae9 expose the right panning parameters for ardour 2015-12-16 11:05:11 -05:00
Paul Davis ab3f0f75a8 new route API to discover/access well-known automation controls for panning, EQ and compression.
The EQ and compression parts do nothing for Ardour, where there is no identifiable and understood plugin to perform their
roles. They do work on mixbus, which also serves as a model for how to do this.
2015-12-16 06:00:56 -05:00
Len Ovens e18ea188f4 Fix Mackie control Gain while in flip mode (vpot control of gain) 2015-12-09 09:21:36 -08:00
Ben Loftis 43d3bf5696 Set_self_solo should always set the mute_master state as well.
This fixed a bug in mixbus when a session was reopened with a soloed bus.
This may not be necessary in Ardour but I think it is more correct.
2015-12-08 15:44:11 -06:00
Len Ovens fb96170178 Fix fader in mackie control to work with groups. 2015-11-14 10:39:53 -08:00
Paul Davis b6925e274f substantial part of infrastructure required for track/bus duplication
This includes removing the removal of ID values in XML, and its replacement with
thread-local forcing of ID resets, implemented in a previous commit
2015-11-13 16:14:49 -05:00
Paul Davis f5e71fd817 fix return value from Route::save_as_template() 2015-11-13 16:14:49 -05:00
Len Ovens 8ae23c6952 Fix Mackie surface phase control for flip and more than one audio channel. 2015-11-01 15:30:36 -08:00
Len Ovens 2e9de2def0 Added Phase control mackie controls as part of the Trim (track) vpot assignment. 2015-11-01 13:35:02 -08:00
Paul Davis 8d3a8ca913 Add AutomationControl::set_value_unchecked() and AutomationControl::writable() and use them.
Classes derived from AutomationControl now check ::writable() in their ::set_value() methods to ensure that they
do not attempt to overwrite data sent to them while automation playback is underway.
2015-10-21 22:31:35 -04:00
nick_m ffed94d89b Automation - more toggled controller twiddling. 2015-10-20 00:53:28 +11:00
nick_m 9c102fa8d2 Make automation record undo per pass rather than per touch. 2015-10-20 00:53:28 +11:00
nick_m 877b258c74 Toggled automation fixes.
- don't attempt to insert two points on toggle.
	- remove forced touch->write mode change on toggle
	- initial state still wrong, but works much better overall.
2015-10-20 00:53:27 +11:00
Len Ovens 6899bd7c15 Add Trim to Mackie controls. 2015-10-07 21:36:16 -07:00
Robin Gareus 44f1f0caf4 fix exclusive solo group-override 2015-10-07 14:21:30 +02:00
Robin Gareus 477d1f3f42 implement solo group override 2015-10-07 01:44:02 +02:00
Robin Gareus 2237389112 renice code. RAII rocks. 2015-10-06 20:18:02 +02:00
Robin Gareus e73fa8413e add a "reset all solo state" safeguard 2015-10-06 20:05:38 +02:00