Hi all,
I just started using JUCE about a month ago and its been great!
For my application, I wanted to create a new MIDIOut Device and display it in a comboBox along with the other available MIDI devices. What is completely perplexing me is that the created device always shows up as an Input Device and not Output!
If I open MaxMSP or Ableton Live or any other application, this new MIDIOut device shows up correctly however. I’m able to use the AudioDeviceManager to setDefaultMIDIOutDevice as this created device and it all works great! The only problem is I wanted to fill a comboBox with the list of devices but that is just not happening. Here’s the code snippet:
#if JUCE_MAC || JUCE_LINUX
midiOut = MidiOutput::createNewDevice("from MyApplication");
if(midiOut) {
midiOut->startBackgroundThread();
} else {
std::cout<<"Failed to create virtual MIDI Device"<<std::endl;
}
#endif
#if JUCE_WINDOWS
#endif
StringArray inputDevices = midiIn->getDevices();
StringArray outputDevices = midiOut->getDevices();
std::cout<<"Input Devices: ";
for (int i=0; i<inputDevices.size(); i++) {
std::cout<<inputDevices[i]<<", ";
}
std::cout<<std::endl;
std::cout<<"Output Devices: ";
for (int i=0; i<outputDevices.size(); i++) {
std::cout<<outputDevices[i]<<", ";
}
std::cout<<std::endl;
deviceManager.setDefaultMidiOutput("from MyApplication");
std::cout<<"Default MIDI Output Device: "<<deviceManager.getDefaultMidiOutputName()<<std::endl;
And the console output:
JUCE v2.0.40
Input Devices: from Max 1, from Max 2, from MyApplication,
Output Devices: to Max 1, to Max 2,
Default MIDI Output Device: from MyApplication
You see, it shows up as an “Input Device” and not output. But it does get selected when I use the set and get DefaultMidiOutput!
Could someone please point why?
Thanks

