Added utilities for conversion to midi and xml.