lilypond-user
[Top][All Lists]
Advanced

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

Re: staff to end of socre


From: David Nalesnik
Subject: Re: staff to end of socre
Date: Wed, 14 Dec 2011 13:04:01 -0600

Hi Damian,

On Wed, Dec 14, 2011 at 12:25 PM, Damian leGassick <address@hidden> wrote:
On 14 Dec 2011, at 18:22, Damian leGassick wrote:

> Hi all
>
> In this example the second staff is left hanging
>
> <<
> \new Staff {b b b b}
> \new Staff {b b}
>>>
>
> Can I force all staves to go to the end of the file without adding rests or spacers?

I'm not clear exactly what you want.  Do you want the staff with only two notes to continue for the same length as the other staff, minus the barline at the end? If so, an easy solution would in fact be to use spacer rests and hide one of the barlines:

<<
  \new Staff {
    b b s2
    \once \override Staff.BarLine #'transparent = ##t
  }
  \new Staff {b4 b b b}
>>

If you want both lines to stretch the full width of the page without spacers, you could do something like this:

\paper {
  ragged-right = ##f
}

#(define (to-end-of-line grob)
    (ly:output-def-lookup (ly:grob-layout grob) 'line-width))
  
<<
  \new Staff {
    \override Staff.StaffSymbol #'width = #to-end-of-line 
    b4 b b b
    b b
  }
  \new Staff {
    \repeat unfold 7 {b b b b}
  }
>>

HTH,
David

reply via email to

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