| [ << Changing defaults ] | [Top][Contents][Index] | [ Notation manual tables >> ] |
| [ < Modifying broken spanners ] | [ Up : Spanners ] | [ Controlling spanner end points > ] |
Setting minimum lengths for spanners
The spanner-interface interface provides three properties
that apply to several spanners.
The minimum-length property
The minimum length of the spanner is specified by the
minimum-length property. Increasing this usually has the
necessary effect of increasing the spacing of the notes between the
two end points. However, this override has no effect on
many spanners, as their length is determined by other considerations.
A few examples where it is effective are shown below.
a'~ a' a' % increase the length of the tie -\tweak minimum-length 5 ~ a'
\relative \compressMMRests { a'1 R1*23 % increase the length of the rest bar \once \override MultiMeasureRest.minimum-length = 20 R1*23 a1 }
\relative { a' \< a a a \! % increase the length of the hairpin \override Hairpin.minimum-length = 20 a \< a a a \! }
This override can also be used to increase the length of slurs and phrasing slurs:
\relative { a'( g) a -\tweak minimum-length 5 ( g) a\( g\) a -\tweak minimum-length 5 \( g\) }
For some layout objects, the minimum-length property becomes
effective only if the set-spacing-rods procedure is called
explicitly. To do this, the springs-and-rods property should
be set to ly:spanner::set-spacing-rods. For example,
the minimum length of a glissando has no effect unless the
springs-and-rods property is set:
% default e' \glissando c'' % not effective alone \once \override Glissando.minimum-length = 20 e' \glissando c'' % effective only when both overrides are present \once \override Glissando.minimum-length = 20 \once \override Glissando.springs-and-rods = #ly:spanner::set-spacing-rods e' \glissando c''
The same is true of the Beam object:
% not effective alone \once \override Beam.minimum-length = 20 e'8 e' e' e' % effective only when both overrides are present \once \override Beam.minimum-length = 20 \once \override Beam.springs-and-rods = #ly:spanner::set-spacing-rods e'8 e' e' e'
The minimum-length-after-break property
The property minimum-length-after-break can be
used to stretch broken spanners starting after a line break.
As for the minimum-length property, it is often needed to set the
springs-and-rods property to ly:spanner::set-spacing-rods.
{ \once \override Tie.minimum-length-after-break = 20 a1~ \break a1 \once \override Slur.minimum-length-after-break = 20 a1( \break d'1) \once \override TextSpanner.springs-and-rods = #ly:spanner::set-spacing-rods \once \override TextSpanner.minimum-length-after-break = 20 a1\startTextSpan \break a1\stopTextSpan \once \override Hairpin.after-line-breaking = ##t \once \override Hairpin.to-barline = ##f \once \override Hairpin.minimum-length-after-break = 20 a1\< \break a1\! \once \override Glissando.springs-and-rods = #ly:spanner::set-spacing-rods \once \override Glissando.breakable = ##t \once \override Glissando.after-line-breaking = ##t \once \override Glissando.minimum-length-after-break = 20 a1\glissando \break d'1 }
| [ << Changing defaults ] | [Top][Contents][Index] | [ Notation manual tables >> ] |
| [ < Modifying broken spanners ] | [ Up : Spanners ] | [ Controlling spanner end points > ] |
![[image of music]](../2b/lily-0bda9da1.png)
![[image of music]](../5e/lily-1a58db47.png)
![[image of music]](../d4/lily-6717a6e8.png)
![[image of music]](../81/lily-63024ff6.png)
![[image of music]](../ea/lily-ab27b5c9.png)
![[image of music]](../a5/lily-e1e52796.png)
![[image of music]](../57/lily-0a77a232.png)