fbpx
Skip to main content

MIDI Forum

MIDI Setup in a Web...
 
Notifications
Clear all

MIDI Setup in a Web Browser Application using MIDI Web API

1 Posts
1 Users
0 Reactions
2,871 Views
Marco
Posts: 1
New Member
Topic starter
 

Hi, I'm Italian and I apologize for my English.

I'm trying to develop an application for Web Browser (client only and for personal use at the moment).

One of the feature I wish to achieve is a MIDI setup interface where I can configure my studio setup(s).

The user interface looks like a grid, having the input devices on the row headers and the output device on the column headers: the intent is to replicate a kind of MIDI Patch-bay. to redirect the MDI messages from a device(s) to other(s). You can figure out each redirection as a pin that connect the output of a device to the input of another one (including the device isself if I need to create a kind of MIDI message round-trip); for each "pin" I can also add one ore more MIDI message filter.
The devices can be physical or virtual.

The grid configuration can be saved in the browser sand-box e then retrived for the application purposes.

My problem lies in the mode by which the MIDI Web API assign the port id: in the case when a MIDI studio setup consists of two identical physical device (same model of same procucer) and/or two or more instances of a virtual device, the port (input or output) will have a different id each time the application access to the MIDI Web API.

Some MIDI physical device allow to set the "device id" (querable via sys-ex messages): so, if I have two identical drum machines, I can set univocally the the device id for each of them, and, if I found two ports having same device name (producer/model), I can query each of them to retrive the unique device id and identify univocally the device in the "grid" mentioned above.
Some of the MIDI physical device, that allow to configure the device ID, present itself (to the MIDI Web API) only to the output port, so I can only send MIDI message, but cannot reiceive and therefore these devices cannot be querably to retrive the device id.
Other MIDI physical devices do not allow to set the device ID: these devices typically have device id = 5.

The MIDI Web API implementation specs says that the implementation should make everything is possible to set the port id univocally, so that, at each application restart, each MIDI device can be recognized univocally, allowing the application to create suitable MIDI setup. But the word "shoud" make the sentence as a recomendation (not as a MUST)
and no MIDI Web API implementation (by Google Chrome, or by Mozzilla Firefox) seem to be capable to satisfy the mentioned recomendation.

I'm looking for a workaround to overcome the issue described above.

Any suggestions will be appreciated.

Thanks in advance.

 
Posted : 20/08/2023 7:54 am
Share: