Just inherit from MusicDeviceBase and redefine HandleMidiEvent, it will be just like processEvents when events are VstMidiEvent except that data has been already split in AU.
Indeed inherit from MusicDeviceBase. Also new in Tiger, is the ability to automatically map MIDI signals with parameters. Even duplicate signals can be mapped to the same parameter.
If you turn on this feature in your AU using the build flag: -DCA_AUTO_MIDI_MAP=1 , then your HandleMIDIEvent function will look like the following:
OSStatus YourAU::HandleMidiEvent( UInt8 inStatus, UInt8 inChannel, UInt8 inData1, UInt8 inData2, long inStartFrame) { return AUMIDIBase::HandleMidiEvent(inStatus, inChannel, inData1, inData2, inStartFrame); }
Then AUMIDIBases' HandleMidiEvent function will automatically make the parameter change calls, notifications etc. (Via its CAAUMIDIMapManager).
-Cynthia
|