First verse lyrics in voice!=1 throws off automatic staff spacing

• Nov 19, 2015 - 19:53
Type
Functional
Severity
S4 - Minor
Status
closed
Project

See https://musescore.org/en/node/88041 for sample score and discussion.

When the first verse of lyrics is entered against notes in voice>1, and extra lyrics are entered against notes in voice 1, the staves will not auto-space apart to take into account the lyrics past verse 1.

clp100.png

Attachment Size
clp100.png 6.02 KB

Comments

The problem is here:

https://github.com/musescore/MuseScore/blob/ac4819da4504e0efd2f43ef499a…

We are looping through the lyrics of a note and remembering the last one found, to use it to set the distance down for the measure/staff a little later. Unfortunately, we start over again in voice 2, and then voice 3 and 4, and end up remembering the last lyric found in the last voice searched, even if it is not as low as a lyric in a previous voice. In particular, voice 1 has lyrics in verses 2-4, and *should* use the lyric in voice 4 to set the distance down, but unfortunately when we move on to voice 2, we see the lyric in verse 1 and take that instead.

The fix should be to only remember the lyric if it is in fact lower than the current remembered lyric. I'm not really sure if we should base this on the actual y position or the verse number or something else. But basing it on the verse number does seem to work well for the cases I have tried. Will do more testing then submit a PR.