Record injected MIDI messages

Thanks!

From reading this thread:

I got the impression that this is not the purpose of Virtual MIDI Device?! Specifically:

I mistakenly assumed that the VirtualMidiInputDevice class would allow me to pass midiMessages that I generate myself to a track, as opposed to a physical device.

That is exactly what I want to do!

I’m sorry if it’s just me being confused but don’t these answers seem to contradict one another?

Is there any example of VirtualMidiInputDevice being created and used in this fashion?