lilypond-user
[Top][All Lists]
Advanced

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

Re: Spacing Cheat Sheet


From: Kaj
Subject: Re: Spacing Cheat Sheet
Date: Thu, 12 Mar 2015 09:38:02 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

Hi Joram,

Yes, of course, I can say now after your replay and explanation. Why didn't I see this myself? For what you point out, of course I have seen this with hierarchy and different kinds of staff grouping a lot of times when reading the documentation. But I did not realize the consequences of my reading. Your are a good teacher, and also a wee of mind reader, which probably is one important making of being a successful teacher. What you pointed out is exactly my case: no StaffGroup but ChoirStaff and PianoStaff. So of course I my efforts to move the staves had no effect by just copying from your sheet. Now I can say "of course", but I did not realize this. Your explanation has opened my eyes, and I have come a few steps further towards the true understanding. Thank you!

Kaj

On 2015-03-12 01:31, Noeck wrote:
Dear Kaj,

you are brave to really dig through all this! That's a good thing. I
think I can help you here, too:

It is correct (and it works like expected) if you do
\override StaffGroup.StaffGrouper.staff-staff-spacing.padding = 30
like I wrote. But only (!) if your grouping context is a StaffGroup. In
case you have a PianoStaff or a ChoirStaff or anything else, you need to
override the property of that context. I.e.
\override PianoStaff.StaffGrouper.staff-staff-spacing.padding = 30
and the like.
There is a context hierarchy in LilyPond: A lower level context (e.g.
Voice) can be inside a staff, which can be inside a staff group, which
can be inside a score. Of course more complex nesting is possible.
The important thing for you is: The inner contexts inherit (take the
overrides) from the outer contexts. In your case, if you override the
StaffGrouper of the Score, that overrides the spacing for any
StaffGrouper in the Score. If you override the spacing for the
StaffGroup (and similar), only this kind of group is affected and if you
do so in the \with statement, only this particular context is affected.

Here is an example showing some possible overrides:

\version "2.18.2"

\layout {
   % no effect because there is no StaffGroup
   % only PianoStaff and ChoirStaff
   \override StaffGroup.StaffGrouper.staff-staff-spacing.padding = 60
   % this works for the piano staff (upper group)
   \override PianoStaff.StaffGrouper.staff-staff-spacing.padding = 15
   % this works for all groups but the PianoStaff has more specific
   % settings which are used instead
   \override Score.StaffGrouper.staff-staff-spacing.padding = -2
   \override Score.StaffGrouper.staff-staff-spacing.basic-distance = 0
}

  <<
   \new PianoStaff <<
     \new Staff { a }
     \new Staff { b }
   >>
   \new ChoirStaff <<
     \new Staff { c }
     \new Staff { d }
   >>
   \new PianoStaff \with {
     % this override only affects this second piano staff
     % overriding the Score and PianoStaff overrides from
     % the layout block above
     \override StaffGrouper.staff-staff-spacing.padding = 4
   } <<
     \new Staff { e }
     \new Staff { f }
   >>
  >>

Don't hesitate to ask again if things are still unclear.

Cheers,
Joram




reply via email to

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