Steinberg MIDI Effect API


This section describes the Steinberg MIDI Effect API, introduced with Cubase SX. A MIDI effect can be used as an insert effect or a send effect on a MIDI track, to transform and generate MIDI data in realtime. Typical MIDI effects are Arpeggiator, Echo, etc.

The Steinberg MIDI Effect API is completely based on the VST Module Architecture, described earlier. All special interfaces used for MIDI effects can be found in imidieffect.h.

Plug-In side:

IMidiEffect The MIDI effect
IGenericPlugController Parameter interface
IUIFactory
MIDI effect editor (optional)
IPersistentChunk
Preset storage (optional)

The SDK provides a class CMidiEffect which already implements all required interfaces. You should derive your MIDI effect from this helper class.

Host side:

IMEAccessor Create and manipulate MIDI events, get context information
IMasterTrackInfo
ITransportInfo
Get detailed context information (tempo changes, time signature, ...)
IHostApplication
Standard host interface

Interface Overview

The MIDI effects work directly on the MIDI data structure of the host application. From the effects's point of view, MIDI events are of type IMEObjectID, which in C++ simply is a void pointer. To create or manipulate an event, you have to pass this "event handle" to the acccess methods of IMEAccessor.

A general rule for the lifetime of a MIDI event is that you have to destroy events yourself, if they were created by yourself (see IMEAccessor::destroyEvent).

All timestamps are expressed in PPQ (ticks per quarter note), which ensures that events created by a MIDI effect are always "in time". The timebase is currently 480 PPQ, it can be obtained via IMasterTrackInfo::getPpqBase. To convert timestamps e.g. from PPQ to seconds, you can use IMasterTrackInfo::ppq2seconds.



Copyright ©2004 Steinberg Media Technologies GmbH. All Rights Reserved.
Last Modified: