On Monday 28 February 2005 15.04, Yuval Harel wrote:
> It seems staff changes don't work at the beginning of a score. In this
> example, the {a} is incorrectly produced in the right-hand staff:
>
> \version "2.4.2"
>
> \score {
>      \context PianoStaff=PS <<
>          \context Staff=RH {
>              \change Staff=LH a
>          }
>          \context Staff=LH {
>              \clef bass
>              c4
>          }
>
> }
>
>
> Adding notes before the {a} prevents this problem.

I think this is because \change Staff must be done inside a Voice context. A 
voice context is defined implicitly by adding notes before, or as you 
suggested with a \context Voice or \new Voice.

> Outside the main voice, the change works, but \stemUp (or \voiceOne) has
> no effect:
>
> \version "2.4.2"
>
> \score {
>      \context PianoStaff=PS <<
>          \context Staff=RH {
>              \context Voice="1" {\change Staff=LH \stemUp a}
>          }
>          \context Staff=LH {
>              \clef bass
>              \stemDown c
>          }
>
> }

Try adding a \new Voice for the voice in the LH staff. (I think, again, that 
the second staff's voice isn't defined before the c, so the \stemDown is done 
in the LH Staff context, hence the entire staff is affected by it)

Erik


_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to