Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
1. USBMIDI in/out 2. MIDI uart in/out (as a part of the USBMIDI device) 3. MIDI over SPI in/out
I want to be able to route messages from all the inputs to all the outputs. By "output" in this context I mean an output from my device.
Now, routing between USB and UART is simple, since it happens automatically. Reading messages from these inputs and writing them onto SPI out is also simple. Reading from SPI into a character buffer is up and running.
But what is the best way to write the messages from SPI to USB/UART outputs? The problem is that these messages are just received as a stream of bytes, i.e. they are not parsed into MIDI messages that fit as input to
Since the UART also gets its MIDI input as a byte stream, I assume it has a parser for it, but this doesn't seem to be covered in the API documentation. I'd rather not reinvent the wheel by writing another one, so is there any "correct" way to write data into this parser from code?