lenmus / lomse

A C++ library for rendering, editing and playing back music scores.
MIT License
117 stars 28 forks source link

Fix internal model and improve MusicXML importer #366

Closed cecilios closed 2 years ago

cecilios commented 2 years ago

This PR fixes an issue detected in the MusicXML importer during the round-trip import-export tests. The problem revealed a limitation of Lomse internal model: 'voice' was restricted to notes and rests. But some other children from <measure> such as <direction> can have an editorial voice for properly relating them to a note or voice sequence or need to be, somehow, associated to a voice. And the future W3C standard for music notation, MNX, also foresee that many other elements can be associated to a voice.

Therefore, Lomse has been modified to allow to associate any ImoStaffObj to a voice, and ColStaffObjs builder has been modified to take this into consideration. And then MusicXML importer was modified to solve the issues detected that could not be solved due to the fixed limitation.