Latency of Plugins

Continuing the discussion from First topic, what about the MOD Duo?:

Hi Daniel,

You mentioned that latency could depend on the plugins, although that is partically correct, it is also partially wrong. It does depend on the plugin - but only if the plugin does things like FFT processing.

To answer the question:
1> EQ, Distortion, Reverb, Delays, Echos, Wah, Flanger, Chorus, etc, do not add any extra latency, over the audio-processing latency.
2> Pitch Shifters (the FFT processing types and various other “time/frequency domain” processing algorithms) do have a latency - this is physics - you cannot have time and frequency, only a balance between the two. The reason the “octave doubler” feels slower, is that it requires X amount of time to analyse, track the pitch, and then generate a lower fundamental frequency. Although this can be optimized, cheated by guessing, or hidden by physco-acoustic models, the physics behind such pitch tracking is undeniable :slight_smile:

Hope that gives some insight into plugins and latency! Cheers, -Harry

2 Likes

Thanks, that definitely makes sense and clears things up. On one hand I think it would be nice to see how many milliseconds of latency each plugin adds (if any), assuming this info is encoded in the plugin’s metadata, but on the other hand it would add clutter to the UI and it’s perfectly fine to say “just use your ears” in deciding if a particular signal chain feels too laggy.

Quick question: do the EQ plugins add latency? I understand most EQs causes phase shifting, but some plugins minimize phase issues by compensating with added latency.

Most plugins (listed above) add NO latency at all. The audio processing system has a fixed amount of latency, and the plugins all run within this latency.

To summarize, NO LATENY ADDED PER PLUGIN :slight_smile: Sorry for shouting, but its important :wink:

Re EQs, What you are refering to is a “linear phase” EQ, which introduce phase-offsets using all-pass filters, to compensate for any frequency changes. Although these plugins will delay certain frequencies, they do not need to introduce a delay to the whole system. Using a linear-phase EQ is useful for certain use-cases, like taking a sample, and removing various frequency components from it - this process is often done with snare hits during a studio-production workflow. I have never heard of artists using an EQ live-on-stage, and demanding that the EQ be linear phase for reason X. (Do you know a reason why a linear-phase EQ is needed on stage?? Reply - I’m interested ; )

Cheers, -Harry

Right, since most add no latency, it might be kind of nice to see in the UI which plugins do.

Nope, I can’t think of any particular reason for linear phase EQ on stage, though I’m sure someone will come up with one eventually!

afaik only the MOD pichshifters and some convolution reverbs/amps have latency (~4 plugins from guitarix).

still, I agree having that info on the plugin is useful.
I’ll add it to our list of feature requests.

The exact latency is determined at runtime, but in LV2 the plugin should indicate that it will tell you what its latency is through a specially designated port. So you could at least show in the UI before you load it whether it has extra latency (though it’s possible that under certain conditions the latency is 0). Once loaded you could show the actual latency.

The guitarix amp’s/cab’s/reverb’s didn’t add latency, the convolution is done in real time (maybe 1 single sample latency may happen). The only one from guitarix with latency is the detune plugin, which usually report the latency to the host (latency depend on settings), but, unfortunately the latency report is broken at least in jalv, that’s why I’ve disable the report and only show the current latency in the UI. Thru, it isn’t shown in the MOD UI.

1 Like

What is the “fixed amount of latency”? And is that changing with firmware upgrades?

The latency is always the same, based on the current audio buffer size (128 frames by default on the MOD Duo).
What changes when adding new plugins is the amount of time you have left within that latency window.

In generic terms, if the latency is 5 milliseconds and a plugin takes 1 millisecond to run, the plugin is taking 20% of audio processing time.

The MOD Duo uses 128 frames per cycle since the very beginning, and has not changed.