What is latency?
Some types of signal processing introduce an unavoidable, but unwanted time-delay to an audio signal. This unwanted delay is a result of the time taken to do complex and/or repeated calculations, and is referred to as ‘latency’.
Latency should not be confused with deliberately introduced time-delays to signals: e.g. reverb and echo plug-ins.
Examples of latency.
Examples of processing that introduces latency include spectral effects, look-ahead limiters, oversampling, and sometimes filters. This latency is a side-effect of the processing, and we would naturally prefer to experience the effect without any unwanted latency.
‘Latency Compensation’ aka PDC (Plug-in Delay Compensation) is a method of hiding this unwanted latency.
How does Plug-in Delay Compensation work?
Plug-ins can report their unwanted latency to the host DAW. The DAW can then compensate for this by time-shifting the audio on the plug-in’s track. Shifting a track’s playback earlier in time can compensate for a plug-in that adds latency to the signal. The result is as if the plug-in added no latency.
Note: Latency compensation works only on pre-recorded material, it is not possible to time-shift live audio.
For this reason, you will sometimes hear latency from your DAW when you are monitoring a track while recording it, but you will not hear the latency later when you playback the track.
If delay compensation works inside a DAW can I use it to stop phasing and other side effects in a VST?
Yes if Plug In Delay compensation is enabled, SE can introduce delay lines to “remove” the latency effects. This only works for modules which report the delay to SE however.
If you’re not using Delay compensation there is a little trick with the SINC filters. The latency is purely down to the number of taps, so you could use this little trick:

Because the two filters have the same number of TAPS set the latency will be identical, the Green low pass filtered signal is now re-aligned with the Yellow filter set with a cutoff of 10kHz allowing the original pulse waveform through to be mixed with the original.
WARNING: Changing latency will interrupt and restart the plugin, and possibly other plugins running in the DAW. It is a disruptive operation. You really need to minimize the chances of this happening. For example, it’s best not to expose to the DAW for automation any parameter which might change the latency. If you can get away with a fixed-latency (in the XML), prefer that option.
Latency reporting to the DAW is currently supported in VST3 plugins. How it works is the plugin adds up the cumulative latency of all its modules and reports the total latency to the DAW.
Which modules introduce latency?
SynthEdit modules that produce latency include:
1) ‘Sinc Low-pass Filter’, and ‘Sinc High-pass Filter’.
2) The oversampling system.
3) All the feedback modules.
4) The ED Spectral Synthesis modules.
5) The ED Pitch shifter.
6) The “Patch Points”, that’s right they can introduce latency, there’s a reason for this: they have a feedback module built in. This only becomes active if you use patch points to create a feedback loop, so in normal use they won’t cause any latency, but if you create a feedback loop- latency!
These modules report their latency to the SynthEdit plug-in runtime and SynthEdit plug-ins in turn can report that latency to the DAW.
You can enable and disable this latency reporting when exporting your plug-in from SynthEdit. The options are:
1) ‘Off’,
2) ‘Full’ (On) and
3) ‘Constrained’. ‘Constrained’ means that the plug-in will compensate for latency up to a point (5ms), but not more. This prevents the user from experiencing too much latency when monitoring a live audio signal or instrument.
Note: Too much latency makes it difficult to play a software instrument with good timing. 5ms is enough compensation for most situations anyhow. ‘Full’ compensates latency up to 1000ms. ‘Off’ does not compensate for latency at all.
When should I use latency compensation?
Basically for effects modules. It’s not needed for a synthesizer/instrument plug in as you are generating the signal, not introducing an unwanted delay to an existing audio signal that will cause timing errors in the DAW.
Can latency affect the audio in my plug in?
If you are using two different filters in parallel, or mixing wet and dry filtered signals then yes it can in the form of unwanted “phasing” effects. The structure below can illustrate this quite well.

If we use an oscillator as a white noise source and mix the filtered and unfiltered signals, there is a pronounced notch (or band reject) effect going on. If we vary the filter frequency it doesn’t change the notch frequency much, but try changing the number of taps, and the notch frequency changes. Why is this? Wee by increasing the number of “taps” we are increasing the number of calculations and making the CPU do more work, so the latency increases- and with that the notch frequency changes. We can see the delay effect more clearly with a sine wave in the scope in the first example we have the default 171 taps (green i s the direct signal, yellow is filtered).
In the second example we have increased the number of taps to 571, and you can see the noticeable difference in timing between the two signals.

Leave a Reply