Closed mscuthbert closed 7 years ago
I've looked all through the MEI guidelines and except for one example that assumes this usage implicitly, I can't find any discussion of what a note without accidental but w/ a key signature does.
Sorry, Myke -- just seeing this now.
In this case, I think the data is wrong and the behaviour of the parser could be right. MEI makes a distinction between 'logical' and 'gestural' accidentals, which makes the case of no accidentals ambiguous in the data.
A 'gestural' accidental is one that is performed but not written. In the case of a key signature with a B flat, one assumption is that every B has an implicit, performed-but-not-written accidental. This is because in MEI we do not capture the "pitch" of a note; rather, the "pitch name." So if you say: <note pname="b" />
while in the key of F you're (technically) wrong, as you're saying that the note in question is a B, while it's actually a B flat, which should be <note pname="b" accid.ges="f" />
. (It's not unlike when I have been corrected when asked to read out notes in a score. I would often ignore the key signature when saying the pitch name and be promptly corrected...)
If you're in the key of C, and it's a written B flat, it would be <note pname="b" accid="f" />
.
Unfortunately, this remains a point needing clarification by many MEI implementers. We're attempting to address this by specifically encoding in the file what the assumed 'domain' is when encoding, but this will be available in MEI 4.0.
Ah, so will the "domain" be like "supports" tag on musicxml, where you can see what is encoded in a file and assume that anything not present that has no "supports" tag can be inferred?
There is a Chopin example in the MEI handbook that also has this same interpretation, so there might be other such instances in the wild.
I'll close this since there's nothing for music21 to do at present, but can keep the discussion going.
@ahankinson @crantila -- when parsing:
All of the Bs are coming out as b-naturals (first one, m. 2, staff 3). When looking at the MEI, there is no accid. tag for these notes. The PDF http://ricercar.cesr.univ-tours.fr/3-programmes/EMN/duchemin/sources/155012-16/155012-16-pdf-moderne.pdf implies that the accidental should come from the key signature in these cases. Is this the correct interpretation of MEI? If so, then after parsing, we should run:
and similarly for chords:
thoughts?
I would NOT run the getContextByClass() while parsing, because it runs MUCH faster if the score has not had elements added to it since the last run. Thus doing it as a post initial-parse step would be better.
Best, Myke