Use a bytearray as a buffer of the input being read from the midi device.