MIDI Libiary 5.0.2 a HID USB instance?

I am using the latest version of the MIDI.h library 5.0.2. Documentation here at Arduino MIDI Library: /Users/franky/dev/playground/FortySevenEffects/arduino_midi_library/src/serialMIDI.h File Reference I know this only says it is 5.0.1.

I have looked at the DualMerger example that comes with the library. I am fine on creating an instance for the hardware serial using:-
MIDI_CREATE_INSTANCE(Serial_, SerialUSB,  midiA);
And I can create a USB instance by using:-

MIDI_CREATE_INSTANCE(Serial_, SerialUSB,  usb);

But this instance requires Hairless, or some other helper app, to convert the serial input into a HID MIDI device.

Does anyone know how to create an instance that appears as a HID MIDI device so I will not have to use Hairless? I am using an Arduino Micro.

Thanks

AFAIK, the fortyseveneffects MIDI library itself only supports serial MIDI. For USB MIDI you have to use different libraries, for the Arduino Micro, you can use the MIDIUSB library. There’s also an adapter between MIDIUSB and fortyseveneffects MIDI, if you insist on using that API: GitHub - lathoub/Arduino-USBMIDI: Allows a microcontroller, with native USB capabilities, to appear as a MIDI device over USB to a connected computer.

An alternative would be to use the Control Surface library I maintain, it provides a MIDI API that can run on any transport layer (Serial MIDI, USB MIDI, Bluetooth MIDI, etc.). The functionality is very similar to the fortyseveneffects library, Control Surface includes a lot of high-level functionality for MIDI controllers, but it also has a full-fledged MIDI module, you can use that directly without using the MIDI controller-related stuff.
The main advantage is that it provides a uniform MIDI API that runs on all Arduino boards and Teensies (e.g. on an Arduino Micro, it’ll use the MIDIUSB library, on Teensies, it’ll use the Teensy Core MIDI functions, etc.).
See the full list of MIDI interfaces, you’ll probably be most interested in the USBMIDI_Interface and the HardwareSerialMIDI_Interface.

MIDI merging can easily be done using MIDI Pipes, as shown in this example. You can do it manually as well, of course. Simply sending MIDI is demonstrated in this example, using these functions; receiving MIDI is demonstrated in this example.

Pieter

Thanks Pieter.

There's also an adapter between MIDIUSB and fortyseveneffects MIDI, if you insist on using that API: GitHub - lathoub/Arduino-USBMIDI: Allows a microcontroller, with native USB capabilities, to appear as a MIDI device over USB to a connected computer.

Yes that is what I was trying to use but I couldn't get the USB HID MIDI out of it and I thought I should have.

MIDI merging can easily be done using MIDI Pipes,

I am not doing that, basically it is the opposite. I am taking in MIDI from a serial port, processing it and outputting on a serial port. However, I would also like the option of sending the output into my laptop so I could also use this project with Ableton and Garage Band as well. This works but I have to install hairless first. I was looking to avoid that.