[ardour-dev] latency compensation questions

Paul Davis paul at linuxaudiosystems.com
Thu Mar 31 17:23:43 PST 2005


>Someone recently mentioned connection graphs in Ardour but I don't
>recall if it was to do with latency calculations. Does Ardour adjust for
>latencies at every connection in the system? If not, for which subset of
>points are adjustments made?

what happens is this:

     * each track computes the total delay of a signal passing through
       it. these delays are caused by plugins or inserts (nothing
       inherent to the track will cause a delay).

     * plugins report their delay to Ardour. LADSPA plugins use an
       ad-hoc mechanism that has thankfully become moderately
       standardized. VST plugins provide a getInitialDelay() function
       as part of the API standard.

     * the session gets the worst track delay across the entire
       session, and tells all tracks that value. each track then
       computes the difference between its own delay and the worst
       value, and stores it.

     * when the transport starts "rolling", each track delays
       "starting" by this stored value.

     * result: the worst-delayed track starts playing immediately, all
       others follow by the appropriate amount.

     * the latency compensation is recomputed every time the transport
       stops, every time a plugin is added or (in)activated.

     * NOTE: it is not recomputed when plugin parameters are modified.
       If you edit a plugin in a way that changes its latency, Ardour
       will not recompute latency compensation until the *next* time
       the transport stops. This seems like a reasonable compromise,
       since in general, the transport is likely to be rolling while
       you're playing with plugin parameters.

>As an example, if I insert a gate on one track and trigger it from
>another track (either/both tracks may be running other plugins as well),
>can I expect the gate trigger and gate input to be in sync?

a gate has no inherent latency, so of course. 

latency is caused by plugin algorithms that inevitably cause signal
delay. the most common examples are algorithms required "windowed"
analysis like FFT, but there are plenty of others.

--p



More information about the Ardour-Dev mailing list