added parser for midi-in buffer and other minor things