USB Midi Device


#1

I am trying to write an application that needs to detect when a particular midi device is plugged in however I am having some problems. It turns out that any device that uses the standard windows midi drivers will show up on the computer as a “Generic USB Audio Device” but I need to be able to decipher between different USB Audio Devices so that when my device is plugged in the application will pop up. I could poll each device with a Sysex message however that would hold up the midi devices from other being used by another program.

Is there a function that can retrieve the string descriptors from a USB device so that I can tell the difference between two USB Audio Devices?

Or would it be hard to write one?


#2

Well the device name isn’t the name of the thing on the other end of the wire, it’s the midi port name. I wouldn’t expect the OS to make any attempt to find out a name for the actual midi device itself, so I think that’s up to you with sysexes or whatever midi commands are appropriate…


#3

If I go to the device manager and I go to the properties of the USB Audio Device it shows the manufacturer as “(Generic USB Audio)” and the Location as “Location 0 (Device Name)”

So the name that I need has been loaded from the device onto the computer, but I wonder if it is possible to get that data somehow.


#4

Well in that case I guess the info’s in there somewhere, so there must be a way to get it out. You’ve not actually mentioned what OS you’re running, but maybe try having a look through the platform-specific midi code and see if you can spot any clues.


#5

Sorry, I am bad for giving details. I am running this on a PC with windows XP SP2, but would like to keep things as platform independent as possible.

Thanks for your help on this.


#6

I encounter this problem and never find a solution to get the name of a generic USB audio device on Win XP.
If your application is a standalone (i.e you master the MIDI IO), my advice is to use the MIDI device inquiry which is the best way to detect a specific device.

If you can’t find documentation about this, ask me and I’ll give you more explanation.

Kevin