« Introduction à LilyPond/Une ligne mélodique complète » : différence entre les versions

Contenu supprimé Contenu ajouté
m →‎Phrasé et attaques : syntaxhighlight
m →‎Ornements : syntaxhighlight
Ligne 364 :
 
; Exemple
: <syntaxhighlight lang="tex">
<span style="color: #AA0000;"><<</span>
<<
<span style="color: #00AA00;">{</span> c1 \startTrillSpan <span style="color: #00AA00;">}</span>
{ c1 \startTrillSpan }
<span style="color: #00AA00;">{</span> s2. <span style="color: #0000AA;">\grace {</span> d16<span style="color: #AAAA00;">[</span>\stopTrillSpan e<span style="color: #AAAA00;">]</span> <span style="color: #0000AA;">}</span> <span style="color: #00AA00;">}</span>
{ s2. \grace { d16[\stopTrillSpan e] } }
<span style="color: #AA0000;">>></span>
>>
</syntaxhighlight>
 
L'ajout d'une altération sur un mordant ou un ''gruppetto'' est un peu complexe. À la base, on ajoute simplement une annotation <code>^\markup { ''alteration'' }</code> à la note, après l'ornement ; ''alteration'' est à remplacer par <code><span id="sharp1">\sharp</span></code> pour un <span id="dièse2">dièse</span>, <code><span id="flat1">\flat</span></code> pour un <span id="bemol2">bémol</span> et <code><span id="natural1">\natural</span></code> pour un <span id="becarre2">bécarre</span>. Cependant, il faut indiquer à LilyPond quel est le symbole à mettre en dessous : l'ornement (qui est, du point de vue programmation, un ''script''), auquel cas c'est la note supérieure de l'ornement qui est altérée, ou l'altération (qui est, du point de vue programmation, un ''text-script''), auquel cas c'est la note inférieure qui est altérée. Cela se fait en modifiant la priorité du ''script'' ou du ''text-script''. On indique donc, avant la note :
Ligne 374 ⟶ 376 :
 
; Exemple
: <syntaxhighlight lang="tex">
c4 \trill c \prall c \mordent c \turn c \reverseturn
\acciaccatura d8 e4
<span style="color: #AA0000;">\appoggiatura {</span>c16<span style="color: #00AA00;">[</span> d e f<span style="color: #00AA00;">]</span><span style="color: #AA0000;">}</span> c4
\appoggiatura {c16[ d e f]} c4
<span style="color: #AA0000;">\grace {</span>c16<span style="color: #00AA00;">[</span> d e f<span style="color: #00AA00;">]</span><span style="color: #AA0000;">}</span> c4
\grace {c16[ d e f]} c4
 
\once \override TextScript #'script-priority = #-100
a4^\turn^<span style="color: #AA0000;">\markup {</span> \sharp <span style="color: #AA0000;">}</span>
a4^\turn^\markup { \sharp }
 
\once \override Script #'script-priority = #-100
a4^\reverseturn^<span style="color: #AA0000;">\markup {</span> \flat <span style="color: #AA0000;">}</span>
a4^\reverseturn^\markup { \flat }
 
\once \override TextScript #'script-priority = #-100
a4^\prall^<span style="color: #AA0000;">\markup {</span> \natural <span style="color: #AA0000;">}</span>
a4^\prall^\markup { \natural }
</syntaxhighlight>
: donne
: [[Image:Ly ornements.png|300px]]