When you create a virtual output device the object you get back is a MIDI output - you can write data to it. There shouldn’t be any confusion here.
Once you have created the device, if you query the operating system for available devices, you will see the same virtual MIDI device with data available to be read from it - this is a MIDI input.
@t0m I see, thanks for confirming that the I/O devices querying is from the OS perspective and not from the App perspective.
My point is that in the MidiTest example (and other applications) the created MIDI output should not be shown as an input to the user, but just as a possible output.
What do you mean when you say “from the App perspective”? The only way to use the device as an output is via the object you have created in your code - you cannot use it as a conventional MIDI output, so what the example is showing is correct.
But you can’t use it as an output (in the same way as all of the other devices listed there)! You can, however, use it as an input!
I’m not sure I’m stressing this enough: the only way you can use the created device as an output is by directly manipulating the object you have created - you can’t connect to this device as an output any other way. As soon as you create it it’s available to everywhere on the system (including your app where you created it) as an input device.
Yes, I intend to directly manipulate the created MidiOutput object.
As you say it already appears as an input in other MIDI enabled software (including MidiTest itself, of course).