Invisible staves inappropriately factored into note spacing
Reported version
3.0
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project
In 3.0 released (3.0.0.20137 Mac Mojave). In the enclosed test case score, the sixteenth-notes in the hidden oboe part are determining the spacing of the visible violin part. This is a regression. This not happening is one of the main reasons for hiding parts.
Attachment | Size |
---|---|
test_spacing_hidden.mscz | 5.63 KB |
Fix version
3.1.0
Comments
(deleted - autocorrect on autopilot?)
In reply to Seems some poeple by Marc Sabatella
??
No idea, I didn't actually type anything on purpose, just set priority.
This is a really serious problem for me that is preventing me from migrating a family of old scores into MS3; MS2's lack of a usable piano roll editor makes editing in MS2 not an option. Is this in queue to be fixed soon?
There is no official queue, but the occasional bump like this doesn't hurt :-) I agree, should be high priority. With luck it won't be hard to fix, and if I'm right I'll submit a PR.
In reply to There is no official queue,… by Marc Sabatella
bump, bump, BUMP ...
Unfortunately, it turns out not to be simple, at least not for me. There are several places I found where we are doing some aspect of layout on invisible staves unnecessarily and I can save some space (and time!) by not doing this, but the main culprit is the fact that we are looking all the segments one at a time and calculating the space to the next segment even though the segment might not be relevant - it might not have any notes on visible staves. We need to be smarter about which segments we look at in the first place as well as which collisions between those segments we look at, but this gets hard for me to wrap my head around fully.
A side benefit of improving this algorithm is perhaps re-allowing the partial overlap of segments that we were doing early on in 3.0 development but seem to have lost somewhere along the way. That is, the sharp in this passage really need not be forcing extra space between the notes - it is totally possible to tuck it under the previous note:
Again, I feel this was working a couple of years ago, see for example the second image in https://musescore.org/en/user/101731/blog/2016/05/01/musescore-3.0-unde…
In reply to Unfortunately, it turns out… by Marc Sabatella
One of the main reasons for using invisible staves is to expand ornamentation and other textures that take up real horizontal space. This is a major regression. Given that the ornamentation system is not customizable, the need for invisible staves that have many more notes than the visible ones will persist. Yes, such staves are useful for "performance" and this is "not a performance program", but this is a big step backwards if it remains broken indefinitely.
Agreed. I'm trying to bring other developers in on this to find a solution.
Relates to #285237: [EPIC] Invisible staves issues
Might be a bit premature as the code will definitely need review, but I did manage to find a much simpler solution than I originally imagined. Doesn't address the partial overlap / "tuck under" case I showed above, because it doesn't really change that part of the code. Here's the PR to hopefully fix invisible staves:
https://github.com/musescore/MuseScore/pull/4769
Could I get some real-world samples to test my fix with? Links to appropriate scores on musescore.com are fine.
In reply to Could I get some real-world… by Marc Sabatella
https://musescore.com/bsg/scores/864526
Thanks - it crashed my code, so good thing I asked :-) Investigating and will hopefully update the PR accordingly.
Problem was measures where the first element was a clef change on an invisible staff, I've fixed that.
Layout using my code is as identical to 2.3.2 as any score ever is, and relevant to the issue at hand, it's better in a few places - measure 25 shows a weird gap in 2.3.2 not present in my version. also my spacing is better in measures 32, 33, 51, probably elsewhere too.
One glitch I still need to fix is the playback cursor jumping backwards a bit when dealing with the content on those invisible staves. Other than that I am feeling good about this.
Unfortunately, your score reports as corrupt when loading into any build based on current "master" build and that causes a few issues. Not sure if they are real corruptions missed by 3.0.4 or "phantoms" being falsely identified by the new "fraction"-based code for tuplets and very short note values. Probably good to start doing more testing of these builds on scores like this...
In reply to Problem was measures where… by Marc Sabatella
Finding and fixing "corruptions" is a superhuman task. Can you do that for me? The harpsichord part, as you can see, was decoded from midi output from an ancient app that knew how to arpeggiate well before MS could.
Good to know the source of this, that definitely explains some things!
As for fixing corruptions, I'm guessing that whether this particular score has "real" issues or not, the nature of the changes in master means there will likely be some scores that have no real issues but are flagged as corrupt anyhow, and those are bugs we will need to fix. For the scores that do have real issues that were simply being overlooked in 3.0.4, not sure what we can do, but this is certainly an opportunity for us to try to fix them automatically.
What would help us is if people would include a nightly build and start loading scores that do not report as corrupt in 3.0.4 and let us know if they are reported as corrupt in master. We should be able to take it from there.
Meanwhile, I've updated my PR (playback cursor glitch fixed too), and included some screenshots showing how measures 23-25 look in 2.3.2 versus 3.0.4 versus with my changes:
https://github.com/musescore/MuseScore/pull/4769#issuecomment-470696092
Feel free to suggest other scores to test with.
Meanwhile, armed with the knowledge I've gained while working on this, I think I've found the solution to the bad accidental spacing shown above. I've filed a new issue as #285591: Accidentals no longer tuck under/over previous notes and hope to have a PR soon.
Fixed in branch master, commit c2dfff900c
fix #281024: invisible staves affect spacing
Fixed in branch master, commit ad4af962bd
_Merge pull request #4769 from MarcSabatella/281024-invisible-staff-spacing
fix #281024: invisible staves affect spacing_
Automatically closed -- issue fixed for 2 weeks with no activity.