lilypond-user
[Top][All Lists]
Advanced

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

bar numbers above StaffGroups


From: Orm Finnendahl
Subject: bar numbers above StaffGroups
Date: Sun, 1 Jun 2014 14:23:02 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

 I'm trying to print bar numbers not only at the top of the score, but
also above selected groups, (like brass, percussion, strings, etc.).

The code below does the trick, but the bar numbers are both printed in
columns above the topmost staff. Is there a canonical way to get them
printed directly above the StaffGroup?

I know there is a workaround by inserting an empty staff as topmost
staff of the group with Staff_symbol_engraver and such removed,
BarNumberEngraver enabled for that staff, keeping it alive and
reducing its height to 0. But I guess that wouldn't work very well if
notes on the topmost visible staff of that StaffGroup are sticking out
at the top: All bar numbers of the StaffGroup in that line then would
get printed way above the staff.

--
Orm

\version "2.19.5"

music = { \relative c' { \repeat unfold 16 { c4 d e f } } }

\score {
  <<
    \new Staff { \music }
    \new Staff { \music }
    \new StaffGroup = "mygroup" \with {
      \consists "Bar_number_engraver"
    }        
    {
    <<
    \new Staff { \music }
    \new Staff { \music }
    >>
  }
  >>

  \layout{
    \context { 
      \Score
      \override BarNumber.break-visibility = ##(#t #t #t)
    }
  }
}



Using "\consists "Bar_number_engraver"" doesn't seem to do anything if
defined in a StaffGroup, but works for staffs. This is disadvantegous
as the barnumbers above the topmost staff in a group disappear if the
staff gets removed with \removeEmptyStaves.

Below are some snippets to show what I'm talking about. Is there a way
to make this work for a Staffgroup?

--
Orm

This doesn't show any barnumbers above the strings:

\



reply via email to

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