]> git.donarmstrong.com Git - lilypond.git/blob - ly/spanners-init.ly
Release: bump Welcome versions.
[lilypond.git] / ly / spanners-init.ly
1 \version "2.19.29"
2
3 "\\=" =
4 #(define-event-function (id event) (number-or-string? ly:event?)
5   (_i "This sets the @code{spanner-id} property of the following
6 @var{event} to the given @var{id} (numbers will be converted to a
7 string).  This can be used to tell LilyPond how to connect overlapping
8 or parallel slurs or phrasing slurs within a single @code{Voice}.
9 @lilypond[quote,verbatim]
10 \\fixed c' { c\\=1( d\\=2( e\\=1) f\\=2) }
11 @end lilypond\n")
12   (set! (ly:music-property event 'spanner-id)
13         (if (number? id)
14             (number->string id)
15             id))
16   event)
17
18 startGroup = #(make-span-event 'NoteGroupingEvent START)
19 stopGroup = #(make-span-event 'NoteGroupingEvent STOP)
20
21
22 cr = #(make-span-event 'CrescendoEvent START)
23 decr = #(make-span-event 'DecrescendoEvent START)
24 enddecr = #(make-span-event 'DecrescendoEvent STOP)
25 endcr = #(make-span-event 'CrescendoEvent STOP)
26
27
28 startMeasureCount = #(make-span-event 'MeasureCounterEvent START)
29 stopMeasureCount = #(make-span-event 'MeasureCounterEvent STOP)
30
31
32 startTextSpan = #(make-span-event 'TextSpanEvent START)
33 stopTextSpan = #(make-span-event 'TextSpanEvent STOP)
34
35
36 startTrillSpan = #(make-span-event 'TrillSpanEvent START)
37 stopTrillSpan = #(make-span-event 'TrillSpanEvent STOP)
38
39
40 episemInitium = #(make-span-event 'EpisemaEvent START)
41 episemFinis = #(make-span-event 'EpisemaEvent STOP)
42
43
44 cresc = #(make-music 'CrescendoEvent 'span-direction START 'span-type 'text 'span-text "cresc.")
45 endcresc =  #(make-span-event 'CrescendoEvent STOP)
46 dim = #(make-music 'DecrescendoEvent 'span-direction START 'span-type 'text 'span-text "dim.")
47 enddim =  #(make-span-event 'DecrescendoEvent STOP)
48 decresc = #(make-music 'DecrescendoEvent 'span-direction START 'span-type 'text 'span-text "decresc.")
49 enddecresc =  #(make-span-event 'DecrescendoEvent STOP)
50
51 % Deprecated functions:
52 % TODO: DEPRECATED_2_13_19
53 deprecatedcresc =  {
54   $(make-event-chord (list cr))
55   \once \set crescendoText = \markup { \italic "cresc." }
56   \once \set crescendoSpanner = #'text
57 }
58
59
60 deprecateddim =  {
61   $(make-event-chord (list decr))
62   \once \set decrescendoText = \markup { \italic "dim." }
63   \once \set decrescendoSpanner = #'text
64 }
65
66 deprecatedenddim =  {
67   $(make-event-chord (list enddecr))
68 %  \unset decrescendoText
69 %  \unset decrescendoSpanner
70 }
71
72 deprecatedendcresc =  {
73   $(make-event-chord (list endcr))
74 %  \unset crescendoText
75 %  \unset crescendoSpanner
76 }
77
78
79 %%%%%%%%%%%%%%%%
80
81 crescTextCresc = {
82     \set crescendoText = \markup { \italic "cresc." }
83     \set crescendoSpanner = #'text
84 }
85
86 dimTextDecresc = {
87     \set decrescendoText = \markup { \italic "decresc." }
88     \set decrescendoSpanner = #'text
89 }
90
91 dimTextDecr = {
92     \set decrescendoText = \markup { \italic "decr." }
93     \set decrescendoSpanner = #'text
94 }
95
96 dimTextDim = {
97     \set decrescendoText = \markup { \italic "dim." }
98     \set decrescendoSpanner = #'text
99 }
100
101 crescHairpin = {
102     \unset crescendoText
103     \unset crescendoSpanner
104 }
105
106 dimHairpin = {
107     \unset decrescendoText
108     \unset decrescendoSpanner
109 }
110
111
112 sustainOff = #(make-span-event 'SustainEvent STOP)
113 sustainOn = #(make-span-event 'SustainEvent START)
114
115 unaCorda = #(make-span-event 'UnaCordaEvent START)
116 treCorde = #(make-span-event 'UnaCordaEvent STOP)
117
118 sostenutoOn = #(make-span-event 'SostenutoEvent START)
119 sostenutoOff = #(make-span-event 'SostenutoEvent STOP)
120
121 %crescpoco = \set crescendoText = "cresc. poco a poco"
122 %decresc = \set crescendoText = "decr."
123 %dim = \set crescendoText = "dim."
124
125 newSpacingSection = #(make-event-chord (list (make-music 'SpacingSectionEvent)))
126
127 breakDynamicSpan = #(make-music 'BreakDynamicSpanEvent)