lilypond-user
[Top][All Lists]
Advanced

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

Re: Multiple staffs for a div. section


From: Leo Correia de Verdier
Subject: Re: Multiple staffs for a div. section
Date: Wed, 29 Sep 2021 12:44:40 +0200

In this case it’s not that complicated, and you can do it in simpler ways. The 
thing is a StaffGroup must be created before (in musical notation time) any 
staves it’s supposed to contain. Be careful about when you create staves and 
when they’re created automatically for lack of a staff context for a given 
voice to live in.

Here are two examples:

%%%%%%%%%%%%%%%
\version "2.22.1"
music = \relative c'
\new StaffGroup <<
    \new Staff { \repeat unfold 10 c'1 \break 
                 \repeat unfold 10 c1  \break 
                 \repeat unfold 10 c1 }
        { \skip 1*10 
         \new Staff { \repeat unfold 10 c,1 } } >>
        
\score{
        \music
        \layout{}
}

musicTwo = 
\relative c' 
\new StaffGroup {
  { \repeat unfold 10 c'1 }
  << { \break \repeat unfold 10 b1 }
     \new Staff { \repeat unfold 10 g1 } >>
  { \break \repeat unfold 10 a1 }
}

\score{
        \musicTwo
        \layout{}
}
%%%%%%%%%%%%%



> 29 sep. 2021 kl. 10:07 skrev Xavier Scheuer <x.scheuer@gmail.com>:
> 
> On Wed, 29 Sept 2021 at 08:56, Evan Driscoll <evaned@gmail.com> wrote:
> >
> > I am probably missing something fundamental in my LilyPond knowledge that 
> > would help with the following question, but I'm not sure what it is, and 
> > I'm having a lot more difficulty than normal figuring out what to look for 
> > in the manual.
> >
> > Anyway, the piece starts off in unison, then has a div. section written on 
> > multiple staffs, then comes back together.
> >
> > I can get multiple staffs with
> >     <<
> >         { ...top part.. }
> >         \new Staff { ...bottom part ...}
> >     >>
> > but what I really want is a staff group. The bracket on the left would be 
> > nice, but even more critical are the shared barlines.
> >
> > However, I can't figure out how to get a \new StaffGroup to work. If I use 
> > it as shown in the manual (but for the top-level staff creation) with my 
> > two inside, then I get *three* staves, the first one just empty.
> >
> > LilyBin exemplar with a couple of my attempts: http://lilybin.com/ul6alr/5
> 
> Hello,
> 
> In this case I typically use a combination of Keep_alive_together_engraver 
> and VerticalAxisGroup.remove-layer with keepAliveInterfaces.
> See NR 1.6.2 Modifying single staves > Hiding staves
> http://lilypond.org/doc/v2.23/Documentation/notation/modifying-single-staves.html#hiding-staves
> 
> Cheers,
> Xavier
> 
> -- 
> Xavier Scheuer <x.scheuer@gmail.com>
> 




reply via email to

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