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