MIDI Output from a Standalone App

You would need to send the MIDI messages directly with a MidiOutput instance.

Adding MIDI messages in the audio callback makes sense when you need to pass timed MIDI events between audio processors, or to/from a plugin host.