The MIDI Manager is a singleton object that keeps track of the state of the MIDI system and any connected MIDI devices. It provides methods for querying that state as well as assorted utility methods.
The shared MIDI Manager instance can be returned by calling:
PYMIDIManager* manager = [PYMIDIManager sharedInstance];