| [ << Spacing issues ] | [Top][Contents][Index][ ? ] | [ Changing defaults >> ] | ||
| [ < New spacing area ] | [ Up : Horizontal spacing ] | [ Line length > ] | ||
4.5.3 Changing horizontal spacing
Horizontal spacing may be altered with the
base-shortest-duration property.  Here
we compare the same music; once without altering
the property, and then altered.  Larger values
of ly:make-moment will produce smaller
music.  Note that ly:make-moment constructs
a duration, so 1 4 is a longer duration
than 1 16.
\score {
  \relative c'' {
    g4 e e2 | f4 d d2 | c4 d e f | g4 g g2 |
    g4 e e2 | f4 d d2 | c4 e g g | c,1 |
    d4 d d d | d4 e f2 | e4 e e e | e4 f g2 |
    g4 e e2 | f4 d d2 | c4 e g g | c,1 |
  }
}
\score {
  \relative c'' {
    g4 e e2 | f4 d d2 | c4 d e f | g4 g g2 |
    g4 e e2 | f4 d d2 | c4 e g g | c,1 |
    d4 d d d | d4 e f2 | e4 e e e | e4 f g2 |
    g4 e e2 | f4 d d2 | c4 e g g | c,1 |
  }
  \layout {
    \context {
      \Score
      \override SpacingSpanner.base-shortest-duration = #(ly:make-moment 1/16)
    }
  }
}
Selected Snippets
By default, spacing in tuplets depends on various non-duration
factors (such as accidentals, clef changes, etc).  To disregard
such symbols and force uniform equal-duration spacing, use
Score.SpacingSpanner.uniform-stretching.  This
property can only be changed at the beginning of a score,
\score {
  <<
    \new Staff {
      \tuplet 5/4 { c8 c c c c } c8 c c c
    }
    \new Staff {
      c8 c c c \tuplet 5/4 { c8 c c c c }
    }
  >>
  \layout {
    \context {
      \Score
      \override SpacingSpanner.uniform-stretching = ##t
    }
  }
}
When strict-note-spacing is set, notes are spaced without
regard for clefs, bar lines, and grace notes,
\override Score.SpacingSpanner.strict-note-spacing = ##t
\new Staff { c8[ c \clef alto c \grace { c16 c } c8 c c]  c32[ c] }
See also
Snippets: Spacing.
| [ << Spacing issues ] | [Top][Contents][Index][ ? ] | [ Changing defaults >> ] | ||
| [ < New spacing area ] | [ Up : Horizontal spacing ] | [ Line length > ] | ||
 Other languages: deutsch, español, français, italiano, 日本語.
 
 About automatic language selection.