Delay/latency compensation for MIDI output from an effect plug-in

MIDI events that are output from an effect plug-in do not have their sample position corrected for the plug-in’s own latency/delay.

If attempting to correct this by applying an offset to the MIDI sample position, sometimes this results in negative sample locations in the block (which I assume is incorrect/undefined behaviour). The MIDI output then becomes unreliable, with the events’ distance from the intended location fluctuating.

This behaviour has been consistent across multiple DAWs that have been tested, including Cubase 10. Plug-in using version 3.6.12 of the SDK.

So, I suppose there are two questions:

  • Is writing MIDI from effect plug-ins supported for VST3?
  • Is there anything that can be done to get accurate delay-compensated MIDI output from a VST3 effect plug-in?

Is anyone able to provide more information on this?

Should it be possible to get latency compensated MIDI output from an effect plug-in?

Hi. I`m also interested in writing MIDI out with VST3. Did you find a way?