rppicomidi / midi2usbhub-web

A Pico W interconnects USB MIDI devices and 2 old school MIDI ports with web browser routing control
MIT License
4 stars 0 forks source link

Feature request(s) #2

Open SquidgyB opened 2 months ago

SquidgyB commented 2 months ago

Hello there!

I wonder if you're amenable to feature requests?

I would like to see a "default new USB connection" setting; This could take the form of a new column/row on the web config page which would pass on the mapping configuration to newly connected (and previously unseen) USB Midi devices in/out.

I would also like to see the ability to run the project without the OLED connected - it seems that currently, if the device is powered on without the OLED connected then it never correctly boots up (web config is unavailable). For my use case, it would be useful to be able to initially configure the device, then remove the OLED screen once initially configured.

Are these items something which could be implemented in the (near or far) future?

If you need any farther information/explanation, please do ask.

rppicomidi commented 2 months ago

@SquidgyB I do plan to implement allowing this to work without an OLED connected in the future. I am just not sure when.

I am a bit confused by your first request for a new default USB connection setting. If submit your web page design as a pull request (HTML code and javascript), I will consider implementing it.

rppicomidi commented 3 weeks ago

@SquidgyB

I have just implemented a build option RPPICOMIDI_NO_LCD so you can build this software without support for the OLED if you choose. I considered the automatic OLED detection and running with command line only if the OLED is not there, but it seemed to me that hardware either has an OLED or it does not, so it was better to customize the build if you choose to omit it. If you really need dynamic OLED detection, please submit a new feature request with only that feature in it.

If you care to provide more information for your "default new USB connection" feature, please submit a new feature request with only that feature a bit more detail about how it works. Although I would prefer a pull request, I will review just a plain feature request, and if it is feasible, I will implement it when my time allows. I would need to know in particular:

If you create a new default device, how will the software know which real device maps to the default device when you plug it in? Bear in mind someone can plug in a hub that has more than one device connected to it. The software currently identifies each device by its hardware ID (Vendor ID and Product ID). That is why the device won't show up on the list if it is not plugged in.

How do you specify how many IN and OUT ports the default device has? USB MIDI device can have 0-16 MIDI IN ports and 0-16 MIDI OUT ports. Most just have 1 IN and 1 OUT, but I have seen pedals that only support 1 MIDI OUT port, keyboards that have 4 IN and 4 OUT, and USB to Serial MIDI converters can have 16 in and 16 out. The software automatically detects this detail during the USB enumeration process that happens after the MIDI device is plugged in.

What happens if the device you plug in does not match the number of MIDI IN and MIDI OUT ports you specified in your default device?

SquidgyB commented 1 week ago

Hi there, thank you for implementing the change, that's excellent!

As for the new feature, I see your point, the variable number of midi ports will certainly cause issues for my idea.

Maybe an explanation of my use case might help you understand what I want out of it (no expectations, mind - I'm fully aware this is just an exploratory request);

I'm using the midi2usbhub device as an expansion for the midi in/out port on a groovebox. The two midi DIN in/out ports are permanently connected to each other, while I would like all USB devices which are connected to have their first available USB midi port (in and out) connected to one of the DIN midi in/out ports.

If the USB midi device has more than one port, or any sort of "strange" configuration (i.e. audio over USB as well as midi), I'm happy to "log onto" the midi2usbhub and configure the ports correctly, but on first connection I want to attempt to connect the first available midi port directly to a specific DIN pair.

It's essentially working as a kind of "man-in-the-middle" attack on the DIN port of the groovebox, providing a direct connection to the DIN ports on the midi2usbhub (replicating the DIN port of the groovebox), while adding several USB connections which can be "hotswapped".

In this instance the additional midi ports do not really concern me - I can configure the midi2usbhub manually if the device has an odd setup, while most devices should work just by plugging them in.

I hope that helps understand the idea I have!

rppicomidi commented 1 week ago

@SquidgyB Let me try to say what you want in a different way to confirm I understand what you want.

You have a Roland MC-101 Groovebox that has one DIN MIDI IN and one DIN MIDI OUT. You want a setting that allows you to automatically route every USB MIDI virtual cable 0 to to the DIN ports on first connection. So if you have a hub connected and plug a keyboard device and a drum machine device into separate ports, you want the MIDI OUT of the Groovebox to go to USB Cable 0 MIDI IN of both the keyboard and the drum machine, and you want the USB Cable 0 MIDI OUT of the keyboard and the drum machine to get merged to the Groovebox MIDI IN port. However, if you edit the routing of either device, you want the routing you set to be remembered the next time you plug in.

Do I understand what you want?

SquidgyB commented 1 week ago

Yes, that's essentially it - in addition, the second pair of midi DIN in/out on the midi2usbhub device should be permanently connected to the first midi DIN in/out which is hardwired to the groovebox (in this case it is a heavily modified Synthstrom Deluge).

The DIN-to-DIN connection is already possible using the midi2usbhub as it is, it's the "auto connection of simple new USB devices to one of the DIN in/out connections" which interests me, with the possibility of modifying the connection parameters for any USB devices which are connected (and remembering those parameters), but only if required.

A sort of automated connection for simple devices, but the ability to use the wifi/web based configuration if necessary.

I hope that makes sense - and again, I understand this might be niche functionality, I'm not sure it is within the scope of what you hope to accomplish (and already have!) with the device. :)

rppicomidi commented 6 days ago

@SquidgyB The hardwired connection you should accomplish using presets. The autoroute feature is reasonable, but not a very high priority for me at the moment. Do you have a vision as to what the Web UI for turning this feature on and off looks like?

I will leave this issue open until I get the time to address it.