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