WebAudio / web-midi-api

The Web MIDI API, developed by the W3C Audio WG
http://webaudio.github.io/web-midi-api/
Other
323 stars 49 forks source link

MIDI device discovery, "already in use" devices only #160

Closed svgeesus closed 8 years ago

svgeesus commented 8 years ago

Recently I had some problems with WebMIDI in Chrome (on Windows x64). Some USB MIDI devices were discoverable, but only if they were already in use by another application. (A Korg NanoKey 25 for example, which was usable if I first ran MIDI-OX to open the device).

This also implied that they used their own, multi-app capable driver; the default Windows 10 USB driver is not multi-app capable so can't be open in multiple apps anyway. (CME Xkey 25 was one such keyboard that I tried, which ues the Windows driver and thus can't use the MIDI-OX trick).

Traditional DIN interfaces seem to be more easily discoverable by WebMIDI (It found the inputs and outputs on my Presonus AudioBox 44VSL for example, even though nothing was plugged in at the time).

I initially raised this as a bug on Chromium https://bugs.chromium.org/p/chromium/issues/detail?id=599464#c1

But now I wonder whether that behaviour is mandated by the spec. if so, it should be more clearly expressed. If not, it should also be more clearly expressed, so I can follow up on the Chromium bug :)

toyoshim commented 8 years ago

This is why the spec introduced open/close methods to the MIDIPort. But unfortunately, it happened just before Chrome shipping the feature, and hasn't been fully implemented yet.

toyoshim commented 8 years ago

75 See this thread if you are interested in the history.

cwilso commented 8 years ago

This doesn't sound right at all - this sounds like just a bug. You should be able to SEE (i.e. enumerate) all devices; you should be able to open any devices that are currently not in use by a non-multi-use system (e.g. on old Windows, if a MIDI device is already in use by another application, it may not be available). This sounds like just a bug.