-
Notifications
You must be signed in to change notification settings - Fork 9
Support measure_n attributes other than numbers? #28
Comments
I'm ok with this. We can restrict the data type in the ODD. @zolaemil any thoughts? |
I believe there's no place where we actually need to assume that it's a number. But as it is all over the place it will need a more careful look. But I think it wouldn't be a problem leaving it alone as a string. The only thing that would change in the interface is that |
One more comment: the most specific assumption about measure/@n is, I believe, the one when checking if it's the first measure https://github.com/TEI-Music-SIG/MEItoVexFlow/blob/master/src/Converter.js#L892 |
I removed that passage from mei2vf in the latest pull request, so that wouldn't be an issue anymore. There's another passage depending on an organization of the measures in an array: https://github.com/TEI-Music-SIG/MEItoVexFlow/blob/master/src/Converter.js#L1003. It looks up the last addition to the MEI2VF.Converter.allVexMeasureStaffs by getting |
Yes, that's true. But maybe that restriction could go to the ODD? That is, "if you want to render something please make sure the measure numbers are unique": this requirement is probably not completely unreasonable. However, if it is unnecessary I wouldn't object switching to referencing measures by xml:id instead. |
I think requiring unique measure numbers is very plausible when you are dealing with only one musical 'piece'. In MEI, it makes sense not to require unique measure numbers globally, because there can be multiple pieces or movements in one file (each of which might start with M 1). So, do you think there should be support for multiple pieces/movements in one MEI2VF instance? (As far as there are no disadvantages to MEI2VF, I would not mind supporting it.) |
I also like the idea of treating
References should always be handled with xml:ids |
Currently, it's necessary in mei2vf that the measure
n
attributes read from the XML code can be converted to a number, because these numbers are used as array indexes. But the MEI datatype of the n attribute n is not numeric, but xsd:NMTOKEN, see [http://music-encoding.org/documentation/guidelines2013/att.common], someasure_1
,1a
orauftakt_zu_1
would be valid n values in MEI, but wouldn't render in mei2vf.The text was updated successfully, but these errors were encountered: