I did some tests and I discovered something that's not clear.

Why in the following code the very last note `d4` stem is up?

%%%
\version "2.25.23"
\fixed c' \new Staff
{
  %a1
  <<
    {\voiceTwo a,4 d g c' }
    \new Voice {\voiceOne r1 }
  >>
  d4 % stem up
}
%%%


I didn't call \oneVoice so I was expecting 'd4' would continue the
\voiceTwo and then have its stem direction down.
Things work as expected if I uncomment the note a1 before the polyphony.

Any suggestions?
Thanks, g.

On Mon, 24 Feb 2025 at 21:32, Gianmaria Lari <gianmarial...@gmail.com>
wrote:

> oh! Great! Grazie Knute, very clear!!! Thanks!!!
>
> On Mon, 24 Feb 2025 at 19:29, Knute Snortum <ksnor...@gmail.com> wrote:
>
>> On Mon, Feb 24, 2025 at 8:39 AM Gianmaria Lari <gianmarial...@gmail.com>
>> wrote:
>>
>>> Thanks Knute, very clear example. And thanks David also for your reply.
>>>
>>> What's about \oneVoice? In my examples adding or removing it doesn't
>>> change the output.
>>>
>>>>
>>>> > >> \fixed c' \new Staff
>>>> > >> {
>>>> > >>   \incipit
>>>> > >>   <<
>>>> > >>     {\voiceOne \voiceB}
>>>> > >>     \new Voice {\voiceTwo \voiceA}
>>>> > >>   >>
>>>> > >>   \conclusion
>>>> > >> }
>>>> > >>
>>>> > >> %%%
>>>> > >>
>>>> > >> The output is exactly the same but I'm wondering if there are
>>>> > >> substantial differences I should be aware of.
>>>> > >
>>>> > In the second form, the incipit, voiceB, and the conclusion are all
>>>> in the
>>>> > same context.  That means that the conclusion will be in \voiceOne.
>>>> This
>>>> > can be useful if you want to, for instance, slur from the incipit to
>>>> > voiceB, or from voiceB to the conclusion.
>>>>
>>>
>> Change this:
>>
>> conclusion = {c'4 4 4 4}
>>
>> ...and you'll see the difference.  The main context has been changed to
>> \voiceOne, so if you want \oneVoice again, you have to explicitly set it.
>>
>> --
>> Knute Snortum
>>
>>

Reply via email to