It's always very difficult to understand and find problems in
an uncomplete section of code. You have much better chances to
get relevant answers if you make a small but complete toy example
that illustrates what you tried and want to do (also, every so often,
you find the solution yourself during the preparation of the small
example). Also, always tell what LilyPond version you use, since
LilyPond keeps evolving from version to version.
Did you see the example called staff-halfway.ly in the "Regression Test"
document at www.lilypond.org? It shows the easiest way to create
additional staves in the middle of a piece. However, since LilyPond
always orders the staves vertically in the order they first appear in
the \score{...} section, this will probably not give the result you
want. The best solution is probably to use the RemoveEmptyStaffContext
feature and create all the staves already from the top of the score.
Something like:
\score{
\context ChoirStaff <<
\context Staff = separateSopranos{ s1*20}
\context Staff = women <<
\context Voice = sop {\sopm
\change Staff=separateSopranos \amensop}
\context Voice = alt {\altm \amenalt}
>>
...
>>
\layout{\context {\RemoveEmptyStaffContext}}
}
The s1*20 should be modified to keep the top Staff context alive until
the voice moves up.
/Mats
Michiel Lange wrote:
I have this piece of music I'm working on, and for the greater part
the music of the Sopranos and Altos are combined on a Staff with the
usage of VoiceOne and VoiceTwo. The same goes up for the Tenors and
Basses.
Almost at the end of the piece I wanted to "explode" the combined
voices into separate staves, and thought I would solve it this way in
the Score (see \score part below). However, Lilypond starts to cross
fingers, wants to go back in time and another bunch of errors...
Obviously, I am doing something utterly stupid... but what is it?
Thanks in advance!
- Michiel
--> score snippet <--
\score
{
<< {
\context ChoirStaff<<
\context Staff = women <<
\key ges \major \clef violin
\context Voice= sop
{
\relative c''
{
\voiceOne << \sopm >>
}
}
\context Voice=alt
{
\relative c''
{
\voiceTwo << \altm >>
}
}
>>
\lyricsto sop \new Lyrics \lyrenw
\context Staff = men <<
\clef bass \key ges \major
\context Voice=ten
{
\relative c'
{
\voiceOne << \tenm >>
}
}
\context Voice=bas
{
\relative c'
{
\voiceTwo << \basm >>
}
}
\lyricsto ten \new Lyrics \lyrenm
>>
>>
\context ChoirStaff
<<
\context Staff=sopamen
<<
\key ges \major \clef violin
\context Voice=amensop
{
\relative c''
{
\amensopm
}
}
\lyricsto amensop \new Lyrics \amensopl
>>
\context Staff=altamen
<<
\key ges \major \clef violin
\context Voice=amenalt
{
\relative c'
{
\amenaltm
}
}
\lyricsto amenalt \new Lyrics \amenaltl
>>
\context Staff=tenamen
<<
\key ges \major \clef violin
\context Voice=amenten
{
\relative c'
{
\amentenm
}
}
\lyricsto amenten \new Lyrics \amentenl
>>
\context Staff=basamen
<<
\key ges \major \clef bass
\context Voice=amenbas
{
\relative c,
{
\amenbasm
}
}
\lyricsto amenbas \new Lyrics \amenbasl
>>
>> }
\context PianoStaff <<
\context Staff
{
\relative c'
{
\key ges \major \clef violin
\pianor
}
}
\new Staff
{
\relative c'
{
\key ges \major \clef bass
\pianol
}
}
>>
>>
--> end of score snippet <--
_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user