Long lyric syllables at end of measure can overlap first syllable of next

• Dec 14, 2016 - 15:51
Reported version
P0 - Critical
S2 - Critical

3c7a69d opens cleanly a file, but 49250a0 doesn't
lyrics and music are blurred where umlauted vowels lay.

File attached

Ubuntu 16.10

Attachment Size
Verleih_uns_Friedenrl.mscz 30.79 KB


Its is not the umlauts, (the "Könn" renders just fine) but some sylables being to close to one another ("gnä-dig", "un-sern Zei", "doch ja", and many more)

I think the issue is that the collision avoidance for lyrics does not work correctly across barlines. That is, if you have a very long lyric as the last note of one measure and another as the first of another, they will overlap. It works up to a point, but not for very long syllables.

This can be seen in My First Score - fill the first line with quarter notes, then enter "asdfghjklqwertyuiop" as the lyric for the last note of bar 1 and the first of bar 2. They will overlap. They won't if you enter these for notes in the same measure.

I rather think that it is related to the melisma.
If you place a letter instead of the melisma the problem disappears.
If there is no letter (be it a melisma line or not) the problem appears.

Status (old) closed active
Status closed active

Still actual. Lyrics width is not taken into account when you open existing score with lyrics. Creating score from scratch won't give this effect. Seems like something is broken in Lyrics layouting and "getNextMeasure()" metho probably.

Confirmed. Additional bugs:
1) Press M
2) Add words to the one of lyrics


Creating score from scratch won't give this effect.

I guess something happen while MS read score. May be some elements are read incorrectly. I got the crashes while editing this score. On of them appeared while I deleted measure by shift+delete. The reason of this crash was utilizing NULL pointer. I can't reproduce crashes.

Severity S5 - Suggestion S2 - Critical
Priority P0 - Critical
Regression Yes
Workaround No

No, it's reproducible in new score too. We got this right in MuseScore 2, it would be very not good to get it wrong now. Last syllable of one measure overlaps barline, first of next does not. So a long first syllable of measure is harmless; long last syllable of measure will cross barline and collide with the first syllable of next regardless of length of latter.

Here's the effect of a long syllable in both places:


Not only barlines actually, the issue in the middle of the measure is also reproducible. But it somehow depends on the position in the score.
I did all the same things for two measures in the screenshot below: added three notes, entered a syllable, pressed "_" twice to get a melisma, entered another syllable. The results are different though:

It is possible to fix easily the case of lyrics overlapping inside measure, see https://github.com/musescore/MuseScore/pull/4487.
However there is a question on which result is desirable for lyrics crossing barlines. In MuseScore 2.X lyrics syllables seems to be not allowed to cross bar line. In MuseScore 3 lyrics syllable cannot cross measure start but can cross measure end. So the question is whether we want to just more content of the next measure further away if lyrics syllable crosses a bar line or disable bar line crossing for lyrics at all. There is also the third option with trying to resolve such collisions via applying a horizontal stretch to the whole system but that will probably require more modifications to layout algorithm.

To me the ideal is to allow the lyric to cross the barline but then prevent collision if there would be one (there won't always be). Same with chord symbols. Forcing things to fit within the measure is definitely not ideal, probably worse for chord symbols than lyrics.

Status active PR created

Since we ought to deal with barlines which could go throughout several staves, I strongly suggest not allowing lyrics intersect barlines.
@Dmitrio95 I believe you will adjust the created PR to this behaviour.

I think for this reason standard advice is not to draw barlines through vocal staves. I'm away from my copy of Gould but checking literature on IMSLP should be easy...

Fixed in branch master, commit 73bdf0c3ad

fix #151256, part 2: don't allow lyrics cross barlines

Melisma are not affected by this patch and still can cross barlines

Shapes change hack makes horizontal spacing apply only for the
specified spacing type even in case of zero-width shape. That way
chord symbols can cross barlines again.

Fix version