VST Events


VstEvent

struct VstEvent;

A generic timestamped event.

long type; Any of the following constants :
kVstMidiType midi event, can be cast as VstMidiEvent
kVstAudioType audio
kVstVideoType video
kVstParameterType parameter
kVstTriggerType trigger
long byteSize; of this event, excl. type and byteSize
long deltaFrames; sample frames related to the current block start sample position
long flags; generic flags, none defined yet (0)
char data[16]; size may vary but is usually 16

VstMidiEvent

struct VstMidiEvent;

To be casted from a VstEvent.

long type; kVstMidiType
long byteSize; 24
long deltaFrames; sample frames related to the current block start sample position
long flags; none defined yet
long noteLength; (in sample frames) of entire note, if available, else 0
long noteOffset; offset into note from note start if available, else 0
char midiData[4]; 1 thru 3 midi bytes; midiData[3] is reserved (zero)
char detune; -64 to +63 cents; for scales other than 'well-tempered' ('microtuning')
char noteOffVelocity;
char reserved1; zero
char reserved2; zero

VstEvents

struct VstEvents;

A block of events for the current audio block.

long numEvents;
long reserved; zero
VstEvent* events[2]; variable

wantEvents (->host)

virtual void wantEvents (long filter = 1);

Asks the host to send VstEvents, as would request an instrument. This call can't be issued at construction time, it should be done in the resume method instead.

filter Currently ignored, midi channel data only (default).

See also :


sendVstEventsToHost (->host)

bool sendVstEventsToHost (VstEvents* events);

See discussion of VstEvents, and Steinberg products implementation issues.

events A pointer to a VstEvents structure.
return
true : Success.
false : Failure.

processEvents (->plug)

virtual long processEvents (VstEvents* events);

Override this to evaluate VstEvents that may be sent to your plug due to a wantEvents request.


Copyright ©2003 Steinberg Media Technologies GmbH. All Rights Reserved.