parsing midi file a bit