IMidiEffect


IMidiEffect

Inheritance: FUnknown <- IPluginBase <- IMidiEffect
Include File:  imidieffect.h

The IMidiEffect interface describes a MIDI effect.

Methods:


IMidiEffect::getCaps

Fill a MidiEffectCaps structure with the capabilities of the effect.

Capability flags:

kMEIsEditable Plug-In has an editor (requires IUIFactory)
kMEHasInspector Plug-In has an inspector view (requires IUIFactory)


IMidiEffect::configure

tresult PLUGIN_API configure (long usage)

Configure a MIDI effect for the specified use.

Usage types:

kMEUsageInsert Plug-In is used as a track insert
kMEUsageSend Plug-In is used as a send effect
kMEUsageOffline Plug-In is used for offline processing

Remarks:

Offline processing for MIDI Plug-Ins is not yet implemented in Cubase SX.


IMidiEffect::receiveEvent

tresult PLUGIN_API receiveEvent (IMEObjectID event)

Receives one MIDI event from the host application. You can determine if this is an immediate event ("MIDI Thru") by calling IMEAccessor::isImmediateEvent with the specified event handle.

Remarks:

If you need to queue the received event internally, you have to create a copy with IMEAccessor::duplicateMidiEvent. The typical action if you are not using an event is to pass it on to the output directly by calling IMEAccessor::passToOutput.
If you don't pass an event back to the host application, it will be swallowed. DO NOT destroy the event in this case!


IMidiEffect::playAction

tresult PLUGIN_API playAction (long fromPPQ, long toPPQ, bool immediate)

The effect should process the specified time slice from fromPPQ to toPPQ

Remarks:

The parameter immediate indicates the playing process for "immediate" (thru) events. IMidiEffect::playAction will be called two times for immediate and non immediate (playback) events, if the effect is configured as
IMEAccessor::setCanPlayInStop. The Plug-In programmer may be forced to handle both processes by using different queues for incoming events here. It is possible that events are created that have a start time which is already outside the playrange. The Plug-In must not "forget" them in the event queue.

  IMEAccessor::passToOutput
  IMEAccessor::passToOutputQueue


IMidiEffect::positAction

tresult PLUGIN_API positAction (long position)

The sequencer engine locates a new PPQ position.

Remarks:

Make sure to update your internal play positions!


IMidiEffect::swapAction

tresult PLUGIN_API swapAction (long position, long length)

The sequencer engine jumps to another PPQ position without restarting ("Cycle Mode"). The length parameter is the cycle length in PPQ.

Remarks:

Make sure to update your internal play positions!


IMidiEffect::stopAction

tresult PLUGIN_API stopAction (long position)

The sequencer engine has stopped at the specified PPQ position.

Remarks:

Make sure to update your internal play positions!


IMidiEffect::startAction

tresult PLUGIN_API startAction (long position)

The sequencer engine starts at the specified PPQ position.

Remarks:

Make sure to update your internal play positions!



Last Modified: