It it possible to name separate USB MIDI interfaces? #16435
-
It is fairly easy to implement multiple midi interfaces over one USB connection, but how do I give each one a unique name? To demonstrate what I’m talking about, let‘s modify midi_example.py, by changing lines 45 to 47:
into:
After this change three MIDI connections show up in my DAW (FL Studio 2024): ‘Test’, ‘Test #2’ and ‘Test #3’. I assume they acually are all three called ‘Test’ (i.e. the product string value) and ‘#2’ and ‘#3’ are added by the DAW itself. Is there any way to give each Interface instance a unique name, via product string or otherwise? Edit |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
Not from the USB side, I don't think. There's no string field in any of the MIDI descriptors, just the device product string. You might be able to change the names in the host computer OS, or in Windows maybe even via a custom .inf driver file, but I'm guessing that won't solve the problem for you.
This is probably the way, although I think these also won't provide you with different names just different numbered "Jack IDs". As per the comment here, the driver has all of the structure to add multiple "jacks" in one descriptor but I didn't have a lot of luck getting something useful out of it. |
Beta Was this translation helpful? Give feedback.
-
@projectgus, do you know if there’s a way to make vREPL work in VSCode (using MicroPico) while running USB enabled code? I finally want to start working on getting this to work again to integrate it into my Cybo-Drummer project. I found some hints here and there that the solution might be to have multiple MIDI Streaming Interfaces, each with its own Interface Descriptor and MS Interface Descriptor blocks, and use the iInterface parameter to point to unique names. |
Beta Was this translation helpful? Give feedback.
-
I'm doing thourogh testing of four possible ways to achieve a multiport USB MIDI setup:
I have no macOS device available to test, for that I will later on rely on others to confirm it works. While debugging issues with the multiple MIDI Streaming interface approach I found a potential error in core.py. @projectgus could you please have a look and confirm whether this is indeed a bug or not? According to the docs Once I round up my testing of at least the three USB MIDI 1.0 approaches I will make the Github repository publc and let you all know you can try it yourself. |
Beta Was this translation helpful? Give feedback.
-
I managed to get it to work and published my progress is a discussions post: https://github.com/orgs/micropython/discussions/17640 |
Beta Was this translation helpful? Give feedback.
I managed to get it to work and published my progress is a discussions post: https://github.com/orgs/micropython/discussions/17640