[LAD] MIDI granularity

Fons Adriaensen fons at linuxaudio.org
Thu Jun 16 22:38:11 CEST 2022


On Thu, Jun 16, 2022 at 08:37:49PM +0100, Will Godfrey wrote:

> Over a hardware DIN port this is of course approx. 1mS, but does anyone know
> if it's the same over a USB link?
> 
> Presumably, it would have to be if the source was also sending to the DIN
> route.

Not really, it could be much faster. When the source starts transmitting the
first byte on the standard MIDI port, it probably has the complete message
(3 bytes for a note on/off) ready. There is no reason why the USB message
should be derived from the serial MIDI data.
 
> Following on from that, what about the multiport adaptors that have 4 hardware
> ports going down one USB cable. I would guess that these could be interleaved
> so that (assuming the 1mS granularity holds) the overall rate is still 1mS with
> the ports spaced up to 250uS apart.

AFAIK, USB transfers are not interleaved at byte level, doing that  would
create a lot of overhead. So even if you have a note event on all four ports
at the same time, that would probably be 4 separate USB transfers, one after
the other. Still this could take less than 1 ms, it just depends on the USB
data rate.

Ciao,

-- 
FA



More information about the Linux-audio-dev mailing list