You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Sorry I know I'm a bit late to this conversation, but I thought I would add this in case it helps anyone else.
It's really easy to change the device name if you want to. Just download the Circuit Python .UF2 file and using a Hex file editor (I used PSPad) search for "CircuitPython Audio". You can then edit the Text, save the changes and install your modified version of the .UF2 file.
The Pi Pico should then appear with the new name you gave it.
Download CircuitPython (I’m currently using 7.3.1)
Open the .UF2 with a HEX editor (I use PSPAD which is a free text editor)
Go to line 151100 (or search for “CircuitPython Audio”):
Change the text for example to “MIDI Pedalboard”. I haven’t experimented but my guess is that you will be limited to 19 characters. Fill any unused characters with 00Hex :
Save the changes to the .UF2 file
Holding in the BOOT button on your Pi Pico and plug in the USB cable, then copy the edited .UF2 file to the Raspberry Pi Pico as you would normally to install CircuitPyton.
As a basic example I then put the following code in the code.py file:
import board
import digitalio
import usb_midi
import time
import adafruit_midi
from adafruit_midi.note_off import NoteOff
from adafruit_midi.note_on import NoteOn
@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
@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:
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?
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.
Is there a "simple" way to rename the usb_midi device name?
by default it named CircuitPython usb_midi.ports[x]
i tried to modifing the .uf2 file with an hex editor:
i tried with a different length name and the uf2 is not working (no boot)
i tried a second time with the same number of char (13), the uf2 seems to work but the device has the same name CircuitPython....
i tried supervisor.set_usb_identification("Herve Bi", "Herve Bi") but no more result.
i'm not sure about my syntax
@dhalbert
i build a small box with 2 rotatives pot on it and a rp2040 to send midi datas.
I use the pot to have a physical interface to manupulate things in Processing.org
in my sketch the device listed is CircuitPython usb_midi.ports[0]
Available MIDI Devices:
----------Input----------
[0] "Real Time Sequencer"
[1] "CircuitPython usb_midi.ports[0]"
----------Output----------
[0] "Gervill"
[1] "Real Time Sequencer"
[2] "CircuitPython usb_midi.ports[0]"
i would like to replace this name with a custom name, the name of the box ("Hervé Bi").
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:
hello, i retried with a new rp2040 and the custom (renamed) .uf2. Now the device show the new name. I retstart my mac and plug the old rp2040 with custom device but it don't show the good name.
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?
Activity
ToxicTiger901 commentedon May 29, 2022
Sorry I know I'm a bit late to this conversation, but I thought I would add this in case it helps anyone else.
It's really easy to change the device name if you want to. Just download the Circuit Python .UF2 file and using a Hex file editor (I used PSPad) search for "CircuitPython Audio". You can then edit the Text, save the changes and install your modified version of the .UF2 file.
The Pi Pico should then appear with the new name you gave it.
jwktje commentedon Jul 19, 2022
I also wanna change the midi device name but it seems like this approach doesn't work anymore. Any tips?
ToxicTiger901 commentedon Jul 19, 2022
It should still work.
Download CircuitPython (I’m currently using 7.3.1)

Open the .UF2 with a HEX editor (I use PSPAD which is a free text editor)
Go to line 151100 (or search for “CircuitPython Audio”):

Change the text for example to “MIDI Pedalboard”. I haven’t experimented but my guess is that you will be limited to 19 characters. Fill any unused characters with 00Hex :

Save the changes to the .UF2 file
Holding in the BOOT button on your Pi Pico and plug in the USB cable, then copy the edited .UF2 file to the Raspberry Pi Pico as you would normally to install CircuitPyton.
As a basic example I then put the following code in the code.py file:
import board
import digitalio
import usb_midi
import time
import adafruit_midi
from adafruit_midi.note_off import NoteOff
from adafruit_midi.note_on import NoteOn
led = digitalio.DigitalInOut(board.GP25)
led.direction = digitalio.Direction.OUTPUT
usb_midi = adafruit_midi.MIDI(
midi_out=usb_midi.ports[1],
out_channel=0
)
while True:
usb_midi.send(NoteOn(48,127))
led.value = True
time.sleep(1)
usb_midi.send(NoteOff(48,0))
led.value = False
time.sleep(1)
Using MIDI-OX you can then open the midi device with the new name you created and it will send a single note on a 2 second loop (on/off)
ToxicTiger901 commentedon Jul 19, 2022
I've added some more instructions. Hopefully they should help. Let me know if you get stuck!
jwktje commentedon Jul 19, 2022
@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
tannewt commentedon Jul 25, 2022
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
ToxicTiger901 commentedon Jan 3, 2023
Is this now included in 8.0.0 Beta 6?
If so how do I get it to work?
dhalbert commentedon Jan 3, 2023
@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
ToxicTiger901 commentedon Jan 4, 2023
Thanks. I think I understand now.
ToxicTiger901 commentedon Jan 4, 2023
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?
dhalbert commentedon Jun 29, 2023
MIDI is part of the USB Audio specification, which is confusing. It's a particular kind of "audio" device.
mrbbp commentedon Sep 23, 2023
sorry for my newb question.
Is there a "simple" way to rename the usb_midi device name?
by default it named CircuitPython usb_midi.ports[x]
i tried to modifing the .uf2 file with an hex editor:
i tried with a different length name and the uf2 is not working (no boot)
i tried a second time with the same number of char (13), the uf2 seems to work but the device has the same name
CircuitPython....i tried supervisor.set_usb_identification("Herve Bi", "Herve Bi") but no more result.
i'm not sure about my syntax
any help appreciate
regards
circuitPython : 8.2.6
board: waveshare zero
dhalbert commentedon Sep 23, 2023
@mrbbp Which name exactly do you want to change? What is the current name and what do you want to change it to?
mrbbp commentedon Sep 24, 2023
@dhalbert
i build a small box with 2 rotatives pot on it and a rp2040 to send midi datas.
I use the pot to have a physical interface to manupulate things in Processing.org
in my sketch the device listed is
CircuitPython usb_midi.ports[0]i would like to replace this name with a custom name, the name of the box ("Hervé Bi").
regards
dhalbert commentedon Sep 24, 2023
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
mrbbp commentedon Sep 24, 2023
hello, i retried with a new rp2040 and the custom (renamed)
.uf2. Now the device show the new name. I retstart my mac and plug the old rp2040 with custom device but it don't show the good name.dhalbert commentedon Sep 24, 2023
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?
dhalbert commentedon Mar 3, 2024
#8989, which allows renaming the HID interface, is a potential model for code to do this for MIDI.
dhalbert commentedon Apr 6, 2024
Fixed by #9146.
Antinote commentedon Apr 8, 2025
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