Converting midi events to notes
Factor out classes