With Core Audio, Core MIDI and OpenAL
That sends note on/off messages
Playing back synthesized MIDI notes coming in from a MIDI Controller