lilypond-user
[Top][All Lists]
Advanced

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

Re: Consistent bar number positioning


From: Nicholas Moe
Subject: Re: Consistent bar number positioning
Date: Sat, 11 Jun 2011 21:19:08 -0500

Thank you! That works!

It does put bar numbers on every staff, though. To fix it, change the
#'break-visibility option in each staff. Tthis is what part of my
\score block looks like:

%% Begin excerpt

\new ChoirStaff
<<
        \new Staff = "womenChoirOne"
        <<
                \override Staff.BarNumber #'break-visibility = #'#(#f #t #t)
                \set Staff.barNumberVisibility = #(every-nth-bar-number-visible 
5)
                \new Voice = "SopranosChoirOne" { 
\looksSlower{\sopranosChoirOneMusic} }
                \new Voice = "AltosChoirOne" { 
\looksSlower{\altosChoirOneMusic} }
                \new Lyrics \with { alignAboveContext = "womenChoirOne" } {
                        \lyricsto "SopranosChoirOne" { \sopranosChoirOneText }
                }
                \new Lyrics \lyricsto "AltosChoirOne" { \altosChoirOneText }
        >>
        \new Staff = "menChoirOne"
        <<
                \override Staff.BarNumber #'break-visibility = #'#(#f #f #f)
                \new Voice = "TenorsChoirOne" { 
\looksSlower{\tenorsChoirOneMusic} }
                \new Voice = "BasesChoirOne" { 
\looksSlower{\basesChoirOneMusic} }
                \new Lyrics \with { alignAboveContext = "menChoirOne" } {
                        \lyricsto "TenorsChoirOne" { \tenorsChoirOneText }
                }
                \new Lyrics \lyricsto "BasesChoirOne" { \basesChoirOneText }
        >>
>>

%% End excerpt

The only problem now is that the bar numbers are a little too cozy to
the brackets when they fall at the beginning of a line. But I fixed
that, too. You can do one of two things:

1. Put this before the first note of a measure that has a number and
falls at the beginning of a system:

\once \override Staff.BarNumber #'X-offset = #-3

OR

2. Turn the bar number centering option on in your \context { \Staff }
block (this fixes it automatically by slightly raising the bar number
to clear the top of the bracket—I actually think it looks quite nice):

\override BarNumber #'self-alignment-X = #CENTER

I noticed that this is also a way to put bar numbers on each group,
i.e. if you have a two-choir piece with a ChoirStaff for each choir,
each ChoirStaff can have bar numbers if you set these options at the
beginning of that group's top staff:

\override Staff.BarNumber #'break-visibility = #'#(#f #t #t)
\set Staff.barNumberVisibility = #(every-nth-bar-number-visible 5) %
or however often you want bar numbers to be visible

Again, thanks, Eluze, and I hope this will be of help to anyone who
wants to do something similar in the future.

Cheers,

Nick





On Fri, Jun 10, 2011 at 4:47 PM, -Eluze <address@hidden> wrote:
>
>
> Nicholas Moe wrote:
>>
>> Thanks, Eluze. That worked in my example, but in the actual score, it
>> doesn't. The spacing is still inconsistent, especially after line
>> breaks. I'm including a better example of what happens.
>>
> maybe the extra-offset wasn't a good idea since when there is a rest (R1)
> and consequently no lyric text the extra-offset is mis-oriented or looses
> its base …
>
> an other idea is to move the Bar_number_engraver from the Score to the Staff
> context
>
> \score {
>  \new Staff = "staff" {
>    \override Staff.BarNumber #'break-visibility = #'#(#f #t #t)
>    \set barNumberVisibility = #(every-nth-bar-number-visible 1)
>    <<
>      \new Voice = "music" \relative c'' {
>        %         \override Score.BarNumber #'extra-offset = #'( 0 . -3.5 )
>        \voiceOne
>        \repeat unfold 9 { b1 } r2 r4 b4~ b8 b8 b4 b4 b4 \break
>        R1 \repeat unfold 6 { b1 }
>      }
>      \new Lyrics \with { alignAboveContext = "staff" } \lyricsto "music" {
>        \lyricmode {
>          fi -- li -- um et vo -- ca -- bant e -- um
>          no -- mi -- ne pa -- tris
>          su -- i Za -- cha -- ri -- am.
>        }
>      }
>    >>
>  }
> }
> \layout {
>  \context {
>    \Score
>    \remove Bar_number_engraver
>  }
>  \context {
>    \Staff
>    \consists Bar_number_engraver
>  }
>  \context {
>    \Lyrics
>    \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing =
>    #'((basic-distance . 5)
>     (minimum-distance . 5)
>     (padding . .75))
>  }
> }
>
> again - this seems to work, but i really don't know if it will not break at
> another point!
>
> maybe the developers can tell what to do!?
>
> cheers
> Eluze
> --
> View this message in context: 
> http://old.nabble.com/Consistent-bar-number-positioning-tp31815077p31821383.html
> Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>



reply via email to

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