summaryrefslogtreecommitdiff
path: root/Documentation/snippets/making-slurs-with-complex-dash-structure.ly
blob: 7afb6ebf81ebe419ed7462f9969d714ca1b803b7 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
%% DO NOT EDIT this file manually; it is automatically
%% generated from LSR http://lsr.dsi.unimi.it
%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
\version "2.17.11"

\header {
  lsrtags = "expressive-marks, rhythms"

  texidoc = "
Slurs can be made with complex dash patterns by defining the
@code{dash-definition} property.  @code{dash-definition} is a list of
@code{dash-elements}.  A @code{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.
@code{dash-element} is a list @code{(start-t stop-t dash-fraction
dash-period)}.  The region of the slur from @code{start-t} to
@code{stop-t} will have a fraction @code{dash-fraction} of each
@code{dash-period} black.  @code{dash-period} is defined in terms of
staff spaces.  @code{dash-fraction} is set to 1 for a solid slur.

"
  doctitle = "Making slurs with complex dash structure"
} % begin verbatim

\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)
}