Prevent gawd-awfully bad things from happening with the new multithreaded
MIDI processing by putting a spinlock on the function that queues
messages for the UI.