summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
AgeCommit message (Collapse)Author
2018-08-06Fix track rename oddity, don't skip over current name.Robin Gareus
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-07-09move rt-stop to routeRobin Gareus
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-09Remove global declick APIRobin Gareus
De-click will be per disk-reader, latency compensated and buffer-size independent. Cue-monitoring should not be affected by de-click.
2018-02-14Auto-monitor == Cue for MIDI tracks.Ben Loftis
2018-02-11SoloSelection: libardour part.Ben Loftis
2017-12-31Process Panner Automatables (emit Changed)Robin Gareus
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-11-26Sidechain latency compensation - part oneRobin Gareus
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-04Clean up delayline API: don't use 'get_' for accessor method-nameRobin Gareus
2017-11-03Fix polarity-control size (and crash during audition)Robin Gareus
Also initialize new polarity-invert with gain 1.0, not inverted. Don't fade-in.
2017-10-31Fix set_loop() return value (amend 00a4ad)Robin Gareus
2017-10-31Relax assertion to allow rolling backwards into 0.Robin Gareus
2017-10-31Move Loop Location to ProcessorsRobin Gareus
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-31Small steps towards rolling backwards..Robin Gareus
2017-10-31Migrate to Polarity-inversion processor & fix proc positionsRobin Gareus
* 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-21'Route::tape_drive_controllable()' needs to return somethingJohn Emmas
2017-10-19US2400: map knobs for mixbus strips, when selected.Ben Loftis
2017-10-10add missing lock (for audition + mon section)Robin Gareus
2017-10-07For 'Route::send_pan_azi_controllable()' (when building non-Mixbus) I'm ↵John Emmas
assuming the intention was to return an empty object (i.e. similar to 'Route::send_enable_controllable()')
2017-10-05US2400: send_pan_azimuth lookup function (currently mb-only)Ben Loftis
2017-10-04Clean up State API:Robin Gareus
* 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-09-30Immediate-event/out-of-band injection update & tweak clearing buffersRobin Gareus
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-30NO-OP, re-order code, put all *roll() methods next to each other.Robin Gareus
2017-09-30First part of consolidating ::roll(), ::no_roll()Robin Gareus
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-30remove unused Route::_silentRobin Gareus
2017-09-30Remove Input-meter special-caseRobin Gareus
Now that disk is no longer topper-most but a processor, the special case is no longer needed.
2017-09-30Towards fixing no_roll()Robin Gareus
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-30Fix thinko in 8139becb -- route split cycleRobin Gareus
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-30Align punch in/out recording with latency-compensationRobin Gareus
2017-09-29Remove unused punch+preroll APIRobin Gareus
This API was not used, also superseded by record w/preroll.
2017-09-29Aux-Send Latency compensation, part 2 & code-consolidationRobin Gareus
2017-09-29Aux-Send Latency compensation, part 1: latent sourcesRobin Gareus
2017-09-29Delayline naming -- for debug purposesRobin Gareus
2017-09-29Ongoing work on latency compensationRobin Gareus
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-29Prepare removal of initial_delayRobin Gareus
2017-09-29clean up route header, NO-OP (except variable re-order)Robin Gareus
2017-09-29NO-OP: WhitespaceRobin Gareus
2017-09-29No more disk-reader roll-delayRobin Gareus
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-23Consolidate check for internal/non-removable processorsRobin Gareus
2017-09-22Enforce disk-reader to be after the disk-writerRobin Gareus
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-19attempt to fix roll delay logic by moving it into DiskReader (the only place ↵Paul Davis
it matters)
2017-09-19Fix nightly typos'n'thinkos: initial-delay calculationRobin Gareus
2017-09-19Amend c8a9b28d3 and 40aebce. Fix gain automation edge-cases:Robin Gareus
* drop Trim/Fader automation for bypassed processor * Trim/Fader automation for Busses is always active when rolling
2017-09-18remove getter for Amp::_apply_automation_gain; reset member to false after ↵Paul Davis
use, and true after ::setup_automation_gain runs successfully
2017-09-18consolidate roll methods into Route::roll()Paul Davis
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-19Various updates and fixes for Latency CompensationRobin Gareus
* 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-18Disk IO "pre-fader" means pre-trim, not post-trimPaul Davis
2017-09-18globally change all use of "frame" to refer to audio into "sample".Paul Davis
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-18NO-OP: mark various state property names as explicitly non-translatedPaul Davis
2017-09-18move disk_{writer,reader} into Route to allow for simple, sensible ↵Paul Davis
implementation of DiskIOPoint
2017-09-18auditioner always runs at normal speed, independent of transport speedPaul Davis