To receive MIDI data from a real source (or virtual destination)
you must register yourself as receiver using the endpoint's
addReceiver: method.
Having done this, the endpoint will call the
processMIDIPacketList:sender: method of the receiver
whenever new MIDI data becomes available.
Call the endpoint's removeReceiver: method when you
no longer want to receive MIDI data.
The following shows the basics of receiving MIDI data:
[myEndpoint addReceiver:self];
- (void)processMIDIPacketList:(MIDIPacketList*)myPacketList sender:(id)sender
{
// Handle the MIDI data in here
}
[myEndpoint removeReceiver:self];