Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get rid of warnings emitted by squash_staves() #31

Open
johentsch opened this issue Jul 5, 2022 · 1 comment
Open

get rid of warnings emitted by squash_staves() #31

johentsch opened this issue Jul 5, 2022 · 1 comment

Comments

@johentsch
Copy link
Owner

johentsch commented Jul 5, 2022

In most cases they are unnecessary, e.g. here when calling ms3 extract -N on peri_euridice:

WARNING euridice_3_venere_e_orfeo:MeasureList -- bs4_measures.py (line 575) squash_staves(): mc 3887 300 Name: mc, dtype: int64: The values ['-1' '-2' '-3' '-4' '-5' '-6' '-7' '-8' '-9'] in 'voice/BarLine/linked/indexDiff' of staff [ 4 5 6 7 8 9 10 11 12] are lost.

The problem occurs when the information contained in the simultaneous <Measure> nodes for all staves is to be compressed into a single value in the measures DataFrame. Most values that cause a warning are disregarded anyways, the warnings are rather cautionary. They have, however, proven useful in the past for detecting special cases, for example some of the movements of Scarlatti op. 1 where the two upper staves are in 12/8 and the two lower staves are in 4/4 meter, currently leading to wrong temporal positions.

The solution could involve keeping a list of XML components (such as voice/BarLine/linked/indexDiff in the example above) that are to be ignored, and to collect the differing values for the different staves for relevant cases like the differing time signatures in Corelli. This might be a call for an overall change in the XML -> DataFrame conversion because it would also solve the problem of lyrics with several verses (#32 )

@johentsch
Copy link
Owner Author

because it would also solve the problem of lyrics with several verses

That problem has been solved in the meantime by adding additional columns for all tags (because markup inside these nodes, such as <i> or <font> tags cut the string in pieces).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant