Classes to transmit and receive MIDI messages over USB
Receives midi commands over USB
read(self, nbytes: Optional[int] = None)¶
Read characters. If
nbytesis specified then read at most that many bytes. Otherwise, read everything that arrives until the connection times out. Providing the number of bytes expected is highly recommended because it will be faster.
Returns: Data read Return type: bytes or None