Muusika kompositsiooniõpetus/LIIVAKAST

Siin saab katsetada notatsioonitarkvara sobivust viki-tarkvaraga:

Lily Pond

muuda

Noodijoonestik

muuda
 
 

Helivältus

muuda
 
 
 
 

Punktiga vältused

muuda
 
 

Tupletid

muuda
 
 
 
 
 


 

Helivältuste skaleerimine

muuda
 
 


Sidekaar

muuda
 


 

Sidekaar võtmemärkide vahetusega

muuda
 

Laissez vibrer

muuda
 


Arpedžo

muuda
 


Tremolo

muuda
 

Helikõrgus

muuda
 


 
 

Helikõrgus koos vältuste ja tekstiga

muuda
 

Ambitus

muuda
 

Võtmed

muuda
LilyPond did not produce any output file. Please check your score code.
LilyPond did not produce any output file. Please check your score code.
LilyPond did not produce any output file. Please check your score code.
LilyPond did not produce any output file. Please check your score code.

Heliredel

muuda
 


Klaver

muuda
 
 
 


 

Unable to compile LilyPond input file:

line 2 - column 1:
not a note name: music
--------
line 2 - column 7:
syntax error, unexpected '=', expecting '}'
--------
line 7 - column 1:
unknown escaped string: `\autochange'
--------
line 7 - column 16:
unknown escaped string: `\music'
--------
line 8 - column 1:
unknown escaped string: `\autochange'
--------
line 8 - column 39:
unknown escaped string: `\music'
--------
line 9 - column 1:
unknown escaped string: `\autochange'
--------
line 9 - column 1:
syntax error, unexpected STRING, expecting '.' or '='
--------
line 9 - column 37:
syntax error, unexpected \with
--------
line 9 - column 59:
unknown escaped string: `\music'
--------
line 11 - column 1:
syntax error, unexpected \layout, expecting '.' or '='
--------
line 16 - column 1:
syntax error, unexpected '}'
 

Noteerimine löökpillidele

muuda

Unable to compile LilyPond input file:

line 2 - column 1:
not a note name: up
--------
line 2 - column 4:
syntax error, unexpected '=', expecting '}'
--------
line 9 - column 30:
syntax error, unexpected NUMBER_IDENTIFIER
--------
line 8 - column 1:
errors found, ignoring music expression
--------
line 18 - column 1:
syntax error, unexpected '}'
 
 
 

Unable to compile LilyPond input file:

line 9 - column 1:
not a note name: up
--------
line 9 - column 4:
syntax error, unexpected '=', expecting '}'
--------
line 14 - column 30:
syntax error, unexpected NUMBER_IDENTIFIER
--------
line 12 - column 1:
errors found, ignoring music expression
--------
line 23 - column 1:
syntax error, unexpected '}'

Gregooriuse koraal

muuda

Unable to compile LilyPond input file:

line 2 - column 10:
include files are not allowed in safe mode
--------
line -2 - column 22:
Missing music in \score
--------
line 3 - column 1:
syntax error, unexpected \score, expecting '}'
--------
line 6 - column 24:
unknown escaped string: `\flexa'
--------
line 7 - column 12:
unknown escaped string: `\flexa'
--------
line 7 - column 19:
unknown escaped string: `\deminutum'
--------
line 8 - column 9:
unknown escaped string: `\divisioMinima'
--------
line 9 - column 20:
unknown escaped string: `\pes'
--------
line 9 - column 33:
unknown escaped string: `\pes'
--------
line 10 - column 10:
unknown escaped string: `\divisioMinima'
--------
line 11 - column 24:
unknown escaped string: `\flexa'
--------
line 12 - column 12:
unknown escaped string: `\flexa'
--------
line 12 - column 19:
unknown escaped string: `\deminutum'
--------
line 12 - column 48:
unknown escaped string: `\divisioMinima'
--------
line 17 - column 3:
syntax error, unexpected >>
--------
line 25 - column 1:
syntax error, unexpected '}'


Introduction

muuda

LilyPond est un logiciel libre de notation musicale, qui a la particularité d’utiliser une notation littérale pour indiquer les notes, signes d'articulation, dynamiques, etc[1].

C'est pourquoi il a été choisi pour être intégré dans le système wiki de WikiMedia pour permettre aux contributeurs de rédiger des "petits bouts" de partition musicale, destinés par exemple à l'illustration d'un article sur la musique[2]. L'extension Lilypond, avec sa balise <score>, a été implémentée le 22 avril 2013[3].

On pourra trouver plus de détails sur cette implémentation dans le document Extension:Score sur MediaWiki (en anglais).


Le but de cette leçon est de faciliter l'apprentissage du code Lilypond, et de permettre à tout un chacun de pouvoir éditer des exemples musicaux simples au départ, ou plus évolués, avec des paroles, des annotations diverses au dessus des portées, etc.


Syntaxe de base

muuda

Code minimal

muuda
<score> { c'1 } </score>

donne :

 


Nous pouvons voir que Lilypond ajoute par défaut une clef de sol, une mesure à 4/4, et place les barres de mesure de façon automatique aux endroits adéquats.

Cependant il nous paraît plus rigoureux d'indiquer ces éléments de façon explicite, tout en ajoutant des retours à la ligne pour plus de lisibilité. Nous aurons alors le code suivant :

<score>
{
\clef treble

c'1

\bar "|."
}
</score>

qui donnera la partition suivante :


 


Code de base

muuda

Pour nos exemples musicaux, nous utilisons le code :

<score> { \clef treble a''1 \bar "|." } </score>

ou plutôt, de façon moins concise mais plus claire :

<score>
{
\clef treble
a'1
\bar "|."
}
</score>

qui permet d'obtenir le résultat suivant :

 


Fonctions simples

muuda

Anacrouse

muuda

Source

http://www.lilypond.org/doc/v2.19/Documentation/notation/displaying-rhythms#upbeats


Syntaxe

\partial durée


Code source

<score vorbis="1">
{
\clef bass
\key g \major 
\time 3/4

\partial 4
g4
c8 d e fis g a b4 c'2

\bar "|."
}
</score>


Résultat

 



Barres de mesures

muuda

Source

http://www.lilypond.org/doc/v2.19/Documentation/notation/bars


Syntaxe

\bar


Code source Résultat
<score vorbis="1">
{
\clef bass

c1	\bar "|"
d	\bar "."
e	\bar "||"
f	\bar ".|"
g	\bar ".."
a	\bar "|.|"
b	\bar "|."

\clef treble

c'	\bar ";"
d'	\bar "!"
e'	\bar ".|:"
f'	\bar ":..:"
g'	\bar ":|.|:"
a'	\bar ":|.:"
b'	\bar ":.|.:"
c''	\bar "[|:"
d''	\bar ":|][|:"
e''	\bar ":|]"
f''	\bar ":|."

\bar "|."
}
</score>
 



Doigtés

muuda

Source

http://www.lilypond.org/doc/v2.18/Documentation/notation/inside-the-staff#fingering-instructions


Syntaxe

note-chiffre_du_doigt
Code source Résultat
<score vorbis="1">
{
\clef bass
c4-5 a-3 f-1 c'-5
r1
\bar "|."
}
</score>
 



Glyphes / Signes "spéciaux"

muuda

Source

http://www.lilypond.org/doc/v2.19/Documentation/notation/bars#index-musicglyph-1

http://www.lilypond.org/doc/v2.19/Documentation/notation/the-feta-font

http://www.lilypond.org/doc/v2.19/Documentation/notation/bars#bar-and-bar-number-checks


Mall:Colonnes



Hampes & ligatures

muuda

Source

http://www.lilypond.org/doc/v2.18/Documentation/learning/on-the-un_002dnestedness-of-brackets-and-ties

http://lilypond.org/doc/v2.18/Documentation/notation/beams


Syntaxe

  • Type de crochet Fonction
  • { … } Délimite un segment de musique séquentielle
  • < … > Délimite les notes d’un accord
  • << … >> Délimite des sections simultanées
  • ( … ) Marque le début et la fin d’une liaison
  • \( … \) Marque le début et la fin d’une liaison de phrasé
  • [ … ] Marque le début et la fin d’une ligature manuelle

D’autres constructions permettent d’obtenir des lignes regroupant ou en travers des notes : les liaisons de prolongation indiquées par un tilde (~), les marques de nolet avec \times x/y { … }, ou encore les notes d’ornement avec \grace{ … }.

\stemUp
\stemDown
\stemNeutral


Code source Résultat
<score vorbis="1">
{
\clef bass
g8\( a b[ c' b\) a] g4 

a8[ ais] d[ ees r d] c16 b a8

\autoBeamOff
a8 c b4 d8. c16 b4 |
\autoBeamOn
a8 c b4 d8. c16 b4 |

\time 4/4
r4 r8[ g' a r] r8 g[ | a] r

\bar "|."
}
</score>
 


Code source Résultat
<score vorbis="1">
{
\clef bass
\stemUp
g8\(^"Hampes vers le haut" a b[ c' b\) a] g4
\bar "|."
}
</score>
 
<score vorbis="1">
{
\clef bass
\stemDown
g8\(^"Hampes vers le bas" a b[ c' b\) a] g4
\bar "|."
}
</score>
 


Improvisation

muuda

Source

http://lilypond.org/doc/v2.18/Documentation/notation/note-heads#index-improvisationOn-1


Syntaxe

\improvisationOn


Code

<score vorbis="1">
{
\clef bass

\new Voice \with {
  \consists "Pitch_squash_engraver"
} {
  e8 e g a a16( bes) a8 g
  \improvisationOn
  e8 ~
  e2 ~ e8 f4 f8 ~
  f2
  \improvisationOff
  a16( bes) a8 g e
}

\bar "|."
}
</score>


Résultat

 



Indication métronomique

muuda

Source

http://www.lilypond.org/doc/v2.18/Documentation/notation/displaying-rhythms#metronome-marks


Mall:Colonnes


Instruments MIDI

muuda

Source

http://lilypond.org/doc/v2.18/Documentation/notation/midi-instruments

Mall:Colonnes



Liaisons

muuda

Source

http://lilypond.org/doc/v2.18/Documentation/notation/expressive-marks-as-curves


Mall:Colonnes



Ligne rythmique

muuda

Source

http://lilypond.org/doc/v2.18/Documentation/notation/displaying-rhythms#showing-melody-rhythms


Syntaxe

\new RhythmicStaff


Code

<score vorbis="1">
\new RhythmicStaff {
\time 4/4

% juste pour les hampes vers le bas
\stemDown

c4 e8 f g2
r4 g g f
g1
\bar "|."
}
</score>


Résultat

 


Métrique

muuda

pour enlever le signe de mesure

Source

http://www.lilypond.org/doc/v2.18/Documentation/notation/modifying-context-plug_002dins.fr.html


Syntaxe

\new Staff \with { \remove "Time_signature_engraver" }


Code

<score>
{
\new Staff \with { \remove "Time_signature_engraver" }
\clef bass

c4 d e d c4

\bar "|."
}
</score>


Résultat

 



Musique non mesurée

muuda

Source

http://lilypond.org/doc/v2.18/Documentation/notation/displaying-rhythms#unmetered-music


Syntaxe

\cadenzaOn


Code

<score vorbis="1">
{
\clef bass
c4 d e d
\cadenzaOn
c4 c d16[ e f g a g f e d cis d e] f4 g4.
\cadenzaOff
\bar "|"
d4 e d c
}
</score>


Résultat

 



Paroles

muuda

Source

http://www.lilypond.org/doc/v2.18/Documentation/notation/common-notation-for-vocal-music#automatic-syllable-durations


Mall:Colonnes



Percussion (clef)

muuda

Source

http://www.lilypond.org/doc/v2.18/Documentation/notation/common-notation-for-percussion#basic-percussion-notation


Code

<score vorbis="1">
{
\clef percussion
\time 4/4

c'8 c' \times 2/3{c'8 c' c' } c'8 c' \times 2/3{c'4 c'8 }
c'8 c' \times 2/3{c'8 c'4 } c'8 c' \times 2/3{r4 c'8 }
c'8 c' \times 2/3{r8 c' c' } c'8 c' \times 2/3{r8 c'4 }
r8 c' \times 2/3{c'8 c' c' } r8 c' \times 2/3{c'4 c'8 }
r8 c' \times 2/3{c'8 c'4 } r8 c' \times 2/3{r4 c'8 }

\bar "|."
}
</score>

Résultat

 



Percussion (écriture)

muuda

Source

http://lilypond.org/doc/v2.18/Documentation/notation/common-notation-for-percussion http://lilypond.org/doc/v2.18/Documentation/notation/percussion-notes


Mall:Colonnes



Portées multiples

muuda

Source

http://www.lilypond.org/doc/v2.18/Documentation/notation/common-notation-for-keyboards


Il y a deux façons de faire :

Mall:Colonnes


Répétitions de mesure

muuda

Source

http://lilypond.org/doc/v2.19/Documentation/notation/short-repeats#short-repeats


Syntaxe

\makePercent


Code

<score vorbis="1">
{
\clef bass

\repeat percent 2 { c4 d e f }
\repeat percent 2 { c2 d }
\repeat percent 2 { c1 }

\bar "||"

\break

\clef treble

\relative c'' {
  \set countPercentRepeats = ##t
  \repeat percent 4 { c1 }
}

}
</score>


Résultat

 



Répétitions de motifs

muuda

Source

http://lilypond.org/doc/v2.18/Documentation/notation/long-repeats#written_002dout-repeats


Mall:Colonnes


Résultat

 



Répétitions de sections

muuda

Source

http://lilypond.org/doc/v2.18/Documentation/notation/long-repeats#normal-repeats


Mall:Colonnes


Résultat

 
 



Silences

muuda

Source

http://www.lilypond.org/doc/v2.19/Documentation/notation/writing-rests


Mall:Colonnes



Tablature

muuda

Source

http://www.lilypond.org/doc/v2.18/Documentation/notation/common-notation-for-fretted-strings#index-TabStaff-4

http://www.lilypond.org/doc/v2.18/Documentation/notation/common-notation-for-fretted-strings#default-tablatures


Mall:Colonnes


Autre exemple

 



Tempo (indications)

muuda

Source

http://www.lilypond.org/doc/v2.18/Documentation/learning/simple-notation#tempo-marks


Syntaxe

\tempo


Code

<score vorbis="1">
{
\clef treble
\relative c'' {
  \time 3/4
  \tempo "Andante"
  a4 a a
  \time 6/8
  \tempo 4. = 96
  a4. a
  \time 4/4
  \tempo  "Presto" 4 = 120
  a4 a a a
}
r1
\bar "|."
}
</score>


Résultat

 



Triolet

muuda

Source

http://www.lilypond.org/doc/v2.18/Documentation/notation/writing-rhythms#tuplets


Syntaxe

\times fraction { expression_musicale }


Code

<score vorbis="1">
{
\clef bass

\times 2/3{ b8 c d } e8 f \times 2/3{ g4 a8 }
b8 c \times 2/3{ d8 e4 } f8 g \times 2/3{ r4 a8 }
b8 c \times 2/3{ r8 d e } f8 e \times 2/3{ r8 d4 }
r8 c \times 2/3{ b8 a g } r8 f \times 2/3{ e4 d8 } r4

\bar "|."
}
</score>


Résultat

 


Fonctions avancées

muuda

Accord : mode

muuda

Source

http://lilypond.org/doc/v2.18/Documentation/notation/chord-mode


Syntaxe

\chordmode


Code

<score vorbis="1">
{
\clef treble
\chordmode { c2 g f g c1 }
\bar "|."
}
</score>


Résultat

 



Accords : notation

muuda

Source

http://www.lilypond.org/doc/v2.18/Documentation/learning/combining-notes-into-chords

http://www.lilypond.org/doc/v2.18/Documentation/notation/common-chord-modifiers


Mall:Colonnes



Attribut pour 'score'

muuda

Source

https://www.mediawiki.org/wiki/Extension:Score


Syntaxe

<score raw="1" lang="lilypond">


Explications

Paramètre : raw

Valeur : 0 (default), 1

Si on indique raw="1", le code de la partition est interprété pour produire une partition complète. Utilisez cette option si vous voulez créer des partitions plus complexes.

Si le paramètre langage (lang) n’est pas "lilypond", cet attribut est ignoré. Donc il faut bien écrire :

<score raw="1" lang="lilypond">


Basse chiffrée

muuda

Source

http://www.lilypond.org/doc/v2.18/Documentation/notation/figured-bass#entering-figured-bass


Code source Résultat
<score vorbis="1">
{
\clef bass

<<
c2.

\figures {
  <7! 6+ 4->4 <5++> <3-->
}
>>

<<
  \new Voice { \clef bass dis4 c d ais g fis}
  \new FiguredBass {
    \figuremode {
      < 6 >4 < 7\+ >8 < 6+ [_!] >
      < 6 >4 <6 5 [3+] >
      < _ >4 < 6 5/>4
    }
  }
>>

r4 r2

<<
  {
    \clef bass
    e4 d c b,
    e4 d c b,
  }
  \figures {
    \bassFigureExtendersOn
    <6 4>4 <6 3> <7 3> <7 3>
    \bassFigureExtendersOff
    <6 4>4 <6 3> <7 3> <7 3>
  }
>>

\bar "|."
}
</score>
 



Découpage automatique des notes

muuda

Source

http://www.lilypond.org/doc/v2.19/Documentation/notation/displaying-rhythms#automatic-note-splitting


Mall:Colonnes



Imitation par mouvement contraire

muuda

Source

http://lilypond.org/doc/v2.18/Documentation/notation/changing-multiple-pitches#inversion


Syntaxe

\inversion hauteur-pivot hauteur-arrivée expression_musicale


Code

<score vorbis="1">
{
\clef treble

\relative c' { c8 d e f g a b c }
\inversion c' c' \relative c' { c8^"c'" d e f g a b c }
\inversion c' e' \relative c' { c8^"e'" d e f g a b c }
\inversion c' a' \relative c' { c8^"a'" d e f g a b c }
\inversion c' c'' \relative c' { c8^"c''" d e f g a b c }

\bar "|."
}
</score>


Résultat

 



Imitation par mouvement contraire (inversion modale)

muuda

Source

http://lilypond.org/doc/v2.18/Documentation/notation/changing-multiple-pitches#index-modalInversion-1


Syntaxe

\modalInversion hauteur-pivot hauteur-arrivée gamme motif


Code

<score vorbis="1">
{
\clef bass

{ c8 d e f g a b c' }
\modalInversion g g { c d e f g a b } { c8 d e f g a b c' }

\bar "|."
}
</score>


Résultat

 



Imitation par mouvement rétrograde

muuda

Source

http://lilypond.org/doc/v2.18/Documentation/notation/changing-multiple-pitches#retrograde


Mall:Colonnes



Instanciation explicite des voix

muuda

Source

http://www.lilypond.org/doc/v2.18/Documentation/learning/explicitly-instantiating-voices#index-shift_002c-commandes


Syntaxe

Les contextes Voice peuvent être déclarés manuellement dans un bloc << >> pour créer de la musique polyphonique, en utilisant \voiceOne… jusqu’à \voiceFour pour assigner des directions de hampes et un déplacement horizontal pour chaque partie. Cette méthode apporte de la clarté pour des partitions plus importantes puisqu’elle permet de bien séparer les voix et de leur affecter un nom plus parlant.

En particulier, la construction << \\ >> que nous avons vue précédemment :


Code

<score vorbis="1">
{
\new Staff {
  \relative c' {
    << { e4 f g a } \\ { c,4 d e f } >>
  }
}

\new Staff <<
  \new Voice = "1" { \voiceOne \relative c' { e4 f g a } }
  \new Voice = "2" { \voiceTwo \relative c' { c4 d e f } }
>>

\new Staff \relative c' {
  c16^( d e f
  <<
    { g4 f e | d2 e) | }
    \new Voice {
      \voiceTwo
      r8 e4 d c8~ |
      <<
        { c8 b16 a b8 g~ g2 | }
        \new Voice {
          \voiceThree
          s4 b c2 |
        }
      >>
    }
  >>
}

\new Staff \relative c' <<
  % Initiate first voice
  \new Voice {
    \voiceOne
    c16^( d e f g4 f e | d2 e2) |
  }
  % Initiate second voice
  \new Voice {
    % Set stems, etc, down
    \voiceTwo
    s4 r8 e4 d c8 ~ | c8 b16 a b8 g ~ g2 |
  }
  % Initiate third voice
  \new Voice {
    % Set stems, etc, up
    \voiceThree
    s1 | s4 b4 c2 |
  }
>>

\bar "|."
}
</score>


Résultat

 



Texte

muuda

Texte de base

muuda

Source

http://www.lilypond.org/doc/v2.18/Documentation/notation/writing-text


Code

<score vorbis="1">
{
a8^"pizz." g f e a4-"scherz." f

a8^\markup { \italic pizz. } g f e
a4_\markup { \tiny scherz. \bold molto } f

a8^"pizz." g f e
\textLengthOn
a4_"scherzando" f
}
</score>


Résultat

 



Alignement

muuda

Source

http://lilypond.org/doc/v2.18/Documentation/notation/formatting-text#text-alignment


Mall:Colonnes


Chiffres

muuda

Source

http://www.lilypond.org/doc/v2.18/Documentation/notation/writing-text


Code

<score>
{
c'4^\markup { \null \raise #2 { \number 1 } }
}
</score>


Résultat

 




Justification

muuda

Source

http://www.lilypond.org/doc/v2.18/Documentation/notation/align


Syntaxe

s_\markup {
\fontsize #1.5
\override #'(line-width . 50)
\justify-string #" ... " }


Code

<score vorbis="1">
{
\clef treble

s_\markup {
\fontsize #1.5
\override #'(line-width . 50)
\justify-string #"
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
" }

\bar "|."
}
</score>


Résultat

 


Mise en forme

muuda

Source

http://lilypond.org/doc/v2.18/Documentation/notation/writing-text


Voir aussi

http://lilypond.org/doc/v2.18/Documentation/notation/formatting-text#page-wrapping-text


Mall:Colonnes



Transposition

muuda

Source

http://lilypond.org/doc/v2.19/Documentation/source/Documentation/notation/changing-multiple-pitches.fr.html#transpose


Syntaxe

\transpose note_de_départ note_d_arrivée { expression_musicale }


Code source Résultat
<score vorbis="1">
{
\clef treble
\transpose c c' { c8 d e f g a b c' }
\transpose c d' { c8 d e f g a b c' }
\transpose c g' { c8 d e f g a b c' }
\transpose c c' { c8 d e f g a b c' }

\bar "|."
}
</score>
 


Autre exemple

<score vorbis="1">
{
\clef treble

\transpose c c' { c8^\markup { \null \raise #1 \bold { C } } d e f g a b c' b a g f e d c4 }
\transpose c f' { c8^\markup { \null \raise #1 \bold { F } } d e f g a b c' b a g f e d c4 }
\transpose c bes { c8^\markup { \null \raise #1 \bold { Bb } } d e f g a b c' b a g f e d c4 }
\transpose c ees' { c8^\markup { \null \raise #1 \bold { Eb } } d e f g a b c' b a g f e d c4 }
\transpose c aes { c8^\markup { \null \raise #1 \bold { Ab } } d e f g a b c' b a g f e d c4 }
\transpose c des' { c8^\markup { \null \raise #1 \bold { Db } } d e f g a b c' b a g f e d c4 }
\transpose c ges { c8^\markup { \null \raise #1 \bold { Gb } } d e f g a b c' b a g f e d c4 }
\transpose c b { c8^\markup { \null \raise #1 \bold { B } } d e f g a b c' b a g f e d c4 }
\transpose c e' { c8^\markup { \null \raise #1 \bold { E } } d e f g a b c' b a g f e d c4 }
\transpose c a { c8^\markup { \null \raise #1 \bold { A } } d e f g a b c' b a g f e d c4 }
\transpose c d' { c8^\markup { \null \raise #1 \bold { D } } d e f g a b c' b a g f e d c4 }
\transpose c g { c8^\markup { \null \raise #1 \bold { G } } d e f g a b c' b a g f e d c4 }

\bar "|."
}
</score>


 


Transposition sur un mode

muuda

Source

http://lilypond.org/doc/v2.19/Documentation/source/Documentation/notation/changing-multiple-pitches#modal-transformations


Syntaxe

\modalTranspose hauteur-départ hauteur-arrivée { mode } { motif }


Sur une gamme "classique"

muuda

Code

<score vorbis="1">
{
\clef treble

\modalTranspose c	c'	 { c d e f g a b } { c8 d e f }
\modalTranspose c	d'	 { c d e f g a b } { c d e f }
\modalTranspose c	e'	 { c d e f g a b } { c d e f }
\modalTranspose c	f'	 { c d e f g a b } { c d e f }
\modalTranspose c	g'	 { c d e f g a b } { c d e f }
\modalTranspose c	a'	 { c d e f g a b } { c d e f }
\modalTranspose c	b'	 { c d e f g a b } { c d e f }
\modalTranspose c	c''	 { c d e f g a b } { c d e f }
\modalTranspose c	d''	 { c d e f g a b } { c d e f }
\modalTranspose c	e''	 { c d e f g a b } { c d e f }
\modalTranspose c	f''	 { c d e f g a b } { c d e f }
\modalTranspose c	g''	 { c d e f g a b } { c d e f }
\modalTranspose c	c'''	 { c d e f g a b } { c b, a, g, }
\modalTranspose c	b''	 { c d e f g a b } { c b, a, g, }
\modalTranspose c	a''	 { c d e f g a b } { c b, a, g, }
\modalTranspose c	g''	 { c d e f g a b } { c b, a, g, }
\modalTranspose c	f''	 { c d e f g a b } { c b, a, g, }
\modalTranspose c	e''	 { c d e f g a b } { c b, a, g, }
\modalTranspose c	d''	 { c d e f g a b } { c b, a, g, }
\modalTranspose c	c''	 { c d e f g a b } { c b, a, g, }
\modalTranspose c	b'	 { c d e f g a b } { c b, a, g, }
\modalTranspose c	a'	 { c d e f g a b } { c b, a, g, }
\modalTranspose c	g'	 { c d e f g a b } { c b, a, g, }
\modalTranspose c	f'	 { c d e f g a b } { c b, a, g,~ }

c'1

\bar "|."
}
</score>


Résultat

 



Sur une gamme pentatonique

muuda

Code

<score vorbis="1">
{
\clef treble

\modalTranspose c 	c'	 { c d e g a } { c8 d e }
\modalTranspose c 	d'	 { c d e g a } { c8 d e }
\modalTranspose c 	e'	 { c d e g a } { c8 d e }
\modalTranspose c 	g'	 { c d e g a } { c8 d e }
\modalTranspose c 	a'	 { c d e g a } { c8 d e }
\modalTranspose c 	c''	 { c d e g a } { c8 d e }
\modalTranspose c 	d''	 { c d e g a } { c8 d e }
\modalTranspose c 	e''	 { c d e g a } { c8 d e }
\modalTranspose c 	g''	 { c d e g a } { c8 d e }
\modalTranspose c 	a''	 { c d e g a } { c8 d e }
\modalTranspose c 	c'''	 { c d e g a } { c8 d e }
\modalTranspose c 	a''	 { c d e g a } { c8 d e }
\modalTranspose c 	g''	 { c d e g a } { c8 d e }
\modalTranspose c 	e''	 { c d e g a } { c8 d e }
\modalTranspose c 	d''	 { c d e g a } { c8 d e }
\modalTranspose c 	c''	 { c d e g a } { c8 d e }
\modalTranspose c 	a'	 { c d e g a } { c8 d e }
\modalTranspose c 	g'	 { c d e g a } { c8 d e }
\modalTranspose c 	e'	 { c d e g a } { c8 d e }
\modalTranspose c 	d'	 { c d e g a } { c8 d e }

c'2
\bar "|."
}
</score>


Résultat

 



Fonctions non implémentées

muuda

Succession de durées individuelles

muuda

Lorsque une note ou un accord est suivi d’une succession de durées individuelles, celles-ci adopteront la ou les dernières hauteurs mentionnées.

(ne semble pas fonctionner)



Têtes de notes en forme de croix

muuda
\override NoteHead.style = #'cross 

(ne fonctionne pas)



Variables

muuda

NB. Les variables ne fonctionnent qu'avec l'option 'partition complète', c'est-à-dire avec la syntaxe <score raw="1" lang="lilypond">.


Source

http://www.lilypond.org/doc/v2.18/Documentation/notation/techniques-specific-to-lyrics#working-with-lyrics-and-variables


Code

<score raw="1" lang="lilypond">
musicOne = \relative c'' {
  c4 b8. a16 g4. f8 e4 d c2
}
verseOne = \lyricmode {
  Joy to the world, the Lord is come.
}
\score {
  <<
    \new Voice = "one" {
      \time 2/4
      \musicOne
    }
    \new Lyrics \lyricsto "one" {
      \verseOne
    }
  >>
}
</score>


Résultat

 


Notes & références

muuda

Mall:Références



Ressources

muuda


Element attributes

muuda
Attribute Description
lang="ABC" use ABC notation
lang="lilypond" use LilyPond notation (default)
midi="1" score image links to an automatically generated MIDI file
vorbis="1" adds an audio player beneath the score image to play an automatically generated Ogg Vorbis file
raw="1" the score code is interpreted as a complete LilyPond file to allow more complex scores (requires LilyPond notation)
override_midi="…" replaces the automatically generated MIDI file by the given one
override_ogg="…" replaces the automatically generated Ogg Vorbis file by the given one

Examples

muuda

Simple

<score>
{c' d' e' f' f' fes' eis' e'}
</score>

gives

 


More elaborate

<score>
  \transpose c g \relative c' {
  \key c \minor
  \time 4/4
    c4 e8 e g4 g          % (text after the % is just a comment)
    <c es g>2 <c es g>    % angle brackets create chords
    es4 d( ces b)         % parentheses create slurs
    a4. r8 r8 a8 ~ a4     % r creates rests; ~ creates ties
    e-- e-> e-. g\fermata % accents and other signs
    \bar "|."
  }
</score>

gives

 

Syntax

muuda

The score section must be surrounded by Mall:Tag. The notes must be within a set of curly braces {...}.

Comments in the markup start with a percentage sign % and end at the end of the line.

Pitch

muuda

To display a note, type the letter (a b c etc.) Separate each letter with a space.

Sharps are formed with the suffix is (ais bis cis dis eis fis gis).

Flats are formed with the suffix, except for EMall:Music, for which the notation is simply "es" (aes bes ces des es fes ges).

If the code includes the line '\language "english"' then sharps and flats may be formed from the suffixes s and f (fs bf).

Double sharps are formed with the suffix isis and double flats with eses.

By default, each note name refers to the note below middle C. For example, c would be displayed as

 

or

 

. Use the apostrophe (') to go up an octave and a comma (,) to go an octave down. Middle C would be c'

 

.

 <score>
  {
   a,, c, e, a,
   c e a c'
   e' a' c'' e''
   a'' c''' e''' g'''
   \bar "||"
   aes'' bes'' gis'' dis''
  }
 </score>
 

A much easier way is to use relative coding. If you include \relative before the braces, each note will refer to the note closest to the previous one, and the first one will refer to the note closest to the one mentioned after the \relative tag. ("Closest" ignores sharps and flats.) Use ' to go up an extra octave and , to go down.

 <score>
 \relative c' {
  e f <c e g>2
  a'4( b c) c,
  d8 e f16 g a b
  c4. a8 e' f g, f r \autoBeamOff e d c
  b4 a g b-> c2.-> r4
  \bar "|."
  }
 </score>
 

Setting the key

muuda

By default there is no key signature (no sharps or flats). You can indicate the key with \key g \major, \key c \minor, or even a mode such as \key c \dorian or \key c \mixolydian. The key can be changed at any point.

Keep in mind that even with a key signature, you must still include sharps (-is) and flats (-es) for each individual note name. If you omit one, it will be considered a natural. For example, this is the key of C# major:

<score>
 \relative c' {
   \key cis \major
   \time 6/8

% Notes with -is suffixes indicating sharps
   cis8 dis eis fis gis ais

% Notes without accidentals (naturals)
   b c d e f g
  }
</score>
 

Rhythm

muuda

Note duration is indicated by a number following the pitch with no space between (a4 b8). Use the number 1 for a whole note (breve), 2 for a half note (semibreve), 4 for a quarter note (crotchet), 8 for an eighth note (quaver), and so on. If a note does not have an explicit duration, it will either default to a quarter note or use the duration of the note preceding it.

Rests are indicated by using the letter r instead of a pitch. Dotted notes are formed simply by following the duration number with a period (c4.).

Tuplets are indicated using the \times command, for example \times 2/3 {c8 c c} gives a triplet of three eight-notes (quavers).

 <score>
   \relative c''{b1 b2 b4 b8 c r4 b4. r8 \times 2/3 {a8 g f}}
 </score>
 

Setting the time signature

muuda

The default time signature is 4/4. To set another time signature, one may use the \time command. For example to set the time signature to cut-time one would use \time 2/2 and waltz time would be \time 3/4. The time signature may be changed at almost any point.

Removing the time signature

muuda

For some music examples, removing the time signature may be desirable; the code \remove "Time_signature_engraver" can be used in that case:

<score>
{
  \new Staff \with { \remove "Time_signature_engraver" }
  <d' fis' a'>2
}
</score>
 

Pick up measure

muuda

The code \partial 4 will create a pickup measure (anacrusis) of one quarter note, \partial 4*2 would create a pickup measure of two quarter notes, etc. See an example in the Adding Lyrics section of this article.

Customizing beams

muuda
 

The software occasionally combines beamed notes in places that are not desired or look awkward. To override the automatic beams, use \noBeam between the notes that would otherwise be beamed: g a b \noBeam g. To turn off beaming for many notes, use \autoBeamOff and then \autoBeamOn.

<score>
  \relative c'' {
     \time 3/4
     r4. g8 \noBeam a8 b8
  }
</score>
 

To manually beam notes, use square brackets inserting the first one after the first note to be beamed: a8 b[ c d e] f. This would beam the notes b, c, d, and e, but leave the first and last notes without beams.

 

Adding lyrics

muuda

You can add lyrics to the score using \addlyrics. See the LilyPond Manual for more information about how to align the lyrics to the score.

<score>
  \relative g' {
    \key g \major \time 3/4
    \partial 4 d
     e d g
     fis2 d4
     e d a'
     g2 d4
     d' b g
     fis e c'
     b g a
     g2 \fermata
     \bar "|."
   }
   \addlyrics {
     Good mor -- ning to you,
     Good mor -- ning to you,
     Good mor -- ning dear chil -- dren,
     Good mor -- ning to all.
   }
  </score>
 

Adding chord names

muuda

Chord names can be added as a separate ChordNames staff as follows:

<score>
<<
  \new ChordNames \chordmode {
    \set chordChanges = ##t % Only display chord when there is a change (e.g., don't repeat the Am here)
    a4:m a4:m         |% measure 1 - A7 would be a:7
    g2                |% measure 2
  }
  \new Staff \relative c''{
    \key a \dorian
    \time 2/4
    a8 a16 a a8 a16 a |% measure 1
    b8 a g4           |% measure 2
  }
>>
</score>
 

Note:

The letter s can be used in the ChordNames staff in place of r (the code for a rest) when there is no chord.

An r will result in an explicit "No Chord" notation

 

, whereas the s will result in correct spacing, but no chord name notation will appear.

Accents and other symbols

muuda

There are a number of symbols to attach to notes, such as \fermata. There are also {e-> f-- g-+ a-. b-^ c-_ d-|}

<score>
  \relative c' {
  e-> f-- g-+ a-.
  b-^ c-_ d-| e\fermata
  }
</score>

producing

Unable to compile LilyPond input file:

line 4 - column 13:
syntax error, unexpected MUSIC_IDENTIFIER
--------
line 2 - column 3:
errors found, ignoring music expression

MIDI instruments

muuda

MIDI instrument sounds can be assigned with \set Staff.midiInstrument = #"instrument" as documented in section 3.5.2 of LilyPond's Notation Reference. Trial and error may be necessary: some instruments may not work unless the # is omitted, and some may not work with or without the #. Mall:Markupv Mall:Markupv

Muusikanäited

muuda

Unable to compile LilyPond input file:

line 25 - column 1:
not a note name: voiceone
--------
line 25 - column 10:
syntax error, unexpected '=', expecting '}'
--------
line 84 - column 33:
unknown escaped string: `\voiceone'
--------
line 84 - column 33:
string outside of text script or \lyricmode
--------
line 102 - column 1:
syntax error, unexpected '}'


Elemendi nähtamatuks/nähtavaks muutmine

muuda
 


Elemendi värvimine

muuda
 

Sulud

muuda
 
 
 

Beethoven 7. sümfoonia, II osa

muuda

Unable to convert ABC file to LilyPond format:

+ /usr/bin/abc2ly -s -o file.ly file.abc
/usr/bin/abc2ly from LilyPond 2.22.0
Parsing `file.abc'...
Line ... [100][200][300][400][500][600][700][800][900][1000][1100][1200][1300][1400][1500][1600][1700][1800][1900][2000][2100][2200][2300][2400][2500][2600][2700][2800][2900]lilypond output to: `file.ly'...Traceback (most recent call last):
  File "/usr/bin/abc2ly", line 1556, in <module>
    dump_voices(outf)
  File "/usr/bin/abc2ly", line 315, in dump_voices
    if repeat_state[voice_idx_dict[k]]:
IndexError: list index out of range

Motett

muuda

Unable to convert ABC file to LilyPond format:

+ /usr/bin/abc2ly -s -o file.ly file.abc
/usr/bin/abc2ly from LilyPond 2.22.0
Parsing `file.abc'...
Line ... file.abc: 22: Huh?  Don't understand

See also

muuda

Mall:Wikisourcehas

  1. Article Lilypond sur Wikipédia.
  2. Article "Music markup" sur Wikimédia (en français).
  3. Article "Music markup" sur Wikimédia (en anglais).