| [ << Musical notation ] | [Top][Contents][Index] | [ Specialist notation >> ] |
| [ < Expressive marks as curves ] | [ Up : Expressive marks as curves ] | [ Phrasing slurs > ] |
Slurs
Slurs are entered using parentheses:
Note: In polyphonic music, a slur must be terminated in the same voice it began.
\relative { f''4( g a) a8 b( a4 g2 f4) <c e>2( <b d>2) }![]()
Slurs may be manually placed above or below the staff; see Direction and placement.
Simultaneous or overlapping slurs require special attention. Most
occurrences of outer slurs actually indicate phrasing, and phrasing
slurs may overlap a regular slur, see Phrasing slurs. When
multiple regular slurs are needed in a single Voice,
matching slur starts and ends need to be labeled by preceding
them with \= followed by an identifying key (a symbol or
non-negative integer).
\fixed c' { <c~ f\=1( g\=2( >2 <c e\=1) a\=2) > }![]()
Slurs can be solid, dotted, or dashed. Solid is the default slur style:
\relative { c'4( e g2) \slurDashed g4( e c2) \slurDotted c4( e g2) \slurSolid g4( e c2) }![]()
Slurs can also be made half-dashed (the first half dashed, the second half solid) or half-solid (the first half solid, the second half dashed):
\relative { c'4( e g2) \slurHalfDashed g4( e c2) \slurHalfSolid c4( e g2) \slurSolid g4( e c2) }![]()
Custom dash patterns for slurs can be defined:
\relative { c'4( e g2) \slurDashPattern 0.7 0.75 g4( e c2) \slurDashPattern 0.5 2.0 c4( e g2) \slurSolid g4( e c2) }![]()
Predefined commands
\slurUp,
\slurDown,
\slurNeutral,
\slurDashed,
\slurDotted,
\slurHalfDashed,
\slurHalfSolid,
\slurDashPattern,
\slurSolid.
Selected Snippets
Adjusting slur positions vertically
Using \override Slur.positions it is possible to set the
vertical position of the start and end points of a slur to absolute
values (or rather, forcing LilyPond’s slur algorithm to consider these
values as desired). In many cases, this means a lot of trial and error
until good values are found. You probably have tried the
\offset command next just to find out that it doesn’t work for
slurs, emitting a warning instead.
The code in this snippet allows you to tweak the vertical start and end
positions by specifying relative changes, similar to
\offset.
Syntax: \offsetPositions #'(dy1 . dy2)
offsetPositions = #(define-music-function (offsets) (number-pair?) #{ \once \override Slur.control-points = #(lambda (grob) (match-let ((((_ . y1) _ _ (_ . y2)) (ly:slur::calc-control-points grob)) ((off1 . off2) offsets)) (set! (ly:grob-property grob 'positions) (cons (+ y1 off1) (+ y2 off2))) (ly:slur::calc-control-points grob))) #}) \relative c'' { c4(^"default" c, d2) \offsetPositions #'(0 . 1) c'4(^"(0 . 1)" c, d2) \offsetPositions #'(0 . 2) c'4(^"(0 . 2)" c, d2) \bar "||" g4(^"default" a d'2) \offsetPositions #'(1 . 0) g,,4(^"(1 . 0)" a d'2) \offsetPositions #'(2 . 0) g,,4(^"(2 . 0)" a d'2) }![]()
Using double slurs for legato chords
Some composers write two slurs when they want legato
chords. This can be achieved by setting doubleSlurs.
\relative c' { \set doubleSlurs = ##t <c e>4( <d f> <c e> <d f>) }![]()
Positioning text markups inside slurs
Text markups need to have the outside-staff-priority property
set to false in order to be printed inside slurs.
\relative c'' { \override TextScript.avoid-slur = #'inside \override TextScript.outside-staff-priority = ##f c2(^\markup { \halign #-10 \natural } d4.) c8 }![]()
Making slurs with complex dash structure
Slurs can be made with complex dash patterns by defining the
dash-definition property. dash-definition is a list of
dash-elements. A dash-element is a list of parameters
defining the dash behavior for a segment of the slur.
The slur is defined in terms of the bezier parameter t which ranges
from 0 at the left end of the slur to 1 at the right end of the slur.
dash-element is a list
(start-t stop-t dash-fraction dash-period). The region of the
slur from start-t to stop-t will have a fraction
dash-fraction of each dash-period
black. dash-period is defined in terms of staff
spaces. dash-fraction is set to 1 for a solid slur.
\relative c' { \once \override Slur.dash-definition = #'((0 0.3 0.1 0.75) (0.3 0.6 1 1) (0.65 1.0 0.4 0.75)) c4( d e f) \once \override Slur.dash-definition = #'((0 0.25 1 1) (0.3 0.7 0.4 0.75) (0.75 1.0 1 1)) c4( d e f) }![]()
See also
Music Glossary: slur.
Learning Manual: On the un-nestedness of brackets and ties.
Notation Reference: Direction and placement, Phrasing slurs.
Snippets: Expressive marks.
Internals Reference: Slur.
| [ << Musical notation ] | [Top][Contents][Index] | [ Specialist notation >> ] |
| [ < Expressive marks as curves ] | [ Up : Expressive marks as curves ] | [ Phrasing slurs > ] |
![[image of music]](../8a/lily-60c413e4.png)
![[image of music]](../fd/lily-9810356f.png)
![[image of music]](../0e/lily-6d29d39d.png)
![[image of music]](../33/lily-31c4eda8.png)
![[image of music]](../ff/lily-97c642b2.png)
![[image of music]](../da/lily-e7696bbc.png)
![[image of music]](../e6/lily-7a105f5f.png)
![[image of music]](../6f/lily-4db5dfbb.png)
![[image of music]](../a5/lily-57bb44e0.png)