lilypond-user
[Top][All Lists]
Advanced

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

Re: system-system-spacing unevenness


From: Thomas Morley
Subject: Re: system-system-spacing unevenness
Date: Sat, 21 Feb 2015 22:52:52 +0100

2015-02-21 20:55 GMT+01:00 Jim Long <address@hidden>:
> I'd like to take just a slight tangent on the recent thread about
> increasing system-system-spacing.  I often have scores that show
> up with uneven spacing.  A tiny example is attached.
>
> First, is it syntactically correct?
>
> And second, how can I get the system spacing more even?
>
> The example intentionally doesn't alter system-system spacing
> anywhere.  Instead, it just uses ragged-last-bottom = ##f.  I
> would like the spacing to be equally distributed.  There are 8
> gaps between the 9 systems, but the system-system gaps are
> unequal in size.
>
> How can I get the systems to be equally spaced?
>
> Thanks!
>
> Jim


Hi,

instead of trying to explain things, I paste your code with several
comments below.

In general, LilyPonds spacing-engine is a fabulous one, though, and
that's a big "though", it's very hard to understand (and to remember)
how it works and how to get the disered results.
Speaking only for me, I have to _study_ (not a quick glance as mostly,
like "how was that spelled?") the relevant parts of the NR _every_
time I manipulate spacing-settings.

But 'annotate-spacing' is your friend!

\version "2.18.0"

\paper {
    ragged-last-bottom = ##t
    %% 'annotate-spacing' is your friend
    %annotate-spacing = ##t
}

\paper {
  %% settings for page-layout
  %% the default (taken from paper-defaults-init.ly)
  %system-system-spacing =
  %  #'((basic-distance . 12)
  %     (minimum-distance . 8)
  %     (padding . 1)
  %     (stretchability . 60))
}

melody = \new Staff
%% 'melody' is the lowest context, therefore
%% \override VerticalAxisGroup.staff-staff-spacing
%% has no effect
%% use 'system-system-spacing' in \paper as shown above
%% see:
 \with {
       %% a not valid setting for score-spacing:
       \override VerticalAxisGroup.staff-staff-spacing = #'(
                   (basic-distance . 100)
                   (minimum-distance . 100)
                   (padding . 100)
         )
 }
\repeat unfold 9 { \repeat unfold 4 { g4 g'' g'' g'' } \break }


harmonies = \new ChordNames
\with {
      %% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      %% from NR:
      %% "Setting staff-affinity to #f causes a non-staff line to be treated
      %% as a staff."
      %% Now 'ChordNames' are recognized by the spacing-engine and equal
      %% spacing should result, meaning the space between the upper Staff
      %% for melody and the ChordNames are always the same (not the space
      %% between two melody-Staffs, though.)
      %% More, 'VerticalAxisGroup.staff-staff-spacing' will work now, as a valid
      %% setting for score-spacing
      %% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      \override VerticalAxisGroup.staff-affinity = ##f %% default is @code{DOWN}
      \override VerticalAxisGroup.staff-staff-spacing = #'(
                  (basic-distance . 0.5)
                  (minimum-distance . 0.5)
                  (padding . 1)
                  (stretchability . 0)
        )
}
\chordmode {
      \repeat unfold 9 { c2 a2:m | f2 g2 | s4 c s a:m | f2 g2 }
}


rhythms = \new RhythmicStaff \with {
      \override StaffSymbol.line-count = #0
      \override StaffSymbol.staff-space = #(magstep -3)
      \omit BarLine
      \omit TimeSignature
      \override NoteHead.style = #'slash
      %% a valid setting for score-layout:
      \override VerticalAxisGroup.staff-staff-spacing = #'(
                  (basic-distance . 1)
                  (minimum-distance . 1)
                  (padding . 1)
        )
      fontSize = #-2
} { % 36 bars
      \stemDown
      s1*8
      s1 s1 | r4 b r b | b r b r
      s1*4
      s1 s1 | r4 b r b | b r b r
      s1*8
      s1 s1 | r4 b r b | b r b r
      s1 s1 | r4 b r b | b r b r
} % rhythms


\score {
  <<
    \harmonies
    \rhythms
    \melody
  >>
  \layout {
    \context { \RhythmicStaff \RemoveEmptyStaves }
  }
}

HTH,
  Harm



reply via email to

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