-
Notifications
You must be signed in to change notification settings - Fork 1.3k
usb_midi Device Name #4191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Sorry I know I'm a bit late to this conversation, but I thought I would add this in case it helps anyone else. |
I also wanna change the midi device name but it seems like this approach doesn't work anymore. Any tips? |
I've added some more instructions. Hopefully they should help. Let me know if you get stuck! |
@ToxicTiger901 Tried again and it worked. Thanks a bunch for the detailed update! Still would love a way to just define a name in the Python code, but I don't know if that is even possible without help from Adafruit. Maybe something worth to consider @ladyada ? Totally understand if it's too hard |
Overall USB names will be configurable with: #6247 (Testing would be helpful.) You may also be able to provide a new USB descriptor for the MIDI with: https://learn.adafruit.com/customizing-usb-devices-in-circuitpython |
Is this now included in 8.0.0 Beta 6? |
@ToxicTiger901 #6247 allows setting the name of the whole device, but not individual interface descriptor names. So it will not help for what you want. We haven't yet added the ability to modify the interface names. You can do a custom build and change this: circuitpython/shared-module/usb_midi/__init__.c Lines 182 to 183 in 4cc7466
|
Thanks. I think I understand now. |
My only slight confusion here is when I configure a Midi Device using standard CircuitPython firmware (see my example Python code above) it comes up as CircuitPyton Audio,not CircuitPython MIDI? |
MIDI is part of the USB Audio specification, which is confusing. It's a particular kind of "audio" device. |
sorry for my newb question. Is there a "simple" way to rename the usb_midi device name? i tried to modifing the .uf2 file with an hex editor: i tried supervisor.set_usb_identification("Herve Bi", "Herve Bi") but no more result. any help appreciate circuitPython : 8.2.6 |
@mrbbp Which name exactly do you want to change? What is the current name and what do you want to change it to? |
@dhalbert
i would like to replace this name with a custom name, the name of the box ("Hervé Bi"). regards |
Right now that name is not settable from CircuitPython, but you can make a custom build and change the name. The names that are fixed at compile time are here: circuitpython/shared-module/usb_midi/__init__.c Lines 182 to 185 in 1c0155c
|
hello, i retried with a new rp2040 and the custom (renamed) |
You may need to somehow "forget" the device on the Mac. macOS may have cached information about the device. Have you tried rebooting the Mac? EDIT: I looked for a way to have macOS forget a USB device, but I couldn't find something a few minutes of searching. On Windows this is possible in the Device Manager. Also could you look in BOOT_OUT.TXT on the "old" RP2040 to make sure you have the new custom build loaded? |
#8989, which allows renaming the HID interface, is a potential model for code to do this for MIDI. |
Fixed by #9146. |
As mentioned above the Mac seems to cache the old name. To forget the old name on the Mac I seem to be able to:
I called usb_midi.set_names() from boot.py per the instructions on https://docs.circuitpython.org/en/latest/shared-bindings/usb_midi/ . I had to use supervisor.set_usb_identification() in boot.py to change the USB Device name of the Pico per these instructions https://docs.circuitpython.org/en/latest/shared-bindings/supervisor/index.html#supervisor.set_usb_identification |
Device name should be "CircuitPython Midi" not "CircuitPython Audio" as this is a midi interface.
It would also be useful if this could be overridden with a custom device name.
The text was updated successfully, but these errors were encountered: