Next: Lilypond-book templates, Previous: Jazz combo, Up: Example templates
This template displays all available headers. Some of them are only used in the Mutopia project; they don't affect the printed output at all. They are used if you want the piece to be listed with different information in the Mutopia database than you wish to have printed on the music. For example, Mutopia lists the composer of the famous D major violin concerto as TchaikovskyPI, whereas perhaps you wish to print "Petr Tchaikowski" on your music.
The `linewidth' is for \header.
\version "2.6.0" \header { dedication = "dedication" title = "Title" subtitle = "Subtitle" subsubtitle = "Subsubtitle" composer = "Composer (xxxx-yyyy)" opus = "Opus 0" piece = "Piece I" meter = "meter" instrument = "Instrument" arranger = "Arranger" poet = "Poet" texttranslator = "Translator" copyright = "public domain" % These are headers used by the Mutopia Project % http://www.mutopiaproject.org/ mutopiatitle = "" mutopiacomposer = "" mutopiapoet = "" mutopiainstrument = "" date = "composer's dates" source = "urtext " maintainer = "your name here" maintainerEmail = "your email here" maintainerWeb = "your home page" lastupdated = "2004/Aug/26" } \score { { c'4 } \header { piece = "piece1" opus = "opus1" } } \score { { c'4 } \header { piece = "piece2" opus = "opus2" } }
This example demonstrates how to do modern transcriptions of Gregorian music. Gregorian music has no measure, no stems; it uses only half and quarter notes, and two types of barlines, a short one indicating a rest, and a second one indicating a breath mark.
barOne = { \once \override Staff.BarLine #'bar-size = #2 \bar "|" } barTwo = { \once \override Staff.BarLine #'extra-offset = #'(0 . 2) \once \override Staff.BarLine #'bar-size = #2 \bar "|" } chant = \relative c' { \set Score.timing = ##f \override Staff.Stem #'transparent = ##t f4 a2 \barTwo g4 a2 f2 \barOne g4( f) f( g) a2 } \score { \chant \layout{ } \midi { \tempo 4=60 } }
Here is an example of bagpipe music. It demonstrates a big strength of
LilyPond, compared to graphical score editors: in LilyPond, you can
very easily reuse small segments of music without writing them out
completely. This template defines a large number of small segments
(taor
, grip
, thrd
, etc), which can be reused easily.
taor = { \grace { g32[ d' g e'] } } grip = { \grace { g32[ b g ] } } thrd = { \grace { g32[ d' c'] } } birl = { \grace { g32[ a g] } } gstd = { \grace { g'32[ d' g] } } fgg = { \grace { f32[ g'32] } } dblb = { \grace { g'32[ b d'] } } dblc = { \grace { g'32[ c' d'] } } dble = { \grace { g'32[ e' f'] } } dblf = { \grace { g'32[ f' g'] } } dblg = { \grace { g'32[ f'] } } dbla = { \grace { a'32[ g'] } } lgg = { \grace { g32 } } lag = { \grace { a32 } } cg = { \grace { c'32 } } eg = { \grace { e'32 } } gg = { \grace { g'32 } } dg = { \grace { d'32 } } hag = { \grace { a'32 } } gefg = { \grace { g'32[ e' f'] } } efg = { \grace { e'32[ f'] } } gdcg = { \grace { g'32[ d' c'] } } gcdg = { \grace { g'32[ c' d'] } } \transpose a a' { #(add-grace-property 'Voice 'Stem 'length 6) \time 6/8 \partial 4 \tieUp \slurUp f'4 | \gg f'4 e'8 \thrd d'4. | \eg a4.(a4) d'8 | \gg d'4 f'8 \dble e'4. ( | \noBreak e'8) d'4 \gg d'4 e'8 | \break \time 9/8 \dblf f'2.( f'4) d'8 | \time 6/8 \dblg g'4 a'8 \gg a'4. | \thrd d'4.( d'4) \eg a8 | \time 9/8 \dble e'4 \lag e'8 \gg e'16[ d'8. e'8] \gg f'4 g'8 | \break \time 6/8 \gg f'4 e'8 \thrd d'4. | \eg a4.( a4) d'8 | \dblg g'4 a'8 \gg a'4. | \thrd d'4.( d'4) f'8 | \break \dblg g'4 e'8( e'8) \dblf f'8.[ e'16] | \thrd d'4.( d'4) \cg d'8 | \gg c'4 e'8 \thrd d'4.( | d'4.) \gdcg d'4. }
This page is for LilyPond-2.6.3 (stable-branch).