writing new midi parser