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