bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Polyphony confuses \change


From: David Kastrup
Subject: Re: Polyphony confuses \change
Date: Tue, 03 Mar 2020 15:23:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Jean Abou Samra <address@hidden> writes:

>    Hi again,
>
>    In this example, LilyPond complains and \change has no effect. However,
>    if you move the \change between the second and the third measure (i.e.
>    one line lower), then all is fine. So, it seems that \change does not
>    work right after the end of simultaneous voices.

Wrong.  \change does not work to change a Staff from Staff to Staff, and
at the point of your first \change command, you do not yet have a Voice
(the temporary voices started in << \\ >> have just ended).

So the solution is to actually start a voice.

>    \version "2.21.0"
>
>    <<
>      \new Staff = "up" {

try    \new Staff = "up" \new Voice {

and you'll actually _have_ a Voice that can change to the other Staff.

>        << { c'' } \\ { c' } >>
>        \change Staff = "down"
>        c'4
>        c'4
>      }
>      \new Staff = "down" {
>        s4*3
>      }
>    >>
>
>    The log contains:
>
>    warning: Change_iterator::process (): Staff = `up':
>    -:8:5: warning: cannot change `Staff' to `down': not changing to same
>    context type: Staff
>    \change Staff = "down"
>
>    A workaround is to add a \grace s8  in all voices, between the end of
>    simultaneous voices and the \change invocation.
>
>    Regards,
>
>    Jean Abou Samra
> _______________________________________________
> bug-lilypond mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-lilypond

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]