]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/showing-the-same-articulation-above-and-below-a-note-or-chord.ly
Local updates to LSR July 2012
[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 LSR http://lsr.dsi.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.14.2"
8
9 \header {
10 %% Translation of GIT committish: 28097cf54698db364afeb75658e4c8e0e0ccd716
11   texidocfr = "
12 LilyPond ne permet pas, par défaut, qu'une même articulation (accent,
13 flageolet, point d'orgue etc.) se retrouve à la fois au-dessus et
14 au-dessous d'une note.  Par exemple, @code{c4_\\fermata^\\fermata} ne
15 donnera qu'un seul point d'orgue en dessous du do ; celui du dessus sera
16 tout bonnement ignoré.  On peut néanmoins accoler des scripts, tels des
17 doigtés, à l'intérieur d'un accord ; il peut donc y avoir autant
18 d'articulations que de besoin, ce qui, par voie de conséquence, permet
19 de s'affranchir de la présence de hampes et de positionner l'articulation
20 relativement à la tête de note comme dans le cas du flageolet
21 ci-dessous.  L'imitation du traitement d'un script externe à un accord
22 requérant un @code{'add-stem-support}, la solution consiste à libeller
23 la note comme étant un accord et ajouter les articulations au sein de la
24 construction @code{<...>}.  Un simple amendement permettra de rectifier
25 le positionnement habituel en surplomb :
26 @code{<c-\\tweak #'direction #DOWN-\\fermata^\\fermata>}
27
28 "
29   doctitlefr = "Impression d'une même articulation des deux côtés d'une note ou d'un accord"
30
31   lsrtags = "expressive-marks, tweaks-and-overrides, version-specific"
32
33   texidoc = "
34 By default, LilyPond does not allow the same articulation (e.g., an
35 accent, a fermata, a flageolet, etc.) to be displayed above and below a
36 note. For example, c4_\\fermata^\\fermata will only show a fermata
37 below. The fermata above will simply be ignored. However, one can stick
38 scripts (just like fingerings) inside a chord, which means it is
39 possible to have as many articulations as desired. This approach has
40 the advantage that it ignores the stem and positions the articulation
41 relative to the note head. This can be seen in the case of the
42 flageolets in the snippet. To mimic the behaviour of scripts outside a
43 chord, 'add-stem-support would be required. So, the solution is to
44 write the note as a chord and add the articulations inside the <...>.
45 The direction will always be above, but one can tweak this via a
46 \\tweak: @code{<c-\\tweak #'direction #DOWN-\\fermata^\\fermata>}
47
48 "
49   doctitle = "Showing the same articulation above and below a note or chord"
50 } % begin verbatim
51
52
53 % The same as \flageolet, just a little smaller
54 smallFlageolet =
55 #(let ((m (make-articulation "flageolet")))
56    (set! (ly:music-property m 'tweaks)
57          (acons 'font-size -2
58                 (ly:music-property m 'tweaks)))
59    m)
60
61 \relative c' {
62   s4^"Wrong:"
63   c4_\fermata^\fermata % The second fermata is ignored!
64   <e d'>4^\smallFlageolet_\smallFlageolet
65
66   s4^"Works if written inside a chord:"
67   <e_\smallFlageolet d'^\smallFlageolet>4
68   <e_\flageolet d'^\flageolet>4
69   <e_\smallFlageolet^\smallFlageolet>4
70   <e_\fermata^\fermata>4
71 }