lilypond-user
[Top][All Lists]
Advanced

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

Re: GrandStaff vertical distance


From: Thomas Morley
Subject: Re: GrandStaff vertical distance
Date: Sun, 14 Oct 2018 14:33:48 +0200

Am Sa., 13. Okt. 2018 um 11:56 Uhr schrieb foxfanfare <address@hidden>:
>
> Lukas-Fabian Moser wrote
> > I disagree that LP does not follow the standard engraving rules. It just
> > seems to me that \new GrandStaff etc. imply a certain semantics which is
> > perfectly alright for, e.g., an orchestral Piano part, but just does not
> > apply for the braces connecting Violin 1 and 2. - I do not own Gould's
> > book, but I would expect that this is discussed there.
>
> I have her book. About the curly braces, she says: "The curly bracket, also
> called a brace, connects the staves of instruments that use two staves: most
> commonly keyboard and harp. [...] The brace may connect two or more staves
> of like instruments (or like voices), but this is a traditional style now
> rarely used in orchestral music: it is more effective visually - and
> space-saving - to reserve it for joining the staves of a single instrument"
>
> The brace used for a single instrument should be written with PianoStaff. I
> see absolutely no reason of using the GrandStaff for that purpose! Or could
> someone explain me why two functions would do exactly the same thing?
>
> The GrandStaff connector should be reserved as a secondary demarcation (it
> is by the way how it is presented in the documentation and examples!) and
> that is why I think the default behaviour is wrong in this case (or the
> documentation misleading).
>
> I think it is the same with "square bracket" which should only apply to
> secondary demarcation. In the documentation
> (http://lilypond.org/doc/v2.19/Documentation/notation/displaying-staves#nested-staff-groups),
> the "square bracket" is used in the second example as a primary demarcation.
> I looked in different scores and cannot find this kind kind of use anywhere!
>
> I may be wrong, but in my opinion, that is what I would expect for the
> default behaviour of staff grouping:
> - PianoStaff for a single instrument, with a centered instrument name label
> (if needed, a staff label could be added). This group takes spaces on top
> and below itself.
> - StaffGroup for grouping different instruments in a same section with a
> main bracket. This group takes spaces on top and below itself.
> - GrandStaff (or something else) for secondary grouping. Like the function
> you have produced and which allow the user to choose whatever he wants as a
> secundary demaraction, but without adding any spaces.


Hi all,

sorry, I'm late to the party.

Though, the whole thread mixes up different topics.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(1) Setting of systemStartDelimiter in container-context
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Which SytemStartGrob (SytemStartBrace, SystemStartBracket,
SystemStartSquare, SystemStartBar) is taken for container-contexts
like ChoirStaff, PianoStaff, GrandStaff, StaffGroup (did I miss one?)
will be determined which value the context-property
systemStartDelimiter takes.

Which SystemStartGrob is actually taken has no influence on spacing
(without doing other things as well).
Look at the example below demonstrating things with ChoirStaff.
You can switch to whatever SystemStartGrob, spacing will not change.
Comment my spacing-settings, which I only inserted to make things more
obvious, you'll observe a wider spacing ofcourse but no changes for
different SystemStartGrobs.

\score {
  <<
    \new ChoirStaff
    <<
      \new Staff R1
      \new Staff R1
    >>
    \new ChoirStaff
    <<
      \new Staff R1
      \new Staff R1
    >>
  >>
  \layout {
    \context {
      \ChoirStaff
      systemStartDelimiter =
        #'SystemStartBracket %% the default for ChoirStaff
        %#'SystemStartBrace
        %#'SystemStartSquare
        %#'SystemStartBar
      \override StaffGrouper.staff-staff-spacing =
        #'((basic-distance . 0)
           (minimum-distance . 0)
           (padding . 0)
           (stretchability . 0))
      \override StaffGrouper.staffgroup-staff-spacing =
        #'((basic-distance . 0)
           (minimum-distance . 0)
           (padding . 0)
           (stretchability . 0))
    }
  }
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(2) Changing the systemStartDelimiterHierarchy
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

As already mentioned in this the user-interface for
systemStartDelimiterHierarchy is terrible. It always gives me a
headache when I need to use it.
So improvements in this regard would be highly welcome, imho.
Maybe Lukas-Fabian's code is a step in this direction. So far I have
not taken a closer look, though.
Nevertheless, adjusting systemStartDelimiterHierarchy has no impact on
spacing, without doing other things as well.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(3) Spacings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

If you want to adjust spacing, then tackle spacing nothing else ;)

First look up the defaults. From IR:

StaffGrouper-defaults:

 staff-staff-spacing (list):
    '((basic-distance . 9)
      (minimum-distance . 7)
      (padding . 1)
      (stretchability . 5))

 staffgroup-staff-spacing (list):
    '((basic-distance . 10.5)
      (minimum-distance . 8)
      (padding . 1)
      (stretchability . 9))

VerticalAxisGroup-defaults:

 default-staff-staff-spacing (list):
    '((basic-distance . 9)
      (minimum-distance . 8)
      (padding . 1))

 nonstaff-unrelatedstaff-spacing (list):
    '((padding . 0.5))

Obviously the provided values differ.

Now fight your way through
http://lilypond.org/doc/v2.19/Documentation/notation-big-page#vertical-spacing
to adjust things to fit your needs.
Granted this chapter of the NR is complex and complicated, I often
think far _too_ complicated.

Here some hints:

As you already found out using
\override VerticalAxisGroup.staff-staff-spacing = ...
results in an even spacing, but will cause other spacing-settings to
be thrown away. So I ignore this possibility for now.

You could use always the same spacing-key-value-list for all settings,
without using VerticalAxisGroup.staff-staff-spacing, ofcourse.
You'll get an even spacing, but keep the possibility to still adjust
spacings where you feel the need to.
Below a verbose example, where this is done in a general layout.
One thing I observed: if you start adjusting things you will need to
add overrides to with-blocks of single-Staffs (not demonstrated
though), doing it all in a general layout doesn't work sufficiently.
Especially if nested context are used (p.e. GrandStaff in ChoirStaff).
I use a large paper-size. If LilyPond feels the need to compress
things, the example would be disturbed.

#(set-default-paper-size "a2")

mus = { c''1 }
lyr = \lyricmode { _ }
drm = \drummode { R1 }

\score {
  <<
    \new StaffGroup = "StaffGroup_woodwinds"
      <<
        \new Staff \with { instrumentName = "Flute" }
          \mus

        \new Staff \with { instrumentName = "Clarinet in Bb" }
          \mus
      >>

    \new StaffGroup = "StaffGroup_brass"
      <<
        \new Staff \with { instrumentName = "Horn in F" }
          \mus

        \new Staff \with { instrumentName = "Trumpet in  C" }
          \mus
      >>

    \new RhythmicStaff \with { instrumentName = "Percussion" }
      \drm

    \new PianoStaff \with { instrumentName = "Piano" }
      <<
        \new Staff \mus
        \new Staff \mus
      >>

    \new ChoirStaff = "ChoirStaff_choir"
      <<
        \new Staff \with { instrumentName = #"Soprano" }
          \new Voice = "soprano"
          \mus

        \new Lyrics \lyricsto "soprano" \lyr

        \new GrandStaff = "GrandStaff_altos"
          \with { \accepts Lyrics }
          <<
            \new Staff \with { instrumentName = "Alto I" }
              \new Voice = "altoI"
              \mus

            \new Lyrics \lyricsto "altoI" \lyr

            \new Staff \with { instrumentName = "Alto II" }
              \new Voice = "altoII"
              \mus

            \new Lyrics \lyricsto "altoII" \lyr
          >>

        \new Staff = "Staff_tenor"
          \with { instrumentName = "Tenor" }
          \new Voice = "tenor"
          \mus

        \new Lyrics \lyricsto "tenor" \lyr
      >>

    \new StaffGroup = "StaffGroup_strings"
    <<
      \new GrandStaff = "GrandStaff_violins" <<
        \new Staff \with { instrumentName = "Violin I" }
          \mus

        \new Staff \with {
            instrumentName = "Violin II"
        }
          \mus
      >>

      \new Staff \with { instrumentName = "Viola" }
        \mus

      \new Staff \with { instrumentName = "Cello" }
        \mus

      \new Staff \with { instrumentName = "Double Bass" }
        \mus
    >>
  >>
  \layout {
        \context {
              \StaffGroup

              \override SystemStartBracket.color = #cyan

          \override StaffGrouper.staff-staff-spacing =
            #'((basic-distance . 9)
               (minimum-distance . 8)
               (padding . 8)
               (stretchability . 0)
               )
          \override StaffGrouper.staffgroup-staff-spacing =
            #'((basic-distance . 9)
               (minimum-distance . 8)
               (padding . 8)
               (stretchability . 0))
      }

        \context {
              \ChoirStaff

              \override SystemStartBracket.color = #blue

          \override StaffGrouper.staff-staff-spacing =
            #'((basic-distance . 9)
               (minimum-distance . 8)
               (padding . 8)
               (stretchability . 0))

          \override StaffGrouper.staffgroup-staff-spacing =
            #'((basic-distance . 9)
               (minimum-distance . 8)
               (padding . 8)
               (stretchability . 0))
      }
        \context {
              \PianoStaff

              \override SystemStartBrace.color = #yellow

          \override StaffGrouper.staff-staff-spacing =
            #'((basic-distance . 9)
               (minimum-distance . 8)
               (padding . 8)
               (stretchability . 0))

          \override StaffGrouper.staffgroup-staff-spacing =
            #'((basic-distance . 9)
               (minimum-distance . 8)
               (padding . 8)
               (stretchability . 0))
      }
        \context {
              \GrandStaff

              \override SystemStartBrace.color = #red

          \override StaffGrouper.staff-staff-spacing =
            #'((basic-distance . 9)
               (minimum-distance . 8)
               (padding . 8)
               (stretchability . 0))

          \override StaffGrouper.staffgroup-staff-spacing =
            #'((basic-distance . 9)
               (minimum-distance . 8)
               (padding . 8)
               (stretchability . 0))
      }
        \context {
              \RhythmicStaff
          \override VerticalAxisGroup.default-staff-staff-spacing =
            #'((basic-distance . 9)
               (minimum-distance . 8)
               (padding . 8)
               (stretchability . 0))
      }
        \context {
              \Staff
          \override VerticalAxisGroup.default-staff-staff-spacing =
            #'((basic-distance . 9)
               (minimum-distance . 8)
               (padding . 8)
               (stretchability . 0))
        }

  }
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(4) Suggestion(s) for default-behaviour of SytemStartXxxx-grobs, i.e.
their nesting.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Not exactly sure what you mean. Could you link/post images what would
you prefer.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(5) Suggestion(s) for default-usage/behaviour of some container-contexts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

- A -
> The brace used for a single instrument should be written with PianoStaff. I
> see absolutely no reason of using the GrandStaff for that purpose! Or could
> someone explain me why two functions would do exactly the same thing?

PianoStaff and GrandStaff are not the same, see  engraver-init.ly:

\context{
  \GrandStaff
  \name "PianoStaff"
  \alias "GrandStaff"

  \description "Just like @code{GrandStaff}, but the staves are only removed
together, never separately."

  \consists "Vertical_align_engraver"
  \consists "Keep_alive_together_engraver"
  topLevelAlignment = ##f

  instrumentName = #'()
  shortInstrumentName = #'()
}

So PianoStaff is derived from GrandStaff, but has the
"Keep_alive_together_engraver" (as the main difference).

Both have the SystemStartBrace, yes, I don't see any thing wrong with it.

- B -
Whether the default spacing-values should be changed, I'm undecided.
We should provide some default ofcourse and I easily can imagine
complaints if we would go for always even spacing.
So what to do?
Best I can think of: improve the docs.

Interested?

Ofcourse you would need to understand all subtleties of the current
implementation.
I really doubt I could say that for myself.

Still interested? ;)


HTH,
  Harm



reply via email to

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