I am writing C++ software in MacOS that can take input from MIDI devices and perform actions based on the input. Another piece of software, QLab, can send MIDI messages to MIDI