MidiTest example: Programmatically Created Virtual MIDI Output device listed as Input (OSX)

Hi

I already opened an issue on GitHub referencing the MidiTest example project.

I’ve seen that there is this other forum threads related to this behaviour.

Shall the getDevices (input / output) routines be adapted to treat the created Virtual MIDI Output as a special case?

Regards.

What special case behaviour do you want?

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.

I’ll handle that in my code.

Regards.

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.

I mean the possibility for the user to choose to send MIDI to that Output by simply clicking / tapping on its list item.

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).

Thanks for your clarifications!