Adding a NullVoice
to a staff with two other voices affects the orientation of ties and slurs. Consider the following three Examples and their output:
\version "2.22.2"
<<
\new NullVoice { c } \\
\stemUp { b2~ b} \\
\stemDown { e2~ e }
>>
\version "2.22.2"
<<
\stemUp { b2~ b} \\
\stemDown { e2~ e }
>>
\version "2.22.2"
<<
{ b2~ b} \\
{ e2~ e } \\
\new NullVoice { c }
>>
The version containig a NullVoice
before the other voices (1) has a downwards facing tie, although it is the first (topmost) visible voice in the staff, and an upwards facing one in the voice below.
If the NullVoice
is removed (2), the upper tie is facing upwards, the lower one downwards, which is the expected result.
Moving the NullVoice
below the visible voices (3) produces the same output as (2) without the NullVoice
.
Exactly the same happens with slurs in place of ties.
[Edit:] Rests also seem to be affected in a similar way, they are displaced vertically if a NullVoice
is present.
My question now is: Why does (and why should) a NullVoice
, which exists to be invisible, affect the visual output of the other voices?
(Obviously the third option is the way to go in this specific scenario, because it works as expected and saves you from manually setting the stem directions.)
Would this be considered a bug, or is there a reasoning behind this behaviour that I don't see?
tldr: Is it intended (and if yes, why) that invisible voices affect the visual output?
stemUp
andstemDown
are obviously not needed, I left them there to make it clear, that the only difference to the first example is the removal of theNullVoice
.