This project has moved and is read-only. For the latest updates, please go here.

Purpose of VstMidiEvent isRealtime constructor parameter?

Topics: Midi, VST.NET Framework
Feb 15, 2014 at 11:16 PM
Edited Feb 15, 2014 at 11:16 PM
Hi Mark,

Could you tell me the purpose of VstMidiEvent isRealtime constructor parameter?
In which scenario should I use Realtime?

public VstMidiEvent(int deltaFrames, int noteLength, int noteOffset, byte[] midiData, short detune, byte noteOffVelocity, bool isRealtime);
Feb 16, 2014 at 7:38 AM
Hi Yuri,

IsRealtime is set by the host when the Midi information is played in realtime. If Midi is played from a recorded track the IsRealtime property would be false.

I don't think you should use it as a plugin, so always pass false into the constructor.

Hope it helps,
Feb 16, 2014 at 6:35 PM
Thank you for the quick answer. My host buffers realtime events and send them just before calling processreplacing but it seems like no plugins use it in a useful way so I won't set this flag as you suggested.
Feb 16, 2014 at 6:54 PM
If you buffer the events no longer than for one call to ProcessEvents, than I would suggest you do set the flag - it's hardly any trouble for you anyway.

Just follow the spec - even when the plugins you use do not appear to need it.