]> git.donarmstrong.com Git - lilypond.git/blob - input/regression/alter-broken.ly
Rerun scripts/auxiliar/update-with-convert-ly.sh
[lilypond.git] / input / regression / alter-broken.ly
1 \version "2.17.6"
2
3 \header {
4   texidoc = "The command @code{\\alterBroken} may be used to override the
5 pieces of a broken spanner independently.  The following example demonstrates
6 its usage with a variety of data types."
7 }
8
9 \layout {
10   ragged-right = ##t
11 }
12
13 #(ly:expect-warning (_ "not a spanner name"))
14
15 \relative c'' {
16   \alterBroken #'positions #'((3 . 3) (5 . 5)) Slur
17   \alterBroken #'color #'((0 0 1) (1 0 0)) Slur
18   \alterBroken #'dash-definition #'( ((0 1 0.4 0.75))
19                                           ((0 0.5 0.4 0.75) (0.5 1 1 1)) ) Slur
20   d4( d' b g
21   \break
22   d d' b g)
23   \alterBroken #'padding #'(1 3) Staff.OttavaBracket
24   % Spaces in spanner's name are disregarded.
25   \alterBroken #'style #'(line dashed-line) Staff.OttavaBracket
26   \ottava #1
27   % It is possible to use procedures as arguments.
28   \alterBroken #'stencil #`(
29     ,ly:hairpin::print
30     ,(lambda (grob)
31       (ly:stencil-rotate (ly:hairpin::print grob) -5 0 0))) Hairpin
32   c\< d e
33   % Since `NoteHead' is not the name of a spanner, the following has no
34   % effect on layout.  A warning (suppressed here) is issued.
35   \alterBroken #'color #`(,red ,blue) NoteHead
36   \alterBroken #'color #`(() ,blue) Tie
37   \alterBroken #'control-points #'(
38      ((1 . 3) (2 . 4) (3 . 4) (4 . 3))
39      ((3 . 3) (4 . 4) (5 . 4) (6 . 3))
40     ) Tie
41   f~
42   \break
43   f c a f\!
44   \ottava #0
45 }