Open annamorphism opened 1 year ago
actually in this case it seems to mostly be that the two places handle the absence of a clef differently (in NewCantus it throws everything off, which it doesn't in oldCantus. Since things really ought to have a clef, maybe this difference is actually desirable. However there are also cases where there is a bizarre gap in the staff for the "preview": On the actual chant page, it isn't there, but it doesn't align as a result:
leaving a note for future work on this: when I visit /chant/675554 locally, the following output is printed to my terminal:
MELODY SHORTER THAN TEXT, DIDNT REACH TILDA
[06/Dec/2022 18:05:17] "GET /chant/675554 HTTP/1.1" 200 266216
So there's something going on with our matching-notes-to-syllables function. Hooray for debugging print statements that accidentally got committed at some point and are now doing useful things!
I looked through the matching-text-with-volpiano scripts a few weeks ago, and I recall seeing that when we start syllabizing a text, we add an empty "word" at the beginning of our list of words, to match up with the clef. Since there's no clef in the screenshots you provided, this probably explains why the first element that should have a word/syllable has nothing beneath it.
I abandoned the refactoring-and-documenting-the-volpiano-scripts project because I wasn't aware of it being relevant to any issues that were live. Now that I see this, perhaps it's worth me picking it up again.
Further to my previous comment: I just tried editing the chant, adding 1---
to the start of the volpiano, and I think this fixes it. So, this wouldn't happen in a perfect world where all our data has no errors, but as we don't live in that perfect world and there may be other chants without clefs, we should probably rework our scripts to account for this possibility (as OldCantus already does).
The chant in question, edited to include a clef:
A possible enhancement would be to prevent a user from saving a chant if its volpiano doesn't begin with a clef and three dashes.
A related error that misaligns text: Here's 675565 in NewCantus
and in old:
Issue seems to be that there are extra hyphens in the Volpiano, which are ignored in Old but not New.
Inasmuch as bugs can be aesthetically pleasing, this last bug is a good one. Nice catch!
@dchiller - this is relevant to the harmonize-how-cantusdb-and-cantusultimus-treat-volpiano project.
Thanks -- I'll refer to these cases as I continue developing/testing that.
Some of the more complicated volpiano cases don't seem to render right. E.g. for http://206.12.88.113/chant/675554 the {bracketed} text should align with the 6-----6 in the Volpiano, but it is offset.