Handling midi events from Ableton Live with an Audio Application

Hello there!

I try to build an audio application from the tutorial “Handling midi events”.
I would like to route midi data from Ableton Live to this audio application.

However, “Ableton Live” does not appear in the input menu of the application.
Moreover, my application does not appear in live in the “MIDI TO” menu.

I’m sure there is a basic explanation for this behavior but I don’t find it.
Why Ableton Live is not returned by the MidiInput::getAvailableDevices();?
And why my app is not visible in the menu of Ableton Live ?

I work on MacOSX by the way.

Thanks by advance for your answer!

Both your application and Ableton can receive/send midi from/to devices, but are not devices themselves.

On Mac OSX you can use the IAC driver to route midi, this should get you started:

Thanks for your answer. I will try that.

I am still wondering why other applications that I use can be seen directly by Live as a “device” (with the “MIDI TO” menu) but not mine.
Is there a way to permanently declare a JUCE application as a midi device?

EDIT: To be more precise: in Apple Core Midi, there is a MIDIClientCreate function, that allows to declare the application as a midi device. Is there an equivalent in JUCE?

EDIT2: It seems I have to open virtual midi ports in the application: https://forum.juce.com/t/virtual-midi-ports/16596

I tried this code (in a framework very close to that of the “handling midi events” tutorial).

// Make new virtual MIDI INPUT device
auto virtualMidiInputDevice = MidiInput::createNewDevice("Midi In", this);
if( virtualMidiInputDevice == nullptr ) {
      std::cout << "Couldn't create virtual midi IN port\n";
} else {
      std::cout << "Create virtual midi IN port\n";

However, the virtual port does not appear in Live.
Do I have to do something else? (With the deviceManager maybe?)

By the way, it works with a virtual MIDI bus, but it could be cleaner to make the virtual port from the app (from Mac users at least).