]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/showing-the-same-articulation-above-and-below-a-note-or-chord.ly
fc135d56bcb7ab05bddcbd562872817d454df398
[lilypond.git] / Documentation / snippets / new / showing-the-same-articulation-above-and-below-a-note-or-chord.ly
1 \version "2.13.36"
2
3 \header {
4   lsrtags = "expressive-marks, tweaks-and-overrides"
5
6   texidoc = "
7 By default, LilyPond does not allow the same articulation (e.g., an
8 accent, a fermata, a flageolet, etc.) to be displayed above and below a
9 note.  For example, @code{c4_\\fermata^\\fermata} will only show a fermata
10 below, ignoring the fermata above.  However, one can stick
11 scripts (just like fingerings) inside a chord, which means it is
12 possible to have as many articulations as desired.  So, the solution is to
13 write the note as a chord and add the articulations inside the @code{<@dots{}>}.
14 "
15   doctitle = "Showing the same articulation above and below a note or chord"
16 }
17
18 % The same as \flageolet, just a little smaller
19 smallFlageolet =
20 #(let ((m (make-articulation "flageolet")))
21    (set! (ly:music-property m 'tweaks)
22          (acons 'font-size -2
23                 (ly:music-property m 'tweaks)))
24    m)
25
26 \relative c' {
27   s4^"Wrong:"
28   c4_\fermata^\fermata % The second fermata is ignored!
29   <e d'>4^\smallFlageolet_\smallFlageolet
30
31   s4^"Works if written inside a chord:"
32   <e_\smallFlageolet d'^\smallFlageolet>4
33   <e_\flageolet d'^\flageolet>4
34   <e_\smallFlageolet^\smallFlageolet>4
35   <e_\fermata^\fermata>4
36 }