rppicomidi / EZ_USB_MIDI_HOST

Add the Arduino MIDI Library API to the usb_midi_host TinyUSB MIDI Host driver
MIT License
9 stars 0 forks source link

EZ_USB_MIDI_HOST_PIO_example.ino does not Recognize MIDI Devices Attached to Host-Connector #4

Closed SoerenSofke closed 4 months ago

SoerenSofke commented 4 months ago

Hi,

I really appreciate this library, as it provides an excellent starting point for my own project, which is to create a MIDI message filter. I intend to instrument EZ_USB_MIDI_HOST on my Adafruit Feather RP2040 with USB Type A Host, connect a MIDI device to the USB Type A Host connector on the Feather and a PC with a software synthesizer on the USB Type C connector on the Feather.

However, I can not even make the given example, e.g. EZ_USB_MIDI_HOST_PIO_example.ino run as expected.

My development environment

Things that work as expected

Things that do NOT work as expected

I would expect the serial monitor to output diagnostic strings on onMIDIconnect and onMIDIdisconnect events whenever I connect or disconnect a MIDI device using the Feathers USB Type A connector. However, this is not the case even though my MIDI devices are powered and working. I have tested with two different MIDI devices, e.g. Arturia MicroLab and ESI Xjam without success.

How to proceed

Thanks, Sören

rppicomidi commented 4 months ago

@SoerenSofke Thank you for taking the time to report this. Please tell me what version of the Pico-PIO-USB library you are using. If you are using 0.6.0, please downgrade to 0.5.3. There is a known issue with 0.6.0

SoerenSofke commented 4 months ago

Dear @rppicomidi

Thanks for your quick reply. Indeed, version 0.6.0 of the Pico-PIO-USB library was active in my project, and I downgraded to version 0.5.3 following your suggestion. The situation improved in the sense that the MIDI controller connected to the USB Type A Host connector of the Feather board was now successfully recognized:

21:27:11.549 -> EZ USB MIDI HOST PIO Example for Arduino 21:27:11.549 -> Core1 setup to run TinyUSB host with pio-usb 21:27:12.065 -> MIDI device at address 1 has 1 IN cables and 1 OUT cables 21:27:12.808 -> C1: Note on#51 v=16 21:27:13.001 -> C1: Note on#51 v=0 21:27:13.130 -> C1: Note on#51 v=28 21:27:13.259 -> C1: Note on#51 v=0 21:27:13.422 -> C1: Note on#51 v=11 21:27:13.583 -> C1: Note on#51 v=0

On the other hand, there are some new findings that I would like to discuss in a new issue, if you agree.

Best, Sören

SoerenSofke commented 4 months ago

Solution

EZ_USB_MIDI_HOST, version 2.0.0 with dependent library Pico-PIO-USB library in version 0.5.3 recignizes MIDI devices connected to Adafruit Feather RP2040 with USB Type A Host.

Downgrade of Pico-PIO-USB library required.

rppicomidi commented 4 months ago

@SoerenSofke For what it is worth, even version 0.6.0 of the Pico PIO USB library works for me with Adafruit TinyUSB 3.3.1 if the "Tools->Optimize" menu item is set to "Optimize Even More (-O3)" The bug report says only -Os is known to not work.