IMEAccessor::createMidiEvent
IMEObjectID PLUGIN_API createMidiEvent (
MidiStatus type,
long data1,
long data2,
long length)
Creates a new MIDI event with the specified status and data
bytes of length length (in PPQ).
In case of success, the return value is the handle of the new event. Otherwise the function returns NULL.
Remarks:
All events created inside the Plug-In have to be destroyed with
IMEAccessor::destroyEvent!!!
You can determinte the selected MIDI channel for this effect with
IMEAccessor::getMidiChannel.
You have to bitwise-OR the status byte with the MIDI channel (see the following example) or call
IMEAccessor::setChannel afterwards.
If the Plug-In is used as a send effect and no channel is selected in the host application ("Any"),
the Plug-In events are corrected automatically.
IMEAccessor* accessor; // a valid accessor reference
char status = (char)kNoteOn;
long channel = accessor->getMidiChannel ();
if(channel > 0)
status |= (channel & 0xF);
IMEObjectID event = accessor->createMidiEvent ((MidiStatus)status, ... )
IMEAccessor::createSysexEvent
IMEObjectID PLUGIN_API createSysexEvent (unsigned char* data, long size)
Creates a new SysEx ("System Exclusive") event with the specified data and size.
In case of success, the return value is the handle of the new event. Otherwise the function returns NULL.
Remarks:
The event has to be destroyed with
IMEAccessor::destroyEvent!