Windows doesn't recognize MIDI USB device rpi pico w (TinyUSB)

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
fapplin
 
Posts: 31
Joined: Mon Sep 23, 2013 8:47 am

Windows doesn't recognize MIDI USB device rpi pico w (TinyUSB)

Post by fapplin »

Hi,

I used the following 2 lines in some code in my Raspberry Pi Pico (not real names). It is a MIDI USB device. I wanted to use a device name for my device other than "Pico W".

Code: Select all

USBDevice.setManufacturerDescriptor("Fubar Mfg                        ");
USBDevice.setProductDescriptor     ("FubarDevice                    ");
On my linux machine, if I bring up a MIDI application (Surge XT as an example) - I see FubarDevice listed as a MIDI input I can use. I can do the same on an Android device.

But, if I plug my device into a Windows machine - MIDI applications don't even see the device. If I comment out those 2 lines of code, recompile, and place the .uf2 file on the Pico device then Windows will see the MIDI device as Pico W.

Does anyone have an idea of how I can get Windows to recognize my device name for my MIDI USB device?

Additional info.

OK. this is kind of strange. If I change

Code: Select all

USBDevice.setManufacturerDescriptor("Fubar Mfg                        ");
to

Code: Select all

USBDevice.setManufacturerDescriptor("Raspberry Pi Pico W             ");
and I go to the Sound, Video, and game controllers in the Device Manager. I see the device with the changed device name (FoobarDevice). If I look at the Properties and then Driver/Driver Details. It has the exact same driver files as it would if it showed up as the device name "Pico W", but the MIDI applications still don't see the device.

User avatar
MrTetris
 
Posts: 3
Joined: Sat Apr 01, 2023 3:46 am

Re: Windows doesn't recognize MIDI USB device rpi pico w (TinyUSB)

Post by MrTetris »

Hi All.

Have a similar issue with Pico, tinyUSB and MIDI over USB into a Windows 10 DAW.
Wondering if anyone can help.

I have got a complex midi keyboard running very smoothly & successfully on Teensy, and kids wanted a basic mini version, so I figured I'll build it with them on Pico. Did not realise that Pico experience is not nearly as smooth.

If I understand correctly, the only way to realise MIDI over USB for Pico is to use it via Adafruit tinyUSB, but I can't get Windows PC to recognise even the basic MIDI example code included in the library. Haven't tried it on the Linux machine yet.

So if I compile midi_test.ino example in Arduino IDE and load it onto the Pico, windows does not see it as a MIDI device.

Pico flashes the led correctly for a wee while, then changes to 4 short flashes, 4 long flashes, which is not a behaviour that's written in the code... Odd.


Any thoughts on what I'm doing wrong are very welcome.

Thank you.

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: Windows doesn't recognize MIDI USB device rpi pico w (TinyUSB)

Post by adafruit_support_mike »

The RP2040 can certainly do MIDI.. this tutorial is one example:

https://learn.adafruit.com/hexpad

Compare the code you're using to the code in the tutorial and see if that gives you any clues. Alternatively, you might just re-code the simplified version based on the code in the tutorial. Whatever works to give you a starting platform is okay.

User avatar
MrTetris
 
Posts: 3
Joined: Sat Apr 01, 2023 3:46 am

Re: Windows doesn't recognize MIDI USB device rpi pico w (TinyUSB)

Post by MrTetris »

Thank you for the reply.

The link uses some python compiler, while I'm using Arduino IDE with C++ code in it with the TinyUSB library.
I'm wondering if that is what's causing the problem (IDE settings maybe? don't know) but since my other code is C++ and I'm no snake charmer, it makes no sense for me to switch.
The Teensy build runs just fine on the same PC, but I'm using Teensy-specific MIDI support there. Nevertheless, it shows that the PC and the DAW are happy to accept a midi keyboard.

Just to clarify the previous post, even flashing the tinyUSB example from the library does not work, as the pico is not recognised by the windows PC as a midi device when plugged in.
https://github.com/adafruit/Adafruit_Ti ... /midi_test

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: Windows doesn't recognize MIDI USB device rpi pico w (TinyUSB)

Post by adafruit_support_mike »

Are you using the earlephilhower RP2040 core?

https://github.com/earlephilhower/arduino-pico

That's the only one with TinyUSB support that we know to be compatible and working.

User avatar
MrTetris
 
Posts: 3
Joined: Sat Apr 01, 2023 3:46 am

Re: Windows doesn't recognize MIDI USB device rpi pico w (TinyUSB)

Post by MrTetris »

Thank you.

Reinstalled the core & the tiniUSB library, and it all works now!
Now sure what happened with the previous installation.

Thank you for your help.

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: Windows doesn't recognize MIDI USB device rpi pico w (TinyUSB)

Post by adafruit_support_mike »

Heaven only knows.. there are lots of moving pieces, and a single error can lead to all sorts of trouble.

Glad to hear you got it working. Happy hacking!

User avatar
fapplin
 
Posts: 31
Joined: Mon Sep 23, 2013 8:47 am

Re: Windows doesn't recognize MIDI USB device rpi pico w (TinyUSB)

Post by fapplin »

This is how you make Windows recognize your device name.

boards.local.txt¶

Introduced in Arduino IDE 1.6.6. This file can be used to override properties defined in boards.txt or define new properties without modifying boards.txt. It must be placed in the same folder as the boards.txt it supplements.

See:

https://arduino.github.io/arduino-cli/0 ... nt-or-tool

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”