Virtual MIDI Ports?


#1

Is there an easy way to add the ability for a JUCE app to act as a Virtual MIDI destination?   I was peering thru the source-code for SNOIZE's Midi Monitor app, and their app can act as an External MIDI device in logic, meaning you can route Midi from logic tracks into that other program. I'm wondering if there is an easy way to do this in Juce. 


#2

MidiInput::createNewDevice is what you're looking for. Unfortunately, Windows audio/MIDI is really weak so it doesn't support creating virtual MIDI ports without a separate driver (I'm not aware of any solid ones) to actually create the ports first. But since you're talking about OS X this will work fine.

https://www.juce.com/doc/classMidiInput#af6053fd48f64d92cb2efb54c266d10c5

 


#3

yeah, windows users get the shaft.   that's why i develop on MAC lolol :-P

 

I found this: https://github.com/kode54/BASSMIDI-Driver 


#4

I added this object to my project.   my MCC subclasses MidiInputCallback which the MidiInput needs, and the application shows up in Logic as a Midi Output destination.  but when I send midi from Logic into my app, it doesn't show up.   Any idea what the next step is?    My app responds to regular midi controllers just fine.  However, those devices get opened in my app before the MCC is used as the MidiInputCallback pointer in MidiInput::createNewDevice. 


#5

Figured it out!!!  :-D :-D

 

virtualMidiInputDevice = MidiInput::createNewDevice("Chordie midi In", mcc);

if( virtualMidiInputDevice == nullptr ) {
     std::cout << "couldn't create virtual midi IN port for Chordie\n";
} else {
     virtualMidiInputDevice->start();
}