Muusika kompositsiooniõpetus/LIIVAKAST

Allikas: Vikiõpikud
Jump to navigation Jump to search

Siin saab katsetada notatsioonitarkvara sobivust viki-tarkvaraga:

Sisukord

Lily Pond[muuda]

Noodijoonestik[muuda]


\new StaffGroup <<
  \new Staff \relative { c''2 c | c2 c }
  \new StaffGroup <<
    \new Staff \relative { g'2 g | g2 g }
    \new StaffGroup \with {
      systemStartDelimiter = #'SystemStartSquare
    }
    <<
      \new Staff \relative { e'2 e | e2 e }
      \new Staff \relative { c'2 c | c2 c }
    >>
  >>
>>

\new StaffGroup
\relative c'' <<
  \set StaffGroup.systemStartDelimiterHierarchy
    = #'(SystemStartSquare (SystemStartBrace (SystemStartBracket a (SystemStartSquare b)  ) c ) d)
  \new Staff { c1 | c1 }
  \new Staff { c1 }
  \new Staff { c1 }
  \new Staff { c1 }
  \new Staff { c1 }
>>

Helivältus[muuda]


\relative c'' {
  \time 4/2
  c\breve |
  \override Staff.NoteHead.style = #'altdefault
  b\breve
  \override Staff.NoteHead.style = #'baroque
  b\breve
  \revert Staff.NoteHead.style
  a\breve
}

\relative {
  \time 8/1
  c'\longa c\breve c1 c2
  c4 c8 c16 c32 c64 c128 c128
}

\relative {
  \time 8/1
  \autoBeamOff
  c''\longa c\breve c1 c2
  c4 c8 c16 c32 c64 c128 c128
}

\relative { a' a a2 a a4 a a1 a }

Punktiga vältused[muuda]


\relative { a'4 b c4. b8 a4. b4.. c8. }

\relative c' {
  c4.. a16 r2 |
  \override Dots.dot-count = #4
  c4.. a16 r2 |
  \override Dots.dot-count = #0
  c4.. a16 r2 |
  \revert Dots.dot-count
  c4.. a16 r2 |
}

Tupletid[muuda]

Unable to compile LilyPond input file:
Processing `.../file.ly'
Parsing...
.../file.ly:14:24: error: syntax error, unexpected UNSIGNED
  a'2 \tuplet 3/2 { b4 
                       4 4 }
.../file.ly:13:1: error: errors found, ignoring music expression

\relative {
fatal error: failed files: ".../file.ly"

exited with status: 1

\relative {
  g'2 r8 \tuplet 3/2 8 { cis16 d e e f g g f e }
}

\relative {
  \tupletUp \tuplet 3/2 { c''8 d e }
  \tupletNeutral \tuplet 3/2 { c8 d e }
  \tupletDown \tuplet 3/2 { f,8 g a }
  \tupletNeutral \tuplet 3/2 { f8 g a }
}

\relative {
  \autoBeamOff
  c''4 \tuplet 5/4 { f8 e f \tuplet 3/2 { e[ f g] } } f4
}

\relative c' {
  \time 2/4
  \tupletSpan 4
  \tuplet 3/2 { c8^"\\tupletSpan 4" c c c c c }
  \tupletSpan \default
  \tuplet 3/2 { c8^"\\tupletSpan \\default" c c c c c }
  \tuplet 3/2 4 { c8^"\\tuplet 3/2 4 {...}" c c c c c }
}



\layout {
  \context {
    \Voice
    % Permit line breaks within tuplets
    \remove "Forbid_line_break_engraver"
    % Allow beams to be broken at line breaks
    \override Beam.breakable = ##t
  }
}
\relative c'' {
  a8
  \repeat unfold 5 { \tuplet 3/2 { c[ b a] } }
  % Insert a manual line break within a tuplet
  \tuplet 3/2 { c[ b \bar "" \break a] }
  \repeat unfold 5 { \tuplet 3/2 { c[ b a] } }
  c8
}

Helivältuste skaleerimine[muuda]


\relative {
  \time 2/4
  % Alter durations to triplets
  a'4*2/3 gis a
  % Normal durations
  a4 a
  % Double the duration of chord
  <a d>4*2
  % Duration of quarter, appears like sixteenth
  b16*4 c4
}

\relative {
  \time 2/4
  % Normal durations
  <c'' a>4 c8 a
  % Scale music by *2/3
  \scaleDurations 2/3 {
    <c a f>4. c8 a f
  }
  % Scale music by *2
  \scaleDurations 2/1 {
    <c' a>4 c8 b
  }
}


Sidekaar[muuda]


\relative {
  \repeat volta 2 { c'' g <c e>2~ }
  \alternative {
    % First alternative: following note is tied normally
    { <c e>2. r4 }
    % Second alternative: following note has a repeated tie
    { <c e>2\repeatTie d4 c }
  }
}



\relative c' {
  <c e g>2~ <c e g>
  \override TieColumn.tie-configuration =
    #'((0.0 . 1) (-2.0 . 1) (-4.0 . 1))
  <c e g>2~ <c e g>
}

Sidekaar võtmemärkide vahetusega[muuda]


\relative {
  \override Tie.layer = #-2
  \override Staff.TimeSignature.layer = #-1
  \override Staff.KeySignature.layer = #-1
  \override Staff.TimeSignature.whiteout = ##t
  \override Staff.KeySignature.whiteout = ##t
  b'2 b~
  \time 3/4
  \key a \major
  b r4
}

Laissez vibrer[muuda]


<c' f' g'>1\laissezVibrer


Arpedžo[muuda]


\relative c' {
  \set tieWaitForNote = ##t
  \grace { c16[ ~ e ~ g] ~ } <c, e g>2
  \repeat tremolo 8 { c32 ~ c' ~ } <c c,>1
  e8 ~ c ~ a ~ f ~ <e' c a f>2
  \tieUp
  c8 ~ a
  \tieDown
  \tieDotted
  g8 ~ c g2
}


Tremolo[muuda]

Unable to compile LilyPond input file:
Processing `.../file.ly'
Parsing...
.../file.ly:15:8: error: syntax error, unexpected UNSIGNED
  sn16 
       8 16 8 8:32 ~
.../file.ly:13:1: error: errors found, ignoring music expression

\drums {
fatal error: failed files: ".../file.ly"

exited with status: 1

Helikõrgus[muuda]


\relative c' { f d f a d f e d cis a cis e a g f e }



  \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 "|."
  }

 \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 "|."
  }

Helikõrgus koos vältuste ja tekstiga[muuda]

\relative c'' { \time 4/4 \key c \major 
c4 g8 g a4 g r b^> c^> r \bar "|." } 
\addlyrics { Shave and a hair -- cut: two bits. }

Ambitus[muuda]


\new Staff <<
  \new Voice \with {
    \consists "Ambitus_engraver"
  } \relative c'' {
    \override Ambitus.X-offset = #2.0
    \voiceOne
    c4 a d e
    f1
  }
  \new Voice \with {
    \consists "Ambitus_engraver"
  } \relative c' {
    \voiceTwo
    es4 f g as
    b1
  }
 >>

Võtmed[muuda]

\clef treble
\clef bass
\clef alto
\clef tenor

Heliredel[muuda]


X:1
M:C
L:1/4
K:C
C, D, E, F,|G, A, B, C|D E F G|A B c d|
e f g a|b c' d' e'|f' g' a' b'|]


Klaver[muuda]


\new PianoStaff <<
  \new Staff = "up" {
    <e' c'>8
    \change Staff = "down"
    g8 fis g
    \change Staff = "up"
    <g'' c''>8
    \change Staff = "down"
    e8 dis e
    \change Staff = "up"
  }
  \new Staff = "down" {
    \clef bass
    % keep staff alive
    s1
  }
>>

\new PianoStaff <<
  \new Staff = "up" {
    \voiceOne
    % Make space for fingering in the cross-staff voice
    \once\override DynamicLineSpanner.staff-padding = #4
    e''2\p\< d''\>
    c''1\!
  }
  \new Staff = "down" <<
    {
      \clef bass
      s4. e,8\rest g,2\rest
      c1
    } \\ {
      c8\( g c'
      \change Staff = "up"
      e' g' b'-3 a' g'\)
      f'1
    }
  >>
>>

\layout {
  \context {
    \PianoStaff
    \consists #Span_stem_engraver
  }
}

{
  \new PianoStaff <<
    \new Staff {
      <b d'>4 r d'16\> e'8. g8 r\!
      e'8 f' g'4 e'2
    }
    \new Staff {
      \clef bass
      \voiceOne
      \autoBeamOff
      \crossStaff { <e g>4 e, g16 a8. c8} d
      \autoBeamOn
      g8 f g4 c2
    }
  >>
}



\new PianoStaff <<
  \new Staff = "one" {
    \showStaffSwitch
    c'1
    \change Staff = "two"
    b2 a
  }
  \new Staff = "two" {
    \clef bass
    s1*2
  }
>>
Unable to compile LilyPond input file:
Processing `.../file.ly'
Parsing...
.../file.ly:13:1: error: unrecognized string, not in text script or \lyricmode

music = {
.../file.ly:13:7: error: syntax error, unexpected '='
music 
      = {
.../file.ly:18:16: error: unknown escaped string: `\music'
\autochange d' 
               \music
Interpreting music...
.../file.ly:19:1: error: syntax error, unexpected MUSIC_FUNCTION

\autochange b \with { \clef soprano } \music
Interpreting music...
.../file.ly:19:15: error: syntax error, unexpected \with
\autochange b 
              \with { \clef soprano } \music
.../file.ly:19:39: error: unknown escaped string: `\music'
\autochange b \with { \clef soprano } 
                                      \music
.../file.ly:20:1: error: syntax error, unexpected MUSIC_FUNCTION

\autochange d' \with { \clef alto } \with { \clef tenor } \music
Interpreting music...
.../file.ly:20:16: error: syntax error, unexpected \with
\autochange d' 
               \with { \clef alto } \with { \clef tenor } \music
.../file.ly:20:37: error: syntax error, unexpected \with
\autochange d' \with { \clef alto } 
                                    \with { \clef tenor } \music
.../file.ly:20:59: error: unknown escaped string: `\music'
\autochange d' \with { \clef alto } \with { \clef tenor } 
                                                          \music
.../file.ly:22:9: error: syntax error, unexpected \layout
	
        \layout { }
.../file.ly:26:1: error: syntax error, unexpected '}'

}
fatal error: failed files: ".../file.ly"

exited with status: 1

\new PianoStaff <<
  \set PianoStaff.connectArpeggios = ##t
  \override PianoStaff.Arpeggio.stencil = #ly:arpeggio::brew-chord-bracket
  \new Staff {
    \relative c' {
      \key b \major
      \time 6/8
      b8-.(\arpeggio fis'-.\> cis-. e-. gis-. b-.)\!\fermata^\laissezVibrer
      \bar "||"
    }
  }
  \new Staff {
    \relative c' {
      \clef bass
      \key b \major
      <<
        {
          <a e cis>2.\arpeggio
        }
        \\
        {
          <a, e a,>2.
        }
      >>
    }
  }
>>

Noteerimine löökpillidele[muuda]

Unable to compile LilyPond input file:
Processing `.../file.ly'
Parsing...
.../file.ly:13:1: error: unrecognized string, not in text script or \lyricmode

up = \drummode {
.../file.ly:13:4: error: syntax error, unexpected '='
up 
   = \drummode {
.../file.ly:20:30: error: syntax error, unexpected NUMBER_IDENTIFIER
  \new DrumVoice { \voiceOne 
                             \up }
.../file.ly:19:1: error: errors found, ignoring music expression

\new DrumStaff <<
.../file.ly:28:1: error: syntax error, unexpected '}'

}
fatal error: failed files: ".../file.ly"

exited with status: 1

\drums {
  hihat4 hh bassdrum bd
}
Unable to compile LilyPond input file:
Processing `.../file.ly'
Parsing...
.../file.ly:14:26: error: syntax error, unexpected UNSIGNED
  \clef percussion { bd4 
                         4 4 4 }
.../file.ly:15:22: error: syntax error, unexpected UNSIGNED
  \clef treble { hh4 
                     4 4 4 }
.../file.ly:13:1: error: errors found, ignoring music expression

\drums {
fatal error: failed files: ".../file.ly"

exited with status: 1

\new DrumStaff <<
  \drummode {
    bd4 sn4 bd4 sn4
    << {
      \repeat unfold 16 hh16
    } \\ {
      bd4 sn4 bd4 sn4
    } >>
  }
>>
Unable to compile LilyPond input file:
Processing `.../file.ly'
Parsing...
.../file.ly:13:1: error: syntax error, unexpected SCM_TOKEN, expecting \header

#(define mydrums '(
.../file.ly:33:1: error: syntax error, unexpected '}'

}
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `file.ps'...
Converting to PNG...
fatal error: failed files: ".../file.ly"

exited with status: 1

Gregooriuse koraal[muuda]

Unable to compile LilyPond input file:
Processing `.../file.ly'
Parsing...
/usr/share/lilypond/2.18.2/ly/gregorian.ly:14:1: error: unrecognized string, not in text script or \lyricmode

IJ = \lyricmode { IJ }
/usr/share/lilypond/2.18.2/ly/gregorian.ly:14:4: error: syntax error, unexpected '='
IJ 
   = \lyricmode { IJ }
.../file.ly:35:1: error: syntax error, unexpected '}'

}
fatal error: failed files: ".../file.ly"

exited with status: 1


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 :

 { c'1 }


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 :



{
\clef treble

c'1

\bar "|."
}


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 :


{
\clef treble
a'1
\bar "|."
}


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


{
\clef bass
\key g \major 
\time 3/4

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

\bar "|."
}



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>

{
\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 "|."
}



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>

{
\clef bass
c4-5 a-3 f-1 c'-5
r1
\bar "|."
}



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>

{
\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 "|."
}


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

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

{
\clef bass
\stemDown
g8\(^"Hampes vers le bas" a b[ c' b\) a] g4
\bar "|."
}


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


{
\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 "|."
}



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


\new RhythmicStaff {
\time 4/4

% juste pour les hampes vers le bas
\stemDown

c4 e8 f g2
r4 g g f
g1
\bar "|."
}


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


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

c4 d e d c4

\bar "|."
}



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


{
\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
}



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


{
\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 "|."
}



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


{
\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 }
}

}



Répétitions de motifs[muuda]

Source

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


Mall:Colonnes


Résultat


{
\clef treble

\repeat unfold 9 {c'8 d' e' g' a' }
\repeat unfold 9 {c'8[ d' e' g' a'] }
c'

\bar "|."
}



Répétitions de sections[muuda]

Source

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


Mall:Colonnes


Résultat


{
\clef bass

\repeat volta 2 { c4 d e f }
c2 d
\repeat volta 2 { d4 e f g }

\repeat volta 2 { c4 d e f | }
\alternative {
  { c2 e | }
  { f2 g | }
}
c1

}

{
\clef bass

\partial 4 % required
\repeat volta 4 {
  e4 |
  c2 e |
  % no \partial here
  g4 g g  % no bar check here
}
% no \partial here
g4 |
a2 a |
g1 |

}



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


  \new TabStaff {
    \tabFullNotation
  \time 3/4
  c4-.^"Allegro" d( e)
  f4-.\f g a^\fermata
  \mark \default
  c8_.\<\( c16 c ~ c2\!
  c'2.\prall\)
  }



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


{
\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 "|."
}



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


{
\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 "|."
}


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


{
\clef treble
\chordmode { c2 g f g c1 }
\bar "|."
}



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>

{
\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 "|."
}



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


{
\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 "|."
}



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


{
\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 "|."
}



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


{
\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 "|."
}



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


\relative c'' {
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
}



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


{
c'4^\markup { \null \raise #2 { \number 1 } }
}




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


{
\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 "|."
}


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>

{
\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 "|."
}


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>



{
\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 "|."
}


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


{
\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 "|."
}



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


{
\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 "|."
}



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


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
    }
  >>
}


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


{c' d' e' f' f' fes' eis' e'}


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


  \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 "|."
  }
% This is just a comment line

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

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

or

\new Staff \with { \remove "Time_signature_engraver" }{\clef bass c}

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

\new Staff \with { \remove "Time_signature_engraver" }{ 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,, c, e, a, c e a c' %Middle C
  e' a' c'' e'' a'' c''' e''' g''' \bar "||" aes'' bes'' gis'' dis''}

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>

 \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 "|."
  }

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>

 \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
  }

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>

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

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>
{ \new Staff \with { \remove "Time_signature_engraver" } <d' fis' a'>2 }

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]


\relative c'' {
   \time 3/4
   r4. g8 a8 b8
}

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>

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

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.

 \relative c''{a8 b[ c d e] f}

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>

  \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.
   }

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>

<<
\new ChordNames \chordmode {
  \set chordChanges = ##t
  a4:m a4:m         |% measure 1
  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
}
>>

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

<<\new ChordNames \chordmode {r2} \new Staff \with { \remove "Time_signature_engraver" } \relative c''{c}>>

, 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:
Processing `.../file.ly'
Parsing...
.../file.ly:15:13: error: syntax error, unexpected MUSIC_IDENTIFIER
  b-^ c-_ d-
            | e\fermata
.../file.ly:13:3: error: errors found, ignoring music expression
  
  \relative c' {
fatal error: failed files: ".../file.ly"

exited with status: 1

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:
Processing `.../file.ly'
Parsing...
.../file.ly:36:1: error: unrecognized string, not in text script or \lyricmode

voiceone =
.../file.ly:36:10: error: syntax error, unexpected '='
voiceone 
         =
.../file.ly:95:33: error: unknown escaped string: `\voiceone'
      \context Staff = "one" << 
                                \voiceone >>
.../file.ly:95:33: error: unrecognized string, not in text script or \lyricmode
      \context Staff = "one" << 
                                \voiceone >>
.../file.ly:112:1: error: syntax error, unexpected '}'

}
fatal error: failed files: ".../file.ly"

exited with status: 1


Elemendi nähtamatuks/nähtavaks muutmine[muuda]


{
c4 d
\hideNotes
e4 f
\unHideNotes
g a
\hideNotes
b
\unHideNotes
c
}


Elemendi värvimine[muuda]


{
\override NoteHead.color = #red
c4 c
\override NoteHead.color = #(x11-color 'LimeGreen)
d
\override Stem.color = #blue
e
}

Sulud[muuda]


{
c2 \parenthesize d
c2 \parenthesize <c e g>
c2 <c \parenthesize e g>
}

ABC[muuda]


X:1
T:The Legacy Jig
M:6/8
L:1/8
R:jig
K:G
GFG BAB | gfg gab | GFG BAB | d2A AFD |
GFG BAB | gfg gab | age edB |1 dBA AFD :|2 dBA ABd |:
efe edB | dBA ABd | efe edB | gdB ABd |
efe edB | d2d def | gfe edB |1 dBA ABd :|2 dBA AFD |]

X:1
T:Speed the Plough
M:4/4
C:Trad.
K:G
|:GABc dedB|dedB dedB|c2ec B2dB|c2A2 A2BA|
  GABc dedB|dedB dedB|c2ec B2dB|A2F2 G4:|
|:g2gf gdBd|g2f2 e2d2|c2ec B2dB|c2A2 A2df|
  g2gf g2Bd|g2f2 e2d2|c2ec B2dB|A2F2 G4:|

Beethoven 7. sümfoonia, II osa[muuda]

Unable to convert ABC file to LilyPond format:
/usr/bin/abc2ly from LilyPond 2.18.2
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 1466, in <module>
    dump_voices (outf)
  File "/usr/bin/abc2ly", line 283, 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 from LilyPond 2.18.2
Parsing `.../file.abc'...
Line ... .../file.abc: 22: Huh?  Don't understand

See also[muuda]

Mall:Wikisourcehas

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