Making slurs with complex dash structure

Slurs can be composed of complex dash patterns by setting the dash-definition property, which is a list of slur segments, which in turn are lists of parameters setting up the dash behavior of the given segment.

Slur segments are defined in terms of the Bézier parameter t, which ranges from 0 at the left end of the slur to 1 at the right end of the slur. A slur segment has the form (start-t stop-t dash-fraction dash-period). In the segment spanning the range start-t to stop-t, the dash pattern is defined by the values of dash-fraction and dash-period. dash-fraction specifies how much of a dash period is black; if set to 1 you get a solid slur segment. The unit for dash-period is staff spaces.

\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)
}
[image of music]

LilyPond snippets v2.25.31 (development-branch).