# Polyphony confuses \change

8 messages
Open this post in threaded view
|

## Polyphony confuses \change

 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.    \version "2.21.0"    <<      \new Staff = "up" {        << { 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 [hidden email] https://lists.gnu.org/mailman/listinfo/bug-lilypond
Open this post in threaded view
|

## Re: Polyphony confuses \change

 Jean Abou Samra <[hidden email]> 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 > [hidden email] > https://lists.gnu.org/mailman/listinfo/bug-lilypond-- David Kastrup _______________________________________________ bug-lilypond mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/bug-lilypond
Open this post in threaded view
|

## Re: Polyphony confuses \change

 In reply to this post by Jean ABOU SAMRA > 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. > and you'll actually _have_ a Voice that can change to the other Staff. OK, thanks, I do understand now. It's logical after all. The warning is not very helpful though because in this case, the problem was not the type of the context we were changing to but that of the context that had to be switched. But that's quibbling. Regards, Jean Abou Samra _______________________________________________ bug-lilypond mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/bug-lilypond
Open this post in threaded view
|

## Re: Polyphony confuses \change

 Jean Abou Samra <[hidden email]> writes: >> 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. > >> and you'll actually _have_ a Voice that can change to the other Staff. > > OK, thanks, I do understand now. It's logical after all. > > The warning is not very helpful though because in > this case, the problem was not the type of the context we > were changing to but that of the context that had to be > switched. But that's quibbling. Well, the less reason for quibbling (which I myself tend to indulge in more than appropriate) ends up on our list and the less confusion ends up with our users, the friendlier LilyPond will appear to everyone.  So if you have a good suggestion of how to improve that warning in a manner that would have increased the likelihood of you understanding just what the problem was, feel free to suggest a different wording, possibly depending on the situation (we don't need the same warning text for everything: we can special-case some cases). And rather than wasting unnecessary time with LilyPond (like you probably feel the current text made you do), you'll invest time for an actual improvement benefitting users that may see the same problem in future. All the best -- David Kastrup My replies have a tendency to cause friction.  To help mitigating damage, feel free to forward problematic posts to me adding a subject like "timeout 1d" (for a suggested timeout of 1 day) or "offensive". _______________________________________________ bug-lilypond mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/bug-lilypond
Open this post in threaded view
|

## Re: Polyphony confuses \change

 Hi,    Le 3 mars 2020 à 20:58, David Kastrup < [1][hidden email]> a écrit :    Well, the less reason for quibbling (which I myself tend to indulge in    more than appropriate) ends up on our list and the less confusion ends    up with our users, the friendlier LilyPond will appear to everyone. So    if you have a good suggestion of how to improve that warning in a    manner    that would have increased the likelihood of you understanding just what    the problem was, feel free to suggest a different wording, possibly    depending on the situation (we don't need the same warning text for    everything: we can special-case some cases).    And rather than wasting unnecessary time with LilyPond (like you    probably feel the current text made you do), you'll invest time for an    actual improvement benefitting users that may see the same problem in    future.    All the best    Yes, I know. I would have suggested a different wording if I    had had a brilliant idea, but this was not the case.    Anyway, I hope the attached patch will help.    Best regards,    Jean Abou Samra References    1. mailto:[hidden email] _______________________________________________ bug-lilypond mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/bug-lilypond
Open this post in threaded view
|

## Re: Polyphony confuses \change

 Jean Abou Samra <[hidden email]> writes: > Hi, > >  Le 3 mars 2020 à 20:58, David Kastrup < [hidden email]> a écrit : > >  Well, the less reason for quibbling (which I myself tend to indulge in >  more than appropriate) ends up on our list and the less confusion ends >  up with our users, the friendlier LilyPond will appear to everyone. So >  if you have a good suggestion of how to improve that warning in a manner >  that would have increased the likelihood of you understanding just what >  the problem was, feel free to suggest a different wording, possibly >  depending on the situation (we don't need the same warning text for >  everything: we can special-case some cases). > >  And rather than wasting unnecessary time with LilyPond (like you >  probably feel the current text made you do), you'll invest time for an >  actual improvement benefitting users that may see the same problem in >  future. > >  All the best > > Yes, I know. I would have suggested a different wording if I > had had a brilliant idea, but this was not the case. > > Anyway, I hope the attached patch will help. Since you did not just send to the list but also sent a private copy to my mail account, I am pretty sure that the patch never attached itself. We've had various occurences of patches not making it through the list server, but in this case, my personal copy arrived without going through the list server, so you likely just forgot.  Happens. -- David Kastrup My replies have a tendency to cause friction.  To help mitigating damage, feel free to forward problematic posts to me adding a subject like "timeout 1d" (for a suggested timeout of 1 day) or "offensive". _______________________________________________ bug-lilypond mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/bug-lilypond