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