midi reader from http://planet.racket-lang.org/package-source/clements/midi.plt/1/0/midi-read.rkt