• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
USB MIDI device not available from time to time
#1
I've been using MSP for many months, selecting the program for each song on my keyboard (Kurzweil Forte) via MIDI program change without hassle on Windows 11.
Some weeks ago, this suddenly stopped working. Having a look to the MIDI devices list in MSP, it didn't show up at all any more - although listed in the device manager.
Disconnecting and reconnecting didn't help, rebooting didn't help. Replacing the USB cable seemed to help - which unfortuntely turned out to be coincidence, the issue disappered just temporarily. Sill same problem after downgrade to Windows 10.

In short: for the last weeks, the MIDI connection randomly worked or didn't. Oftenly, In many cases, I could get it working again, if I disconnected/reconnected USB during a reboot (however I'm not sure, if this really helps. The human mind tends to see correlation when there is just coincidence), sometimes I end up changing the programs manually during a session, as nothing seems to help. Thats not very nice.

I've done a lot of investigation in the web. What I found seems to be a problem related to windows >= 10. Windows behaves kind of silly, if you connect any USB device to a different port. It then isn't reognized as the same, but as a new device, while the former connection is still registered; one can see this, if "show hidden devices" (not sure about the wording, in german: "ausgeblendete Geräte anzeigen") is selected in the device manager. Even more silly, there's a kind of limit of 10 MIDI device entries (which would already be the case, once you have plugged the same device to 11 different USB ports, as the former connection entries stay registered). More than 10 registered USB entries de facto are possible, but devices 11, 12, ... seem to be handled a bit different.

I can remember a similar oddity, when developing an app using the COM ports. While for COM1 ... COM9 a file handle can be retrieved by simply opening "COMx", ports above 9 have to be opened via "\\.\COMx" (which indeed works for COM1..COM9, too). No idea, if this is a kind of windows bug, or intended for compatibility to former windows versions - but USB MIDI also might have been implemented as a kind of dirty patchwork in a similar way.

Maybe MSP is using a library for MIDI access, which is only able to handle the first ten MIDI devices properly, due to using legacy methods, that can't handle devices >= 10? What I don't understand is, why the issue just has appeard some weeks ago, while everything had been working flawlessly in the past.

However, this is very annoying.
Reply
#2
I'm sorry to hear you've been running into those issues. I'm using Microsoft's MIDI library for UWP applications which is the only MIDI library Microsoft supports/allows for UWP applications. It's a black box when it comes to how devices are detected or connected to, so there is no way for me to know if it's encountering a problem related to what you have described. My plan is to switch from a UWP application back to a desktop application somewhat soon (maybe later this year), which would give me the ability to use other MIDI libraries that will work more reliably, although it may result in more difficulties when it comes to supporting MIDI or bluetooth or virtual MIDI ports. MIDI over USB will certainly be better supported though.

So I don't really have many options for resolving the issue you are facing at the moment. The last time I contacted Microsoft for help with MIDI issues, they basically ignored me and never gave me any help. So the only fix may be for me to switch away from UWP, use a different MIDI library and hope that the new library works better for you.

Mike
Reply




Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.