This is an archive copy of wikilivres.ca as of 18 February 2017 (from the WikiTeam dump). The original site is closed.
Wikilivres:Lilypond: Difference between revisions
imported>Dmitrismirnov |
imported>Dmitrismirnov |
||
| Line 198: | Line 198: | ||
Syntax Description | ==Example — Syntax — Description == | ||
<lilypond>1 2 8 16</lilypond> <nowiki> 1 2 8 16 | <lilypond> 1 2 8 16 </lilypond> <nowiki> 1 2 8 16 </nowiki> durations | ||
<lilypond>c4. c4..</lilypond> <nowiki> c4. c4.. </nowiki> augmentation dots | <lilypond> c4. c4.. </lilypond> <nowiki> c4. c4.. </nowiki> augmentation dots | ||
<lilypond>c d e f g a b</lilypond> <nowiki>c d e f g a b </nowiki> scale | <lilypond>c d e f g a b </lilypond> <nowiki>c d e f g a b </nowiki> scale | ||
<lilypond>fis bes</lilypond> <nowiki>fis bes</nowiki> alteration | <lilypond> fis bes </lilypond> <nowiki> fis bes </nowiki> alteration | ||
<lilypond>\clef treble \clef bass</lilypond> <nowiki>\clef treble \</nowiki> clef bassclefs | <lilypond> \clef treble \clef bass </lilypond> <nowiki> \clef treble \ </nowiki> clef bassclefs | ||
<lilypond>\time 3/4 \time 4/4</lilypond> <nowiki>\time 3/4 \time 4/4</nowiki> time signature | <lilypond> \time 3/4 \time 4/4 </lilypond> <nowiki> \time 3/4 \time 4/4 </nowiki> time signature | ||
<lilypond>r4 r8</lilypond> <nowiki>r4 r8</nowiki> rest | <lilypond> r4 r8 </lilypond> <nowiki> r4 r8 </nowiki> rest | ||
<lilypond>d ~ d</lilypond> <nowiki>d ~ d</nowiki> tie | <lilypond> d ~ d </lilypond> <nowiki> d ~ d </nowiki> tie | ||
<lilypond>\key es \major</lilypond> <nowiki>\key es \</nowiki>majorkey signature | <lilypond> \key es \major </lilypond> <nowiki>\key es \</nowiki>majorkey signature | ||
<lilypond>note'</lilypond> <nowiki>note'</nowiki> raise octave | <lilypond> note' </lilypond> <nowiki> note' </nowiki> raise octave | ||
| Line 267: | Line 267: | ||
a8[ b] beam | <lilypond> a8[ b] </lilypond> <nowiki> a8[ b] </nowiki> beam | ||
<< \new Staff ... >> more staves | <lilypond> << \new Staff ... >> </lilypond> << \new Staff ... >> <nowiki> </nowiki> more staves | ||
c-> c-. articulations | <lilypond> c-> c-. </lilypond> <nowiki> c-> c-. </nowiki> articulations | ||
c\mf c\sfz dynamics | <lilypond> c\mf c\sfz </lilypond> <nowiki> c\mf c\sfz </nowiki> dynamics | ||
a\< a a\! crescendo | <lilypond> a\< a a\! </lilypond> <nowiki> a\< a a\! </nowiki> crescendo | ||
a\> a a\! decrescendo | <lilypond> a\> a a\! </lilypond> <nowiki> a\> a a\! </nowiki> decrescendo | ||
< > chord | <lilypond> < > </lilypond> <nowiki> < > </nowiki> chord | ||
\partial 8 upstep | <lilypond> \partial 8 </lilypond> <nowiki> \partial 8 </nowiki> upstep | ||
\times 2/3 {f g a} triplets | <lilypond> \times 2/3 {f g a} </lilypond> \times 2/3 {f g a} <nowiki> </nowiki> triplets | ||
\grace grace notes | <lilypond> \grace </lilypond> <nowiki> \grace </nowiki> grace notes | ||
\lyricmode { twinkle } entering lyrics twinkle | <lilypond> \lyricmode { twinkle } </lilypond> \lyricmode <nowiki> </nowiki> entering lyrics twinkle | ||
\new Lyrics printing lyrics | <lilypond> \new Lyrics </lilypond> <nowiki> \new Lyrics </nowiki> printing lyrics | ||
twin -- kle lyric hyphen | <lilypond> twin -- kle </lilypond> <nowiki> twin -- kle lyric </nowiki> hyphen | ||
\chordmode { c:dim f:maj7 } chords | <lilypond> \chordmode { c:dim f:maj7 } </lilypond> \chordmode <nowiki> </nowiki> chords | ||
\context ChordNames printing chord names | <lilypond> \context ChordNames </lilypond> <nowiki> \context ChordNames </nowiki> printing chord names | ||
<<{e f} \\ {c d}>> polyphony | <lilypond> <<{e f} \\ {c d}>> </lilypond> <nowiki> <<{e f} \\ {c d}>> </nowiki> polyphony | ||
s4 s8 s16 | <lilypond> s4 s8 s16 </lilypond> <nowiki> s4 s8 s16 </nowiki> rests spacer | ||
Revision as of 15:20, 6 November 2007
(English) Lilypond is installed on Wikilivres. See the documentation. See also a list of Music sheets.
(Français) Lilypond est installé sur Wikilives. Voir la documentation. Voir aussi une liste de Partitions.
Example 1
<lilypond>f, d f a d f e d cis a cis e a g f e</lilypond>
Example 2
<lilypond> \relative c' { e16-.->a(b gis)a-.->c(d b)c-.->e(f dis)e-.->a(b a) gis(b e)e,(gis b)b,(e gis)gis,(b e)e,(gis? b e) } </lilypond>
Example 3
<lilybook> \version "2.10.29"
\header {
title = "Mary Had a Little Lamb" tagline = ""
}
\paper {
ragged-right = ##t ragged-bottom = ##t indent = 0\mm
}
melody = \relative c' {
e d c d | e e e e | d d e d | c1 |
}
text = \lyricmode { \set stanza = "1." Ma- ry had a lit- tle lamb,
its fleece was white as snow.
}
\book{
\score{ <<
\new Voice = "one" { \melody }
\new Lyrics \lyricsto "one" \text
>>
\layout { }
\midi { }
}
\markup{
\wordwrap-string #"
Verse 2.
All the children laughed and played,
To see a lamb at school."
}
} </lilybook>
Example 4
<lilybook> \new Pianostaff
<< \new Staff { \time 2/2 \clef violin \key cis \minor \tempo 4=120 \relative c \context Staff << \new Voice { \voiceOne r4 cis8 dis e4 fis gis8 fis gis a gis fis e gis fis e fis gis fis e dis fis e dis e fis e d cis e d cis d e d cis b d cis b cis d cis b a cis b a b cis b a gis b a2 r cis2. } \new Voice { \voiceTwo e,8 gis a b cis dis bis cis dis4 r r2 r1 r1 r4 fis, b b b a8 gis a2 gis1~ gis8 gis fis eis fis2 gis2. } \new Voice { \voiceThree \stemDown s1 s s s s2. fis4 eis2 fis } >> } \new Staff { \clef bass \time 2/2 \key cis \minor \relative c' \context Staff << \new Voice { \voiceOne s1 r4 gis cis cis cis bis8 ais bis2 cis1 b2. s4 s1 b2 cis~ cis~ cis8 cis b a gis2. } \new Voice { \voiceTwo \stemUp cis,1 bis2 e dis1 \stemDown cis4 e a a a gis8 fis gis2~ \stemUp gis fis gis1 a2 fis~ fis8 fis e dis e4 } \new Voice { \voiceThree \stemDown cis4 b a2 gis4 r4 g2\rest e1\rest e1\rest e1\rest r4 cis' fis fis fis eis8 dis eis2 fis r r } >> } >> </lilybook>
Example 5
<lilybook> %!lilypond firebreathers.ly -*- coding: utf-8; -*- %% Theme to "Fire Breathers", a homebrew NES game perpetually %% under development. Composed by Urpo Lankinen.
%% Note: The composer has made this source code available %% to Wikipedia under the GFDL license. Other versions outside %% Wikipedia are typically under CC BY-SA license.
%% This file uses Finnish note names (for example, where %% Americans use "F#" and "Bb", Finns use "Fis" and "B"). %% Dutch note names are used by default. %\include "suomi.ly"
%% Optional language upgrade helper. \version "2.10.29"
%% The header block defines the titles and texts. \header {
title = "Theme to ``Fire Breathers!" instrument = "For the 2A03 or SID" composer = "Urpo Lankinen" enteredby = "Urpo Lankinen" updatedby = "Jan Nieuwenhuizen" date = "June 2005"
}
Melody = \relative c {
\clef treble \time 3/4 \key a \minor
%% The piece starts with a quarter-note partial bar, "\partial 4" %% tells so to LilyPond. \partial 4 a4 | e'4.( d8[ c]) r8 | d4.( c8[ b]) r8 | a2. | e2 a4 | e'4.( d8[ c]) r8 | d4.( e8[ f]) r8 | e2. | r2 e4 | f4.( e8[ d]) r8 | d4.( c8[ b]) r8 | a2. | e2 a4 | e'4.( d8[ c]) r8 | d4.( c8[ b]) r8 | a2. ~ a2 r4 | \bar "|."
}
%% This is the second voice. SecondVoice = \relative c {
\clef bass \time 3/4 \key a \minor
\partial 4
r4 | e2. | d2. | a2. | e2
a4 | e'2. | d2 f4 | e2. | r2.
| f2. | d2. | a2. | e2
a4 | e'2. | d2 b4 | a2. ~ a2 r4 | \bar "|."
}
%% Melodies, lyrics and chords can be assigned to a variable and then
%% be *reused* elsewhere. Here are three different accompaniment
%% patterns, which are used throughout the accompaniment melody.
AccompA = \relative c { a4 e'8 a, e' a, | }
AccompB = \relative c { g4 d'8 g, d' g, | }
AccompC = \relative c { e,4 b'8 e, b' e, | }
Accompaniment = {
\clef bass \time 3/4 \key a \minor
\partial 4
r4 | \AccompA \AccompB \AccompA \AccompA
\AccompA \AccompB \AccompA \AccompA
\AccompC \AccompC \AccompA \AccompA
\AccompA \AccompB \AccompA | a2 r4 | \bar "|."
}
%% The top level music definition. <<
\new Staff \Melody \new Staff \Accompaniment \new Staff \SecondVoice
>> </lilybook>
Example — Syntax — Description
<lilypond> 1 2 8 16 </lilypond> 1 2 8 16 durations
<lilypond> c4. c4.. </lilypond> c4. c4.. augmentation dots
<lilypond>c d e f g a b </lilypond> c d e f g a b scale
<lilypond> fis bes </lilypond> fis bes alteration
<lilypond> \clef treble \clef bass </lilypond> \clef treble \ clef bassclefs
<lilypond> \time 3/4 \time 4/4 </lilypond> \time 3/4 \time 4/4 time signature
<lilypond> r4 r8 </lilypond> r4 r8 rest
<lilypond> d ~ d </lilypond> d ~ d tie
<lilypond> \key es \major </lilypond> \key es \majorkey signature
<lilypond> note' </lilypond> note' raise octave
<lilypond> note, </lilypond> note, lower octave
<lilypond> c( d e) </lilypond> c( d e) slur
<lilypond> c\( c( d) e\) </lilypond> c\( c( d) e\) phrasing slur
<lilypond> a8[ b] </lilypond> a8[ b] beam
<lilypond> << \new Staff ... >> </lilypond> << \new Staff ... >> more staves
<lilypond> c-> c-. </lilypond> c-> c-. articulations
<lilypond> c\mf c\sfz </lilypond> c\mf c\sfz dynamics
<lilypond> a\< a a\! </lilypond> a\< a a\! crescendo
<lilypond> a\> a a\! </lilypond> a\> a a\! decrescendo
<lilypond> < > </lilypond> < > chord
<lilypond> \partial 8 </lilypond> \partial 8 upstep
<lilypond> \times 2/3 {f g a} </lilypond> \times 2/3 {f g a} triplets
<lilypond> \grace </lilypond> \grace grace notes
<lilypond> \lyricmode { twinkle } </lilypond> \lyricmode entering lyrics twinkle
<lilypond> \new Lyrics </lilypond> \new Lyrics printing lyrics
<lilypond> twin -- kle </lilypond> twin -- kle lyric hyphen
<lilypond> \chordmode { c:dim f:maj7 } </lilypond> \chordmode chords
<lilypond> \context ChordNames </lilypond> \context ChordNames printing chord names
<lilypond> <<{e f} \\ {c d}>> </lilypond> <<{e f} \\ {c d}>> polyphony
<lilypond> s4 s8 s16 </lilypond> s4 s8 s16 rests spacer