Musicxml export

Bug fix and unmerged commits.