clap icon indicating copy to clipboard operation
clap copied to clipboard

document latency handling for events

Open Trinitou opened this issue 1 year ago • 1 comments

on Dischord someone had questions concerning latency handling for automation. At least I and @defiantnerd think we should document this better:

  • put the full explanation in latency.h. Some thoughts:
    • quoted from @defiantnerd's comment on Dischord: "Sending an event at timestamp n will result in audio at timestamp n+latency. [...] Latency is pre-delay-compensated. As every host does it (except FL Studio before version 9 or Magix Something (i forgot the name)) The host has to send the events that early so the plugin has time to apply it early enough for the announced latency."
    • I would add something like: the overall plugin latency applies to both audio and events together.
  • put some hint in all relevant places (like e.g. events.h, process.h, ...)
    • e.g. // for a discussion of latency see latency.h (as @baconpaul suggested)

Trinitou avatar Feb 07 '24 23:02 Trinitou

Might be just because of my Stretch stuff (which has separate "input latency" and "output latency"), but I think this could be explained neatly as the latency being equivalent to output-delay.

I would expect a plugin with latency to behave 100% equivalently to a zero-latency plugin with delays on its outputs:

Image

geraintluff avatar Jul 17 '25 06:07 geraintluff