lilypond-user
[Top][All Lists]
Advanced

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

Re: bar numbers above StaffGroups


From: David Kastrup
Subject: Re: bar numbers above StaffGroups
Date: Sun, 01 Jun 2014 14:53:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Orm Finnendahl <address@hidden> writes:

> 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.


2.2.8 Bar_number_engraver
-------------------------

A bar number is created whenever ‘measurePosition’ is zero and when
there is a bar line (i.e., when ‘whichBar’ is set).  It is put on top of
all staves, and appears only at the left side of the staff.  The staves
are taken from ‘stavesFound’, which is maintained by *note
Staff_collecting_engraver::.


2.2.112 Staff_collecting_engraver
---------------------------------

Maintain the ‘stavesFound’ variable.

   Properties (read)

     ‘stavesFound’ (list of grobs)
          A list of all staff-symbols found.
   Properties (write)

     ‘stavesFound’ (list of grobs)
          A list of all staff-symbols found.

   ‘Staff_collecting_engraver’ is part of the following context(s):
*note DrumStaff::, *note GregorianTranscriptionStaff::, *note
KievanStaff::, *note MensuralStaff::, *note PetrucciStaff::, *note
Score::, *note Staff::, *note TabStaff:: and *note VaticanaStaff::.

-- 
David Kastrup



reply via email to

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