AppleScript

QMidi can be driven via AppleScript. The available commands are also described in the QMidi suite dictionary (to view the dictionary, refer to the AppleScript help).