]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/features.tely
patch::: 1.3.116.jcn3
[lilypond.git] / Documentation / user / features.tely
1 \input texinfo @c -*-texinfo-*-
2 @setfilename features.info
3 @settitle GNU LilyPond Features
4
5 @ignore
6 TODO
7   * add more un/badly-documented features
8   * write some text
9   * add to/merge with refman
10 @end ignore
11
12 @node Top
13 @chapter Features
14
15 @menu
16 * Arpeggio::                       Arpeggio
17 * Glissando::                      Glissando
18 * Manual beam settings::           Manual beam settings
19 * Slur attachments::               Slur attachments
20 * Text spanner::                   Text spanner
21 * Output property::                Output property
22 * Markup text::                    Markup text
23 * Engraver hacking::               Engraver hacking
24 @end menu
25
26 Testin'' a b c...
27 @lilypond[fragment,relative,verbatim,center]
28   a'' b c
29 @end lilypond
30
31 @node Arpeggio
32 @section Arpeggio
33
34 @lilypond[fragment,relative,verbatim,center]
35   \context Voice <c'\arpeggio e g c>
36 @end lilypond
37
38 @lilypond[fragment,relative,verbatim,center]
39   \context PianoStaff <
40     \property PianoStaff.connectArpeggios = ##t
41     \context Staff \context Voice <c''\arpeggio e g c>
42     \context Staff=other \context Voice <c,\arpeggio e g>
43   >  
44 @end lilypond
45
46
47 @node Glissando
48 @section Glissando
49
50
51 @lilypond[fragment,relative,verbatim,center]
52   c'' \glissando c'
53 @end lilypond
54
55 @subsection Follow Thread
56 @lilypond[fragment,relative,verbatim,center]
57   \context PianoStaff <
58     \property PianoStaff.followThread = ##t
59     \context Staff \context Voice {
60       c'1
61       \translator Staff=two
62       b2 a
63     }
64     \context Staff=two {\clef bass; \skip 1*2;}
65   >  
66 @end lilypond
67
68
69 @node Manual beam settings
70 @section Manual beam settings
71
72
73 Beams over rests...
74
75 @lilypond[fragment,relative,verbatim,center]
76   \context Staff {
77     r4 [r8 g'' a]
78   }
79 @end lilypond
80
81
82 Control number of beams...
83
84 @lilypond[fragment,relative,verbatim,center]
85   \context Staff {
86     [f'8 r16 f g a]
87     [f8 r16 \property Voice.stemLeftBeamCount = #1 f g a]
88   }
89 @end lilypond
90
91 @lilypond[fragment,relative,verbatim,center]
92     f'32 g a b b a g f
93     
94     \property Voice.autoBeamSettings
95       \set #'(end * * * *) = #(make-moment 1 4)
96     f32 g a b b a g f
97     
98     f32 g a
99     \property Voice.stemRightBeamCount = #1 b
100     \property Voice.stemLeftBeamCount = #1 b
101     a g f
102 @end lilypond
103
104 Don't extend to middle line esp. for grace
105
106 @lilypond[fragment,relative,verbatim,center]
107     \grace a'8 a4
108     \property Voice.Stem \set #'no-stem-extend = ##t
109     \grace g8 g4
110 @end lilypond
111   
112 @c  beam slope
113 @c beam start beam end
114
115
116 @node Slur attachments
117 @section Slur attachments
118
119 BUG Override attachments...
120 @lilypond[fragment,relative,verbatim,center]
121     \property Voice.Slur \set #'direction = #1
122     \property Voice.Stem \set #'length = #5.5
123     g''8(g)g4
124     g4(g8)g
125     \property Voice.Slur \set #'attachment = #'(stem . stem)
126     g8(g)g4
127     g4(g8)g
128 @end lilypond
129
130 Ophee slurs...
131 @lilypond[fragment,relative,verbatim,center]
132     \property Voice.Slur \set #'direction = #1
133     \property Voice.Slur \set #'attachment = #'(head . head)
134     g''16()g()g()g()d'()d()d()d
135 @end lilypond
136
137
138 @c  ugly slurs
139 @c  high slurs, eg from gnossienes
140
141
142 @node Text spanner
143 @section Text spanner
144
145 Have crescendo set a text spanner iso hairpin
146 @lilypond[fragment,relative,verbatim,center]
147   \context Voice {
148     \property Voice.crescendoText = "cresc."
149     \property Voice.crescendoSpanner = #'dashed-line
150     a''2\mf\< a a \!a 
151   }
152 @end lilypond
153
154 @subsection Ottava
155
156 @lilypond[fragment,relative,verbatim,center]
157     a'''' b c a
158     \property Voice.TextSpanner \set #'type = #'dotted-line
159     \property Voice.TextSpanner \set #'edge-height = #'(0 . 1.5)
160     \property Voice.TextSpanner \set #'edge-text = #'("8va " . "")
161     \property Staff.centralCPosition = #-13
162     a\spanrequest \start "text" b c a \spanrequest \stop "text"
163 @end lilypond
164
165
166 @node Output property
167 @section Output property
168
169 @lilypond[fragment,relative,verbatim,center]
170     \outputproperty #(make-type-checker 'note-head-interface) 
171       #'extra-offset = #'(2 . 3)
172     c''2 c
173 @end lilypond
174
175 Don't move the finger 2, only text "m.d." ...
176 @lilypond[verbatim,center]
177 #(define (make-text-checker text)
178    (lambda (grob) (equal? text (ly-get-elt-property grob 'text))))
179
180 \score {    
181   \notes\relative c''' {
182     \property Voice.Stem \set #'direction = #1
183     \outputproperty #(make-text-checker "m.d.")
184       #'extra-offset = #'(-3.5 . -4.5)
185     a^2^"m.d."    
186   }
187   \paper { linewidth = -1.; }
188 }
189 @end lilypond
190
191
192 @node Markup text
193 @section Markup text
194
195 @c markup text hacking
196
197 Metrome hack...
198
199 @lilypond[verbatim,center]
200 #(define note '(rows (music "noteheads-2" ((kern . -0.1) "flags-stem"))))
201 #(define eight-note `(rows ,note ((kern . -0.1) (music ((raise . 3.5) "flags-u3")))))
202 #(define dotted-eight-note `(rows ,eight-note (music "dots-dot")))
203
204 \score {
205   \notes\relative c'' {
206     a1^#`(rows ,dotted-eight-note " = 64")
207   }
208   \paper {
209     linewidth = -1.;
210     \translator{
211       \ScoreContext
212       TextScript \override #'font-shape = #'upright
213     }
214   }
215 }
216 @end lilypond
217
218 @node Engraver hacking
219 @section Engraver hacking
220
221 No time signature, no barlines... 
222 @lilypond[verbatim,center]
223 \score {
224   \notes \relative c'' {
225     a b c d
226     d c b a
227   }
228   \paper {
229     \translator {
230       \StaffContext
231       whichBar = #""
232       \remove "Time_signature_engraver";
233       linewidth = -1.;
234     }
235   }
236 }
237 @end lilypond
238
239 No staff, no clef, squash pitches
240 @lilypond[verbatim,center]
241 \score {
242   \notes { c4 c4 c8 c8 }
243   \paper {
244     \translator {
245       \StaffContext
246       \remove Staff_symbol_engraver;
247       \consists Pitch_squash_engraver;
248       \remove Clef_engraver;
249     }
250     linewidth = -1.;
251   }
252 }
253 @end lilypond
254   
255 @c subsection no clefs
256
257
258 @c  equalizer
259
260 @bye
261
262
263