lenmus / lomse

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

Acknowledge color attribute in MusicXML for some elements #403

Closed cecilios closed 1 month ago

cecilios commented 1 month ago

As layout and rendering was a very complex task, it was decided to postpone all style-related issues (color, alternative symbols, modification of default spacing,...) until the library was more advanced. Consequently, the color attributes were ignored by the MusicXML importer.

This PR closes #402 and now color attribute is no longer ignored by the MusicXML importer in some elements: clefs, key and time signatures, barlines, notes, noteheads, wedges and dynamic marks.

For notes, there is still a limitation: the <notehead> element not only sets the color of the notehead but also the color of the note (and thus for the stem, the flag and the accidentals). For now it is not posible to limit the change to the color to the notehead.

An example using test score 50440-color-attribs.musicxml from test-scores folder follows:

image