I'm still pondering the general chordname parser we talked about a few weeks ago.
In the meantime, I have implemented what I think will be a useful feature for quite a few kinds of lead sheet, but wanted to raise a question related to it. It is quite often a requirement in a lead sheet to show an optional or alternative chord or sequence of chords in parentheses. In 1.3 it is necessary to use an additional chord item to do that. As an improvement, I have added booleans _leftParen and _rightParen to the Harmony class, and the following processing: In parseHarmony(), if the string begins with a (, _leftParen gets set and the ( is discarded from the parsing. Similarly if the string ends with ), _rightParen gets set and the ) is discarded from the parsing. The ( and/or ) get put back if necessary when entering edit mode. In render(), if _leftParen is set, the chordname is prepended with "( ", and if _rightParen is set, the chordname is appended with " )" (note the spaces). This works great, but I wanted to solicit opinions on how best these flags should be represented in the score XML, within the <harmony> element. It could be as easy as the presence or absence of <leftParen/> and/or <rightParen/>, or there could be a better way. I'm not an XML expert, so wanted to ask. Also, I know nothing about MusicXML, so don't know how such a feature should be exported/imported in that format either. Cheers Tony -- Tony Mountifield Work: [email protected] - http://www.softins.co.uk Play: [email protected] - http://tony.mountifield.org ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Mscore-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mscore-developer
