Bar lines: issues and inconsistencies
Having spent several days trying to 'clean up' the situation for bar lines with little result, I'll note here the most important issues and inconsistencies I noticed, trying to stick to general notation cases, without involving (at least not too much) niche or highly specialized use cases.
1) 'Generated' status
- Bar lines initially created by the New Score Wizard are marked as non-generated
- Bar lines of measure manually added at the end of the score are marked as non-generated
- Bar lines of measure manually inserted in the middle of the score are marked as generated.
2) Custom types and spans
When a bar line marked as generated is individually changed in type or span, its generated
flag is not set to false and the bar line itself is not written to the output file (i.e. is lost on saving and reloading)
3) System-initial bar line
Editing the span of a system-initial bar line changes the span of all the bar lines of a scores.
System-initial bar lines should probably remain non-editable, as the use cases proposed for this (mostly related to jazz specific notations) could be obtained by other means and any customization of these bar lines is lost when system breaks change.
4) BarLine::_generated
and Measure::_endBarLineGenerated
flags
The meaning of the first flag should be rather clear: if a bar line is generated, it should not be written to the output file and all its parameters should be reconstructible on reading the file back.
I could not understand the meaning of the second flag: I believe I found occurrencies of all the 4 combinations of true and false for the two flags in a measure and its bar lines. Any authoritative statement about this?
There are other issues, for instance related to repeats and multi-measures, possibly correlated with these; they are detailed in specific issues and I will not repeat them here.
Any comment is welcome about how to proceed to improve the situation. So far, my attempts failed, as little changes here or there trigger big -- and unexpected -- changes in the score files with loosing of info and improbable (or wrong) behaviour while editing.
Thanks,
M.