]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/making-slurs-with-complex-dash-structure.ly
Docs: reorganize documentation directory structure
[lilypond.git] / Documentation / snippets / new / making-slurs-with-complex-dash-structure.ly
1 \version "2.13.1"
2
3 \header {
4   lsrtags = "rhythms, expressive-marks"
5   texidoc = "
6 Slurs can be made with complex dash patterns by defining
7 the @code{dash-definition} property.  @code{dash-definition}
8 is a list of @code{dash-elements}.  A @code{dash-element} is a
9 list of parameters defining the dash behavior for a segment of
10 the slur.
11
12 The slur is defined in terms of the bezier parameter t
13 which ranges from 0
14 at the left end of the slur to 1 at the right end of the slur.
15 @code{dash-element} is a list @code{(start-t stop-t dash-fraction
16 dash-period)}.  The region of the slur from @code{start-t} to
17 @code{stop-t} will have a fraction @code{dash-fraction}
18 of each @code{dash-period} black.  @code{dash-period} is
19 defined in terms of staff spaces.  @code{dash-fraction} is
20 set to 1 for a solid slur.
21 "
22   doctitle = "Making slurs with complex dash structure"
23 }
24
25 \relative c' {
26   \once \override
27     Slur #'dash-definition = #'((0 0.3 0.1 0.75)
28                                 (0.3 0.6 1 1)
29                                 (0.65 1.0 0.4 0.75))
30   c( d e f)
31   \once \override
32     Slur #'dash-definition = #'((0 0.25 1 1)
33                                 (0.3 0.7 0.4 0.75)
34                                 (0.75 1.0 1 1))
35   c( d e f)
36 }