Horizontal placement of articulations wrong with multiple voices

• Oct 15, 2014 - 14:19
Type
Functional
Severity
S4 - Minor
Status
closed
Project

When using 2 voices on a staff, articulations (sforzato and tenuto at least) are incorrectly placed horizontally. They are automatically flipped so that they appear on the stem side of the note (which is correct), but they are horizontally placed above (or below) the stem (if there is one) instead of above (or below) the notehead, which is where they should be.

It looks very strange when there are whole notes.

I have attached a short example, made using prerelease revision 2a67602 of version 2.0.0 -- I did a very brief test in version 1.3, and it seems it worked this way there as well. The example shows two bars with a single voice, then two bars with two voices.

Attachment Size
test.mscz 1.48 KB

Comments

I had thought maybe this was deliberate (except for whole notes, which are certainly wrong), but I see Gould shows articulations centered over noteheads in multivoice cases too. Looks like the code to center articulations over noteheads only kicks in for non-stem-side articulations. It's simple to adapt it for stem-side cases.

Whole notes are not working for a different reason, it seems, but it shouldn't be hard to sort that out.

Regarding the issue with swapping voices and undoing - it seems undo of that operation does not reset the "hasVoices" property of a staff. That's why the stems and rest positions still look like there is a second voice as well - that's #18798: Bar rests not restored to former position after Undo Exchange Voices This should be an easy fix. We could either save & restore the hasVoices property on redo/undo of the exchange voices command, or we could call checkMultiVoices on the undo.

Just tested after the patch, it is much improved. But, just for a lark, look at what happens to a note when you compound the issue by adding a fermata to the mix (fermata and sforzato, for instance) in the section where there are two voices. Some very strange looking things start happening.

Do you mean the fact that the accent flips to the opposite side of the note? You're right, that looks not good. But my code didn't touch vertical positioning, so i have to assume it was that way before. Feel free to file a separate issue with sample score / steps. I assume the relevant code is in Chord::layoutArticulations where there are special cases for certain combinations of two articulations.