1

I have 0 experience with writing drivers.

before I commit to more learning about this subject, I need to ask if my idea is possible to implement (feasible?), if it's worth it, or if there's a better way.

is there a way to get the Graphical tablet driver's input stream, decode it with standard documented Graphical tablet protocols from another driver (seen by OS as a Midi hardware device), transform it to midi output (optimally w/o losing data).

the only reason for doing all that is that Web Midi API is already supported in chrome since stable release 49, and Web USB API is still in spec drafting phase. see Can I Use - Midi

I want to use Web Midi API to get input from my tablet coming from the Midi Driver, and transform it back to Graphical tablet input stream (coords, pressure depth, etc..), obviously to draw it on a Canvas with close experience to Native apps with access to Graphics tablet & functionality to take advantage it.

Wis
  • 484
  • 7
  • 22

1 Answers1

1

The only way to get the USB MIDI driver to attach to the device would be for the device to report itself as a MIDI device; this would require for you to modify the device's firmware. (Which is not something you can do from software on the PC, let alone a web app.)

It would be possible to write your own device driver for the tablet that converts all events into MIDI messages (and in Linux, this does not require a kernel driver but could be done with a user-space program), but this is nothing that you could do without experience.

CL.
  • 173,858
  • 17
  • 217
  • 259
  • I'm focusing on Windows first since most users will be using it. [MS docs - What is a Driver? - Expanding the definition](https://learn.microsoft.com/en-us/windows-hardware/drivers/gettingstarted/what-is-a-driver-#span-idexpandingthedefinitionspanspan-idexpandingthedefinitionspanspan-idexpandingthedefinitionspanexpanding-the-definition) "Not all drivers communicate directly with a device. For a given I/O request (like reading data from a device), there are often several drivers, layered in a stack, that participate in the request." – Wis May 17 '18 at 10:43
  • ... "Some of the drivers in the stack might participate by transforming the request from one format to another. These drivers do not communicate directly with the device; they just manipulate the request and pass the request along to drivers that are lower in the stack." – Wis May 17 '18 at 10:44
  • You still need to attach your driver to the standard driver. Which you cannot do from a web app. – CL. May 17 '18 at 12:25