lilypond-user
[Top][All Lists]
Advanced

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

Re: Staff spacing


From: Kieren MacMillan
Subject: Re: Staff spacing
Date: Tue, 28 Jun 2011 15:22:03 -0400

Hi Richard,

> It was my understanding that changing the value in parentheses in
> \override VerticalAxisGroup #'staff-staff-spacing = #'(basic-distance . 3)
> would alter the distance between staves, but though I attempted to do so, the 
> staves remained at the default spacing.

You're basically correct, but there are two problems in your code:
    1. You want [or so I infer] to adjust the spacing of the RhythmicStaff, not 
that of the main Staff -- so you should put the override there.
    2. Your override value is incorrectly constructed: if you read the output 
log, you can see that it needs to be a list (not just a single value).

The following modified version should do what you want:

\version "2.14.0" 
\layout {\context {\Score   
}}
<<\new Staff = "main"
{\time 6/8 
%{1 %} r8 g8 [ b8 ~ ] b8 [ d8 f8 ~ ] 
%{2 %}<<{ f8 [ f8 f8 ~ ] f8 d8 r8 %{3 %} r8 g8 [ g8 ~ ] g8 [ e8 c8 ] ~ } 
\new RhythmicStaff \with {
\override VerticalAxisGroup #'staff-staff-spacing = #'((basic-distance . 
1))
alignAboveContext = #"main" fontSize = #-3
\override Stem #'length = #5
\override Stem #'length = #5
\remove "Time_signature_engraver"
\remove "Staff_symbol_engraver" 
\remove "Bar_engraver"
} 
{ b4 b8 r4 b8 r8 b4 b4 b8}>>
%{4 %} c8 a4 r4 f8   
}>>

Of course, change the basic-distance value as you desire.

Hope this helps!
Kieren.

p.s. You could also improve the readability and maintainability of your code 
by: (1) putting all your overrides etc. in \layout \context blocks; and (2) 
putting the measure numbers at the end of the line -- e.g., something like

\version "2.14.0"

\layout {
  \context {
    \RhythmicStaff
    \override VerticalAxisGroup #'staff-staff-spacing = #'((basic-distance . 1))
    alignAboveContext = #"main" fontSize = #-3
    \override Stem #'length = #5
    \override Stem #'length = #5
    \remove "Time_signature_engraver"
    \remove "Staff_symbol_engraver" 
    \remove "Bar_engraver"
  }
}

<<
  \new Staff = "main" {
    \time 6/8 
    r8 g8 [ b8 ~ ] b8 [ d8 f8 ~ ]   % 1
    <<
      { f8 [ f8 f8 ~ ] f8 d8 r8 r8 g8 [ g8 ~ ] g8 [ e8 c8 ] ~ }
      \new RhythmicStaff { b4 b8 r4 b8 r8 b4 b4 b8}
    >>  % 2-3
    c8 a4 r4 f8   % 4
  }
>>




reply via email to

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