MidiOutput device not visible in Mainstage / Logic


#1

Hi there!

My GUI app creates a MidiOutput device “MyDevice”. The device is visible in Reaper, but invisible in Mainstage (and therefore probably Logic too).

My code is essentially:

ScopedPointer<MidiOutput> myDevice; // Declaration in .h

myDevice = MidiOutput::createNewDevice("myDevice"); // Initialisation in .cpp constructor

Any pointers would be much appreciated… Thank you!


#2

To the best of my knowledge, a normal AudioUnit (i.e. not an AUv3) can not have a MIDI output that is visible in Logic. This is a function of Logic, not AudioUnits.


#3

Thanks crandall1, as it turns out we did find a way to register the MIDI output in Mainstage.
In CoreMidiHelper::setUniqueIDForMidiPort() (in juce_mac_CoreMidi.cpp), we changed the line

CHECK_ERROR (MIDIObjectSetStringProperty (device, kMIDIPropertyUniqueID, portUniqueId.toCFString()));

to use the constant kMIDIPropertyDeviceID.

This was my colleague’s solution and neither of us understand it so please don’t ask us for explanations. But it works (at least in MainStage).

If any JUCE team can shed light on this we would really appreciate it! Thank you!


#4

if you want your standalone application to act as an “external MIDI” device for Logic or Mainstage to send midi messages to, you need to use MidiInput::createNewDevice()

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

If you want your standalone application to generate MIDI data that your DAW can receive, you use MidiOutput::createNewDevice()
https://juce.com/doc/classMidiOutput#a04169caa4a0c533c57a55357f2e13cc8