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

Fix spanner disappearing from closed parts #21883

Merged
merged 6 commits into from
Mar 15, 2024

Conversation

mike-spa
Copy link
Contributor

@mike-spa mike-spa commented Mar 11, 2024

Resolves: #21286 Specifically, the cases reproduced in this comment, and this comment.
Resolves: #19852 (and hopefully many other similar issues reported without clear steps for reproducing)

It seems that the whole problem (for hairpins and other lines) was caused by an error in reading part scores with multi measure rests. This error was masked in previous version because it gets corrected during layout, but since 4.0 we do not layout closed parts to avoid waste of performance, so the error came up. As far as I can tell, this seems to fix it.

The problem with slurs was more involved (and also used to be masked in previous versions for the same reasons).

@mercuree
Copy link
Contributor

Not sure if it also was supposed to fix slurs reproduced in this comment.
Just pointing out that that problem with slurs isn't solved by this PR.

@mike-spa mike-spa changed the title Write spanners even if they don't have start- or end element Fix spanner disappearing from closed parts Mar 11, 2024
@mercuree
Copy link
Contributor

Great job!
I found more cases though. Is this already abuse? Should I stop?

  1. Hairpin lost if you extend it manually
hairpin_lost2.mp4
  1. If you double duration. I don’t know why this might be needed, but it’s worth mentioning
slur_lost_strange_case.mp4

@mike-spa
Copy link
Contributor Author

I found more cases though. Is this already abuse? Should I stop?

Actually we must thank you, you're the first who's managed to reproduce these bugs (hence why we couldn't fix them before despite being reported for a while). I'll look into those last ones too

@mercuree
Copy link
Contributor

Thank you for your efforts! I think next case shouldn't be covered by this PR. Maybe I need to create separate issue with low priority because "join measures" function looks exotic to me.

join_measure_slurs_lost.mp4

One last thing just to be sure everything is right.
This #21418 PR for lost grace note slurs accidently fixes similar case for regular slurs too.
It affects only one file src/engraving/rw/read410/connectorinforeader.cpp
But I found the same code in /src/engraving/rw/read400/connectorinforeader.cpp
Does it matter or this just dead code I shouldn't worry about?

@mike-spa
Copy link
Contributor Author

Maybe I need to create separate issue with low priority because "join measures" function looks exotic to me.

Yes, the slur disappears also in the score, so this is an entirely different issue.

Does it matter

No, pretty sure it doesn't

@mercuree
Copy link
Contributor

Something wrong with voices

hairpin_lost_voices.mp4

@mike-spa
Copy link
Contributor Author

Something wrong with voices

Can't reproduce this one. It works fine for me in this branch.

@DmitryArefiev
Copy link
Contributor

To repro it's important how the hairpin is added (to which voice)

bandicam.2024-03-13.11-13-35-171.mp4

(occurs in master as well)

@mike-spa
Copy link
Contributor Author

Changed a few things, fixed unit tests. Please give it another round :)

start- and end element are computed during layout for layout purpose. If a spanner (except slur and ties) doesn't have a start-end element it doesn't mean it can't exist
codestyle
@mercuree
Copy link
Contributor

mercuree commented Mar 13, 2024

I have a case where I don't understand what's going on and not sure if it's related to this PR.
There is a score Disappearing elements.mscz which I investigated for hairpin loss.
Staff 1, measure 26. There is hairpin "cresc. poco a poco". It's lost in Bass trombone part, but this is expected, so I do Parts reset for Bass Trombone. Hairpin reappears, but will not survive save/reopen in both main score and part.
Actually, it will also not survive save/reopen without parts reset.

Other case: Staff 1, measure 244-245. Hairpin there will also not survive save/reopen.

If the problem is in broken score itself, maybe it's not worth it to fix it at the cost of complicating the code

@mike-spa
Copy link
Contributor Author

I have a case where I don't understand what's going on and not sure if it's related to this PR. There is a score Disappearing elements.mscz which I investigated for hairpin loss. Staff 1, measure 26. There is hairpin "cresc. poco a poco". It's lost in Bass trombone part, but this is expected, so I do Parts reset for Bass Trombone. Hairpin reappears, but will not survive save/reopen in both main score and part. Actually, it will also not survive save/reopen without parts reset.

This (and you don't know I happy it makes me to say this) is fixed in #21633 😍

@DmitryArefiev
Copy link
Contributor

DmitryArefiev commented Mar 15, 2024

Tested the cases reproduced in #21286 (comment), #21286 (comment) and #21883 (comment) on Win10/Mac13.6. FIXED

@mercuree
Copy link
Contributor

If you are planning to merge this with 4.3.0 branch, please consider adding #21418 too, because it also fixes some cases for grace and regular slurs. Thank you!

@mike-spa mike-spa merged commit 2d29c75 into musescore:master Mar 15, 2024
10 of 11 checks passed
@Eism Eism mentioned this pull request Mar 19, 2024
@DmitryArefiev
Copy link
Contributor

I have a case where I don't understand what's going on and not sure if it's related to this PR. There is a score Disappearing elements.mscz which I investigated for hairpin loss. Staff 1, measure 26. There is hairpin "cresc. poco a poco". It's lost in Bass trombone part, but this is expected, so I do Parts reset for Bass Trombone. Hairpin reappears, but will not survive save/reopen in both main score and part. Actually, it will also not survive save/reopen without parts reset.

This (and you don't know I happy it makes me to say this) is fixed in #21633 😍

@mike-spa I've tried the last build from #21633 (on Win10). That issue is fixed for Bass trombone but still happens with Euphonium

bandicam.2024-03-21.15-35-24-283.mp4

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

Successfully merging this pull request may close these issues.

Elements disappear in parts Hairpins disappearing in part scores
5 participants