Closed jacekiwaszko1 closed 6 years ago
There is no current way of representing this case in **kern
, or more precisely in the Humdrum-to-MEI converter.
This is a systematic accidental style that could be inferred from the **kern
accidentals without any additional encoding. I could implement a parser that automatically calculates any necessary cancellation accidentals, but in general there will not be many such cases in the music. This particular case is more difficult to infer since the accidental is cautionary, with the cancellation being for a note in the previous measure. The easiest way for now would be to encode with a layout command as described below. I can do a more proper parsing of accidentals to generate a 19th-century syntax of cancellation naturals for such cases if there is need for it (modern editions would usually not display the natural before the sharp in such cases, so I have not done such a thing so far).
I have already developed the layout encoding for such cases, but not implemented it in the Humdrum-to-MEI converter yet. Here is an example from a 17th-century manuscript that is more extreme:
The music is in a bass clef and b-flat key signature, and the sharp is indicating a B-natural in modern notational syntax. I encode it like this:
**kern
*clefF4
*k[b-]
*LO:N:acc=#
1BBn
1C
1GG
4GG
4AA
2BB-y
*-
The note is encoded as sounding in **kern
data, and then there is a layout command before the note that indicates that the visual accidental should be a sharp sign.
Likewise for your example, the layout command would be:
!LO:N:acc=n#
Where the visual accidental would be a natural followed by a sharp.
In this case there is a complication of the note being in a chord. Typically this would be encoded as:
!LO:N:n=2:acc=n#
4e# 4c#
where n=2
means that the layout command is for the second note in the following token. But if you use the chord-tools, the accidental might get attached to the other note. If encoding the chord in the other direction:
!LO:N:n=1:acc=n#
4c# 4e#
If you want to make it more robust to shifting note order in chords, an RDF reference record could be developed, such as:
4e# 4cN#
!!!RDF**kern: N = cancellation accidental
The !LO:N:acc=n#
method has been implemented:
**kern
4f-- 4c##
!LO:N:acc=n-
2f-
!LO:N:n=2:acc=n#
4e# 4c#
*-
Your example, with the n
removed from the c#:
And the 17th-century example:
**kern
*k[b-]
!LO:N:acc=#
1BB
1C
1GG
4GG
4AA
2BB-i
*-
!!!RDF**kern: i = editorial accidental
In Chopin's Mazurka op. 56 no 1, mm. 166 (Schlesinger edition) there's cautionary neutral-sharp sign:
It is possible to encode it in MEI and to view it in Verovio:
(I simply changed
@accid="s"
to@accid="ns"
in<accid>
)But I can't find the way to encode this in Humdrum. Neither
4cn#
,4cnX#
,4cn#X
or4cnX#X
makes any difference. Am I missing something?KERN data: