]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/expressive.itely
Merge branch 'lilypond/translation' of ssh://trettig@git.sv.gnu.org/srv/git/lilypond...
[lilypond.git] / Documentation / user / expressive.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @ignore
3     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
4
5     When revising a translation, copy the HEAD committish of the
6     version that you are working on.  See TRANSLATION for details.
7 @end ignore
8
9 @c \version "2.11.38"
10
11 @node Expressive marks
12 @section Expressive marks
13
14 @lilypondfile[quote]{expressive-headword.ly}
15
16 @menu
17 * Attached to notes::           
18 * Curves::                      
19 * Lines::                       
20 @end menu
21
22
23 @node Attached to notes
24 @subsection Attached to notes
25
26 @menu
27 * Articulations and ornamentations::  
28 * Dynamics::                    
29 * New dynamic marks::           
30 @end menu
31
32 @node Articulations and ornamentations
33 @subsubsection Articulations and ornamentations
34
35 @cindex articulations
36 @cindex scripts
37 @cindex ornaments
38
39 A variety of symbols that denote articulations, ornamentations,
40 and other performance indications can be attached to a note using
41 this syntax:
42
43 @example
44 @var{note}\@var{name}
45 @end example
46
47 The possible values for @var{name} are listed in @ref{List of
48 articulations}.  For example:
49
50 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
51 c4\staccato c\mordent b2\turn
52 c1\fermata
53 @end lilypond
54
55 @cindex marcato
56 @cindex stopped
57 @cindex tenuto
58 @cindex staccatissimo
59 @cindex accent
60 @cindex staccato
61 @cindex portato
62
63 Some of these articulations have shorthands for easier entry.
64 Shorthands are appended to the note name, and their syntax
65 consists of a dash (@tie{}@code{-}) followed by a symbol
66 signifying the articulation.  Predefined shorthands exist for
67 @notation{marcato}, @notation{stopped}, @notation{tenuto},
68 @notation{staccatissimo}, @notation{accent}, @notation{staccato},
69 and @notation{portato}.  Their corresponding output appears as
70 follows:
71
72 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
73 c4-^  c-+  c--  c-|
74 c->   c-.  c-_
75 @end lilypond
76
77 The rules for the default placement of articulations are defined
78 in @file{scm/@/script@/.scm}.  Articulations and ornamentations
79 may be manually placed above or below the staff, see
80 @ref{Controlling direction and placement}.
81
82 @cindex espressivo
83 @cindex fermata
84 @cindex upbow
85 @cindex downbow
86 @cindex foot marks
87 @cindex organ pedal marks
88 @cindex turn
89 @cindex open
90 @cindex stopped
91 @cindex flageolet
92 @cindex reverseturn
93 @cindex trill
94 @cindex prall
95 @cindex mordent
96 @cindex prallprall
97 @cindex prallmordent
98 @cindex prall, up
99 @cindex prall, down
100 @cindex thumb marking
101 @cindex segno
102 @cindex coda
103 @cindex varcoda
104
105
106 @snippets
107
108 @c Once revised, add to LSR.
109
110 The shorthands are defined in @file{ly/@/script@/-init@/.ly},
111 where the variables @code{dashHat}, @code{dashPlus},
112 @code{dashDash}, @code{dashBar}, @code{dashLarger},
113 @code{dashDot}, and @code{dashUnderscore} are assigned default
114 values.  The default values for the shorthands can be modified.
115 For example, to associate the @code{-+} (@code{dashPlus})
116 shorthand with the @notation{trill} symbol instead of the default
117 @notation{+} symbol, assign the value @code{trill} to the variable
118 @code{dashPlus}:
119
120 @lilypond[verbatim,quote,ragged-right]
121 \relative c'' { c-+ }
122 dashPlus = "trill"
123 \relative c'' { c-+ }
124 @end lilypond
125
126 The vertical ordering of scripts is controlled with the
127 @code{script-priority} property.  The lower this number, the
128 closer it will be put to the note.  In this example, the
129 @code{TextScript} (the sharp symbol) first has the lowest
130 priority, so it is put lowest in the first example.  In the
131 second, the @notation{prall trill} (the @code{Script}) has the
132 lowest, so it is on the inside.  When two objects have the same
133 priority, the order in which they are entered decides which one
134 comes first.
135
136 @lilypond[verbatim,quote,ragged-right,fragment,relative=3]
137 \once \override TextScript #'script-priority = #-100
138 a4^\prall^\markup { \sharp }
139
140 \once \override Script #'script-priority = #-100
141 a4^\prall^\markup { \sharp }
142 @end lilypond
143
144
145 @seealso
146
147 Music Glossary:
148 @rglos{tenuto},
149 @rglos{accent},
150 @rglos{staccato},
151 @rglos{portato}.
152
153 Notation Reference:
154 @ref{Controlling direction and placement}.
155
156 Installed Files:
157 @file{scm/@/script@/.scm}.
158
159 Snippets:
160 @rlsr{Expressive marks}.
161
162 Internals Reference:
163 @rinternals{Script},
164 @rinternals{TextScript}.
165
166
167 @knownissues
168
169 These signs appear in the printed output but have no effect on the
170 MIDI rendering of the music.
171
172
173 @node Dynamics
174 @subsubsection Dynamics
175
176 @cindex absolute dynamics
177 @cindex dynamics
178 @cindex dynamics, absolute
179 @funindex \ppppp
180 @funindex \pppp
181 @funindex \ppp
182 @funindex \pp
183 @funindex \p
184 @funindex \mp
185 @funindex \mf
186 @funindex \f
187 @funindex \ff
188 @funindex \fff
189 @funindex \ffff
190 @funindex \fp
191 @funindex \sf
192 @funindex \sff
193 @funindex \sp
194 @funindex \spp
195 @funindex \sfz
196 @funindex \rfz
197
198 Absolute dynamic marks are specified using a command after a note,
199 such as @code{c4\ff}.  The available dynamic marks are
200 @code{\ppppp}, @code{\pppp}, @code{\ppp}, @code{\pp}, @code{\p},
201 @code{\mp}, @code{\mf}, @code{\f}, @code{\ff}, @code{\fff},
202 @code{\ffff}, @code{\fp}, @code{\sf}, @code{\sff}, @code{\sp},
203 @code{\spp}, @code{\sfz}, and @code{\rfz}.  The dynamic marks may
204 be manually placed above or below the staff, see @ref{Controlling
205 direction and placement}.
206
207 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
208 c2\ppp c\mp
209 c\rfz c^\mf
210 c_\spp c^\ff
211 @end lilypond
212
213 @cindex hairpin
214 @funindex \<
215 @funindex \>
216 @funindex \!
217 @funindex \cr
218 @funindex \decr
219
220 A @notation{crescendo} mark is started with @code{\<} and
221 terminated with @code{\!}, an absolute dynamic, or an additional
222 @notation{crescendo} or @notation{decrescendo} mark.  A
223 @notation{decrescendo} mark is started with @code{\>} and is also
224 terminated with @code{\!}, an absolute dynamic, or another
225 @notation{crescendo} or @notation{decrescendo} mark.  @code{\cr}
226 and @code{\decr} may be used instead of @code{\<} and @code{\>}.
227 @notation{Hairpins} are engraved by default using this notation.
228
229 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
230 c2\< c\!
231 d2\< d\f
232 e2\< e\>
233 f2\> f\!
234 e2\> e\mp
235 d2\> d\>
236 c1\!
237 @end lilypond
238
239 Spacer notes are needed to engrave multiple marks on one note.
240
241 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
242 c4\< c\! d\> e\!
243 << f1 { s4 s4\< s4\> s4\! } >>
244 @end lilypond
245
246 @cindex espressivo articulation
247
248 In some situations the @code{\espressivo} articulation mark may be
249 the appropriate choice to indicate a @notation{crescendo} and
250 @notation{decrescendo} on one note:
251
252 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
253 c2 b4 a
254 g1\espressivo
255 @end lilypond
256
257 @cindex crescendo
258 @cindex decrescendo
259 @cindex diminuendo
260 @funindex \setTextCresc
261 @funindex \setTextDim
262 @funindex \setTextDecr
263 @funindex \setTextDecresc
264 @funindex \setHairpinCresc
265 @funindex \setHairpinDim
266 @funindex \setHairpinDecresc
267
268 @notation{Crescendos} and @notation{decrescendos} can be engraved
269 as textual markings instead of hairpins.  The built-in commands
270 that enable these text modes are @code{\setTextCresc},
271 @code{\setTextDecresc}, @code{\setTextDecr}, and
272 @code{\setTextDim}.  The corresponding @code{\setHairpinCresc},
273 @code{\setHairpinDim}, and @code{\setHairpinDecresc} commands will
274 revert to hairpins again:
275
276 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
277 c\< d e f\!
278 e\> d c b\!
279 \setTextCresc
280 c\< d e f\!
281 \setTextDecresc
282 e\> d c b\!
283 \setHairpinCresc
284 c\< d e f\!
285 @end lilypond
286
287 The text used for @notation{crescendos} and
288 @notation{decrescendos} can be changed by modifying the context
289 properties @code{crescendoText} and @code{decrescendoText}.  The
290 style of the spanner line can be changed by modifying the context
291 properties @code{crescendoSpanner} and @code{decrescendoSpanner}.
292 Available values for the spanner properties are @code{'hairpin},
293 @code{'line}, @code{'dashed-line}, and @code{'dotted-line}.  If
294 unset, a hairpin crescendo is used:
295
296 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
297 \set crescendoText = \markup { \italic "cresc. poco" }
298 \set crescendoSpanner = #'dotted-line
299 a'2\< a a a a a a a\mf
300 @end lilypond
301
302 To create new absolute dynamic marks or text that should be
303 aligned with dynamics, see @ref{New dynamic marks}.
304
305 Vertical positioning of dynamics is handled by
306 @rinternals{DynamicLineSpanner}.
307
308
309 @predefined
310
311 @funindex \dynamicUp
312 @code{\dynamicUp},
313 @funindex \dynamicDown
314 @code{\dynamicDown},
315 @funindex \dynamicNeutral
316 @code{\dynamicNeutral}.
317
318
319 @snippets
320
321 @c Add LilyPond examples to these snippets. -pm
322
323 @c A @notation{hairpin} normally starts at the left edge of the
324 @c beginning note and ends on the right edge of the ending note.  If
325 @c the ending note falls on the downbeat, the @notation{hairpin} ends
326 @c on the immediately preceding bar line.  The following example
327 @c illustrates this behavior:
328 @c 
329 @c TODO: Add link to new snippet for #'to-barline
330
331 If hairpins are too short, they can be lengthened using the
332 following method:
333
334 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
335 c4\< c\! d\> e\!
336 \override Voice.Hairpin #'minimum-length = #5
337 << f1 { s4 s4\< s4\> s4\! } >>
338 @end lilypond
339
340 @cindex al niente
341 @cindex niente, al
342
343 Hairpins may be printed with a circled tip (al niente notation):
344
345 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
346 \override Hairpin #'circled-tip = ##t
347 c2\< c\!
348 c4\> c\< c2\!
349 @end lilypond
350
351 Dynamics that occur at, begin on, or end on the same note will be
352 vertically aligned.  If you want to ensure that dynamics are
353 aligned when they do not occur on the same note, you can increase
354 the @code{staff-padding} property.
355
356 @example
357 \override DynamicLineSpanner #'staff-padding = #4
358 @end example
359
360 @notation{Crescendi} and @notation{decrescendi} that cross a line
361 break will be continued on the second line.  If they end on the
362 first note of a new line, nothing will be printed on that line.
363 To change this behavior, use
364
365 @example
366 \override Score.Hairpin #'after-line-breaking = ##t
367 @end example
368
369 Text style dynamic changes (such as @notation{cresc.} and
370 @notation{dim.}) are printed with a dashed line showing their
371 extent.  To suppress printing this line, use
372
373 @example
374 \override DynamicTextSpanner #'dash-period = #-1.0
375 @end example
376
377
378 @seealso
379
380 @c TODO: Add hairpin to glossary.
381
382 Music Glossary:
383 @rglos{crescendo},
384 @rglos{decrescendo}.
385
386 Learning Manual:
387 @rlearning{Articulation and dynamics}.
388
389 Notation Reference:
390 @ref{Controlling direction and placement}.
391
392 Snippets:
393 @rlsr{Expressive marks}.
394
395 Internals Reference:
396 @rinternals{DynamicText},
397 @rinternals{Hairpin},
398 @rinternals{DynamicLineSpanner}.
399
400
401 @node New dynamic marks
402 @subsubsection New dynamic marks
403
404 It is possible to print new dynamic marks or text that should be
405 aligned with dynamics.  Use @code{make-dynamic-script} to create
406 these marks.  Note that the dynamic font only contains the
407 characters @code{f,m,p,r,s} and @code{z}.
408
409 Some situations (such as dynamic marks) have preset font-related
410 properties.  If you are creating text in such situations, it is
411 advisable to cancel those properties with @code{normal-text}.  See
412 @ref{Text markup commands}, for more details.
413
414 @cindex make-dynamic-script
415
416 @lilypond[quote,verbatim,ragged-right]
417 sfzp = #(make-dynamic-script "sfzp")
418 \relative c' {
419   c4 c c\sfzp c
420 }
421 @end lilypond
422
423 @cindex Dynamics, editorial
424 @cindex Dynamics, parenthesis
425
426 It is also possible to print dynamics in round parenthesis or
427 square brackets.  These are often used for adding editorial
428 dynamics.
429
430 @lilypond[quote,verbatim,ragged-right]
431 rndf = \markup{ \center-align {\line { \bold{\italic (}
432   \dynamic f \bold{\italic )} }} }
433 boxf = \markup{ \bracket { \dynamic f } }
434 { c'1_\rndf c'1_\boxf }
435 @end lilypond
436
437 @seealso
438
439 Snippets:
440 @rlsr{Expressive marks}.
441
442
443 @node Curves
444 @subsection Curves
445
446 @menu
447 * Slurs::                       
448 * Phrasing slurs::              
449 * Breath marks::                
450 * Falls and doits::             
451 @end menu
452
453 @node Slurs
454 @subsubsection Slurs
455
456 @cindex slurs
457
458 A @notation{slur} indicates that notes are to be played bound or
459 @emph{legato}.  They are entered using parentheses:
460
461 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
462 f( g a) a8 b( a4 g2 f4)
463 <c e>2( <b d>2)
464 @end lilypond
465
466 Just as with ties, the direction of a slur can be specified with
467 @code{\slur@emph{DIR}}, where @code{@emph{DIR}} is either
468 @code{Up}, @code{Down}, or @code{Neutral} (@code{Neutral} is the
469 default).  Slurs may be manually placed above or below the staff,
470 see @ref{Controlling direction and placement}.
471
472 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
473 c4_( c) c^( c)
474 @end lilypond
475
476 Using this method, only one slur can be printed at once.  To print
477 a long slur over a few small slurs, see @ref{Phrasing slurs}.
478
479
480 @predefined
481
482 @funindex \slurUp
483 @code{\slurUp},
484 @funindex \slurDown
485 @code{\slurDown},
486 @funindex \slurNeutral
487 @code{\slurNeutral},
488 @funindex \slurDashed
489 @code{\slurDashed},
490 @funindex \slurDotted
491 @code{\slurDotted},
492 @funindex \slurSolid
493 @code{\slurSolid}.
494
495
496 @snippets
497
498 Some composers write two slurs when they want legato chords.  This
499 can be achieved in LilyPond by setting @code{doubleSlurs},
500
501 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
502 \set doubleSlurs = ##t
503 <c e>4 ( <d f> <c e> <d f> )
504 @end lilypond
505
506
507 @seealso
508
509 Music Glossary:
510 @rglos{slur}.
511
512 Notation Reference:
513 @ref{Controlling direction and placement}.
514
515 Snippets:
516 @rlsr{Expressive marks}.
517
518 Internals Reference:
519 @rinternals{Slur}.
520
521
522 @node Phrasing slurs
523 @subsubsection Phrasing slurs
524
525 @cindex phrasing slurs
526 @cindex phrasing marks
527 @funindex \(
528 @funindex \)
529
530 A phrasing slur (or phrasing mark) connects notes and is used to
531 indicate a musical sentence.  It is written using @code{\(} and
532 @code{\)} respectively:
533
534 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
535 \time 6/4 c'\( d( e) f( e) d\)
536 @end lilypond
537
538 Typographically, the phrasing slur behaves almost exactly like a
539 normal slur.  However, they are treated as different objects.  A
540 @code{\slurUp} will have no effect on a phrasing slur; instead,
541 use @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
542 @code{\phrasingSlurNeutral}.  Phrasing slurs may be manually
543 placed above or below the staff, see @ref{Controlling direction
544 and placement}.
545
546 You cannot have simultaneous phrasing slurs.
547
548
549 @predefined
550
551 @funindex \phrasingSlurUp
552 @code{\phrasingSlurUp},
553 @funindex \phrasingSlurDown
554 @code{\phrasingSlurDown},
555 @funindex \phrasingSlurNeutral
556 @code{\phrasingSlurNeutral}.
557
558
559 @seealso
560
561 Notation Reference:
562 @ref{Controlling direction and placement}.
563
564 Snippets:
565 @rlsr{Expressive marks}.
566
567 Internals Reference:
568 @rinternals{PhrasingSlur}.
569
570
571 @node Breath marks
572 @subsubsection Breath marks
573
574 @cindex breath marks
575 @funindex \breathe
576
577 Breath marks are entered using @code{\breathe}:
578
579 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
580 c'4 \breathe d4
581 @end lilypond
582
583
584 @snippets
585
586 The glyph of the breath mark can be tuned by overriding the
587 @code{text} property of the @code{BreathingSign} layout object
588 with any markup text.  For example,
589
590 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
591 c'4
592 \override BreathingSign #'text
593   = #(make-musicglyph-markup "scripts.rvarcomma")
594 \breathe
595 d4
596 @end lilypond
597
598
599 @seealso
600
601 Snippets:
602 @rlsr{Expressive marks}.
603 @c @lsr{expressive,breathing-sign.ly}.
604
605 Internals Reference:
606 @rinternals{BreathingSign}.
607
608
609 @node Falls and doits
610 @subsubsection Falls and doits
611
612 @cindex falls
613 @cindex doits
614 @funindex \bendAfter
615
616 @notation{Falls} and @notation{doits} can be added to notes using
617 the @code{\bendAfter} command:
618
619 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
620 c2-\bendAfter #+4
621 c-\bendAfter #-4
622 c-\bendAfter #+8
623 c-\bendAfter #-8
624 @end lilypond
625
626 The dash (@tie{-}) following the note name is @emph{required} when
627 writing @notation{falls} and @notation{doits}.
628
629
630 @snippets
631
632 The @code{shortest-duration-space} property may have to be tweaked
633 to adjust the shape of @notation{falls} and @notation{doits}.
634
635 @c Fix this snippet. The tweak does not work. -pm
636
637 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
638 \override Score.SpacingSpanner #'shortest-duration-space = #3.0
639 c4-\bendAfter #+5
640 c4-\bendAfter #-3
641 @end lilypond
642
643
644 @seealso
645
646 @c TODO: add falls and doits to glossary.
647 @c Music Glossary:
648 @c @rglos{falls},
649 @c @rglos{doits}.
650
651 Snippets:
652 @rlsr{Expressive marks}.
653
654
655 @node Lines
656 @subsection Lines
657
658 @menu
659 * Glissando::                   
660 * Arpeggio::                    
661 * Trills::                      
662 @end menu
663
664 @node Glissando
665 @subsubsection Glissando
666
667 @cindex glissando
668 @funindex \glissando
669
670 A @notation{glissando} is a smooth change in pitch.  It is denoted
671 by a line or a wavy line between two notes.  A
672 @notation{glissando} is created by attaching @code{\glissando} to
673 a note:
674
675 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
676 c2\glissando c'
677 \override Glissando #'style = #'zigzag
678 c2\glissando c,
679 @end lilypond
680
681
682 @snippets
683
684 @lilypond[verbatim,quote,ragged-right]
685 I = \once \override NoteColumn #'ignore-collision = ##t
686
687 \relative c' <<
688   { \oneVoice \stemDown f2 \glissando \stemNeutral a } \\
689   { \oneVoice \I c2 \glissando \I d, }
690 >>
691 @end lilypond
692
693
694 @seealso
695
696 Music Glossary:
697 @rglos{glissando}.
698
699 Snippets:
700 @rlsr{Expressive marks}.
701
702 @c FIXME: I need to figure out what's up with these.  -gp
703 @c @lsr{expressive,glissando.ly},
704 @c @lsr{expressive,line-styles.ly}
705
706 Internals Reference:
707 @rinternals{Glissando}.
708
709
710 @knownissues
711
712 Printing text over the line (such as @emph{gliss.}) is not
713 supported.
714
715
716 @node Arpeggio
717 @subsubsection Arpeggio
718
719 @cindex arpeggio
720 @cindex broken chord
721
722 @c Add documentation for new 'parenthesis' style arpeggio.  Maybe
723 @c create a new \arpeggioParen command, or something similar. -pm
724
725 You can specify an @notation{arpeggio} (also known as a
726 @notation{broken chord}) on a chord by attaching an
727 @code{\arpeggio} to the chord:
728
729 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
730 <c e g c>\arpeggio
731 @end lilypond
732
733 A square bracket on the left, denoted by @code{\arpeggioBracket},
734 is used to indicate that the chord should @emph{not} be
735 arpeggiated:
736
737 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
738 \arpeggioBracket
739 <c e g c>\arpeggio
740 @end lilypond
741
742 The direction of the arpeggio can be denoted by adding an
743 arrowhead to the wiggly line.  This is done with the commands
744 @code{arpeggioUp} and @code{arpeggioDown}.  @code{arpeggioNeutral}
745 reverts to the arrow-less version:
746
747 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
748 \new Voice {
749   \arpeggioUp
750   <c e g c>\arpeggio
751   \arpeggioDown
752   <c e g c>\arpeggio
753   \arpeggioNeutral
754   <c e g c>\arpeggio
755 }
756 @end lilypond
757
758
759 @predefined
760
761 @funindex \arpeggio
762 @code{\arpeggio},
763 @funindex \arpeggioUp
764 @code{\arpeggioUp},
765 @funindex \arpeggioDown
766 @code{\arpeggioDown},
767 @funindex \arpeggioNeutral
768 @code{\arpeggioNeutral},
769 @funindex \arpeggioBracket
770 @code{\arpeggioBracket}.
771
772
773 @snippets
774
775 In a @code{PianoStaff}, it is possible to let an arpeggio cross
776 between the staves by setting the property
777 @code{PianoStaff}.@code{connectArpeggios}.
778
779 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
780 \new PianoStaff <<
781   \set PianoStaff.connectArpeggios = ##t
782   \new Staff { <c' e g c>\arpeggio }
783   \new Staff { \clef bass <c,, e g>\arpeggio }
784 >>
785 @end lilypond
786
787 The same can be accomplished in contexts other than
788 @code{PianoStaff} if the @code{Span_arpeggio_engraver} is included
789 in the Score context.
790
791 @lilypond[verbatim,quote,ragged-right]
792 \score {
793   \new StaffGroup {
794     \set Score.connectArpeggios = ##t
795     <<
796       \new Voice \relative c' {
797         <e g>4\arpeggio
798       }
799       \new Voice  \relative c {
800         \clef bass
801         <c e>4\arpeggio
802       }
803     >>
804   }
805   \layout {
806     \context {
807       \Score
808       \consists "Span_arpeggio_engraver"
809     }
810   }
811 }
812 @end lilypond
813
814 Similarly, an arpeggio can be drawn across notes in different
815 voices on the same staff if the @code{Span_arpeggio_engraver} is
816 moved to the Staff context:
817
818 @lilypond[verbatim,quote,ragged-right]
819 \new Staff
820 \with {
821   \consists "Span_arpeggio_engraver"
822 } \relative c' {
823   \set Staff.connectArpeggios = ##t
824     <<
825     {<e' g>4\arpeggio <d f> <d f>2 }
826   \\
827   {<d, f>2\arpeggio  <g b>2  }
828   >>
829 }
830 @end lilypond
831
832
833 @seealso
834
835 @c TODO: Add 'broken chord' to glossary.
836
837 Music Glossary:
838 @rglos{arpeggio}.
839
840 Notation Reference:
841 @ref{Ties}, for writing out arpeggios.
842
843 Snippets:
844 @rlsr{Expressive marks}.
845
846 Internals Reference:
847 @rinternals{Arpeggio},
848 @rinternals{PianoStaff}.
849
850
851 @knownissues
852
853 It is not possible to mix connected arpeggios and unconnected
854 arpeggios in one @code{PianoStaff} at the same point in
855 time.
856
857
858 @node Trills
859 @subsubsection Trills
860
861 @cindex trills
862 @funindex \trill
863
864 Short @notation{trills} are printed with @code{\trill} like normal
865 articulation; see @ref{Articulations and ornamentations}.
866
867 Long running @notation{trills} are made with
868 @code{\startTrillSpan} and @code{\stopTrillSpan}.  In the
869 following example, a long running @notation{trill} is shown
870 combined with grace notes.  To achieve precise control of the
871 placement of the grace notes, see @ref{Grace notes}.
872
873 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
874 c1 \afterGrace
875 d1\startTrillSpan { c16[\stopTrillSpan d] }
876 c4
877 @end lilypond
878
879 @cindex pitched trills
880
881 @notation{Trills} that should be executed on an explicitly
882 specified pitch can be typeset with the command
883 @code{\pitchedTrill} using the following syntax:
884
885 @example
886 @code{\pitchedTrill} @var{mainnote} @code{\startTrillSpan}
887 @var{trillnote} @var{endnote} @code{\stopTrillSpan}
888 @end example
889
890 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
891 \pitchedTrill e2 \startTrillSpan fis
892 d\stopTrillSpan
893 @end lilypond
894
895 @noindent
896 The first argument is the main note.  The pitch of the second is
897 printed as a stemless note head in parentheses.
898
899
900 @predefined
901
902 @code{\startTrillSpan},
903 @funindex \startTrillSpan
904 @code{\stopTrillSpan}.
905 @funindex \stopTrillSpan
906
907
908 @seealso
909
910 Music Glossary:
911 @rglos{trill}.
912
913 Snippets:
914 @rlsr{Expressive marks}.
915
916 Internals Reference:
917 @rinternals{TrillSpanner}.