MarkGotham / When-in-Rome

meta-corpus of and code library for the functional harmonic analysis of music
58 stars 12 forks source link

Aligning analysis files of BPS #28

Closed napulen closed 2 years ago

napulen commented 3 years ago

This PR is the result of me going through all BPS files which presented misalignment between the annotation and score.

I entirely used the original ClassicMan scores and adjusted them accordingly. Sometimes, I'd correct wrong notes, but mostly, I just removed/simplified information in the score (e.g., repetition bars, partial measures, etc.)

The files are guaranteed to align in the following conditions:

# Score file parsed as
score = music21.converter.parse(path).chordify()
annotation = music21.converter.parse(path, format="romantext")

Repetitions are ignored (i.e., no .expandRepeats()), mostly because repetition starts cannot be specified and that will fail in several scores. In instances of prima volta and seconda volta, I only left the seconda volta. This is consistent in the analysis file and the score, so they align nicely.

In cases where a score presents the same harmony at the end of the piece for several measures, I added dummy annotations of the tonic for at least the last measure, so that it is clear from the score that the number of measures in the annotation matches the number of measures in the score. For example:

m200 I
Note: The score goes on in tonic harmony for the rest of the score, and the last measure with a tonic triad is m210
m210 I
Note: The m210 annotation was added for completeness
napulen commented 3 years ago

Caveat: I only aligned the scores in the analysis.txt files, not any analysis_BPS.txt file.

If the PR is accepted and everything seems to work well, we should just replicate the same structure in the analysis_BPS.txt files, and preserve the BPS annotations.

MarkGotham commented 3 years ago

Thanks @napulen!

I really appreciate the effort towards robust score-analysis alignment, but at what cost? Isn't it a shame to:

I'd prefer to:

Finally, wrt end of piece, we can encode last measures each time as you propose, or use the matchParts function at the end of romanUmpire for handling this.

Perhaps it would be best if I separate off that matchParts function to a separate script we can collaborate on specifically for alignment? Are you content to include in that the code you used to effect these changes?

Finally, this repo provides analysis_on_score files. They're automated at present and should be automated where possible, but we could make analysis_on_score files the VOR and for really recalcitrant cases, simply align them manually.

Thanks again - important issues!

napulen commented 3 years ago

Let's leave this one on hold or in draft state for now. It's a complicated PR!

MarkGotham commented 2 years ago

Hey @napulen can you update this with any plans, especially in relation to @malcolmsailor's recent PR on the subject of repeats? Thanks! If there's nothing coming then let's close this and start an issue with the remaining TODO parts of this.

napulen commented 2 years ago

Honestly, I can't recall most of these changes anymore. I'd prefer to close this and reopen if needed.