]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/templates.itely
Avoid empty table in documentation of `Global' context.
[lilypond.git] / Documentation / user / templates.itely
index 3e7845709c03c1ebeafe8b6d1b28019b25d9ac16..3ccaabbd7e90a040da0e9003f9aaf45abc6263d1 100644 (file)
@@ -1,6 +1,14 @@
 @c -*- coding: utf-8; mode: texinfo; -*-
-@node Example templates
-@appendix Example templates
+@c This file is part of lilypond.tely
+@ignore
+    Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
+
+    When revising a translation, copy the HEAD committish of the
+    version that you are working on.  See TRANSLATION for details.
+@end ignore
+
+@node Templates
+@appendix Templates
 
 This section of the manual contains templates with the LilyPond score
 already set up for you.  Just add notes, run LilyPond, and enjoy
@@ -27,7 +35,7 @@ instrument or a melodic fragment.  Cut and paste this into a file,
 add notes, and you're finished!
 
 @lilypond[quote,verbatim,ragged-right]
-\version "2.9.13"
+\version "2.11.15"
 melody = \relative c' {
    \clef treble
    \key c \major
@@ -52,7 +60,7 @@ automatic beaming, you'll have to change or comment out the relevant
 line.
 
 @lilypond[quote,verbatim,ragged-right]
-\version "2.9.13"
+\version "2.11.15"
 melody = \relative c' {
    \clef treble
    \key c \major
@@ -83,7 +91,7 @@ text = \lyricmode {
 Want to prepare a lead sheet with a melody and chords?  Look no further!
 
 @lilypond[quote,verbatim,ragged-right]
-\version "2.9.13"
+\version "2.11.15"
 melody = \relative c' {
    \clef treble
    \key c \major
@@ -116,7 +124,7 @@ harmonies = \chordmode {
 This template allows you to prepare a song with melody, words, and chords.
 
 @lilypond[quote,verbatim,ragged-right]
-\version "2.9.13"
+\version "2.11.15"
 melody = \relative c' {
    \clef treble
    \key c \major
@@ -157,7 +165,7 @@ harmonies = \chordmode {
 Here is a simple piano staff.
 
 @lilypond[quote,verbatim,ragged-right]
-\version "2.9.13"
+\version "2.11.15"
 upper = \relative c'' {
    \clef treble
    \key c \major
@@ -191,7 +199,7 @@ Here is a typical song format: one staff with the melody and lyrics, with
 piano accompaniment underneath.
 
 @lilypond[quote,verbatim,ragged-right]
-\version "2.9.13"
+\version "2.11.15"
 melody = \relative c'' {
    \clef treble
    \key c \major
@@ -247,7 +255,7 @@ Instead of having a full staff for the melody and lyrics, you can place
 the lyrics between the piano staff (and omit the separate melody staff).
 
 @lilypond[quote,verbatim,ragged-right]
-\version "2.9.13"
+\version "2.11.15"
 upper = \relative c'' {
    \clef treble
    \key c \major
@@ -289,12 +297,12 @@ text = \lyricmode {
 @appendixsubsec Piano centered dynamics
 
 Many piano scores have the dynamics centered between the two
-staffs.  This requires a bit of tweaking to implement, but
+staves.  This requires a bit of tweaking to implement, but
 since the template is right here, you don't have to do the
 tweaking yourself.
 
 @lilypond[quote,verbatim,ragged-right]
-\version "2.9.13"
+\version "2.11.15"
 upper = \relative c'' {
   \clef treble
   \key c \major
@@ -338,6 +346,7 @@ pedal = {
       \consists "Output_property_engraver"
 
       \override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1)
+      \override DynamicLineSpanner #'Y-offset = #0
       pedalSustainStrings = #'("Ped." "*Ped." "*")
       pedalUnaCordaStrings = #'("una corda" "" "tre corde")
 
@@ -348,8 +357,6 @@ pedal = {
 
       \override TextScript #'font-size = #2
       \override TextScript #'font-shape = #'italic
-      \override DynamicText #'extra-offset = #'(0 . 2.5)
-      \override Hairpin #'extra-offset = #'(0 . 2.5)
 
       \consists "Skip_event_swallow_translator"
 
@@ -358,7 +365,6 @@ pedal = {
     \context {
       \PianoStaff
       \accepts Dynamics
-      \override VerticalAlignment #'forced-distance = #7
     }
   }
 }
@@ -391,7 +397,7 @@ This template demonstrates a string quartet.  It also uses a @code{\global}
 section for time and key signatures.
 
 @lilypond[quote,verbatim,ragged-right]
-\version "2.9.13"
+\version "2.11.15"
 
 global= {
   \time 4/4
@@ -451,7 +457,7 @@ contains all the music definitions.  The other files -- @code{score.ly},
 
 @verbatim
 %%%%% piece.ly
-\version "2.9.13"
+\version "2.11.15"
 
 global= {
   \time 4/4
@@ -497,7 +503,7 @@ music = {
 
 
 %%%%% score.ly
-\version "2.9.13"
+\version "2.11.15"
 \include "piece.ly"
 #(set-global-staff-size 14)
 \score {
@@ -508,7 +514,7 @@ music = {
 
 
 %%%%% vn1.ly
-\version "2.9.13"
+\version "2.11.15"
 \include "piece.ly"
 \score {
   \keepWithTag #'vn1 \music
@@ -517,7 +523,7 @@ music = {
 
 
 %%%%% vn2.ly
-\version "2.9.13"
+\version "2.11.15"
 \include "piece.ly"
 \score {
   \keepWithTag #'vn2 \music
@@ -526,7 +532,7 @@ music = {
 
 
 %%%%% vla.ly
-\version "2.9.13"
+\version "2.11.15"
 \include "piece.ly"
 \score {
   \keepWithTag #'vla \music
@@ -535,7 +541,7 @@ music = {
 
 
 %%%%% vlc.ly
-\version "2.9.13"
+\version "2.11.15"
 \include "piece.ly"
 \score {
   \keepWithTag #'vlc \music
@@ -555,7 +561,7 @@ parts.  For example, the time signature and key signatures are almost
 always the same for all parts.
 
 @lilypond[quote,verbatim,ragged-right]
-\version "2.9.13"
+\version "2.11.15"
 global = {
    \key c \major
    \time 4/4
@@ -636,7 +642,7 @@ to the vocal notes (say, tenorMusic), then the changes will also
 apply to the piano reduction.
 
 @lilypond[quote,verbatim,ragged-right]
-\version "2.9.13"
+\version "2.11.15"
 global = {
    \key c \major
    \time 4/4
@@ -723,6 +729,120 @@ bassWords = \lyricmode {
 }
 @end lilypond
 
+@appendixsubsec SATB with aligned contexts
+
+Here all the lyrics lines are placed using @code{alignAboveContext}
+and @code{alignBelowContext}.
+
+@lilypond[quote,verbatim,ragged-right]
+\version "2.11.15"
+global = {
+  \key c \major
+  \time 4/4
+}
+
+sopMusic = \relative c'' {
+  c4 c c8[( b)] c4
+}
+sopWords = \lyricmode {
+  hi hi hi hi
+}
+
+altoMusic = \relative c' {
+  e4 f d e
+}
+altoWords =\lyricmode {
+  ha ha ha ha
+}
+
+tenorMusic = \relative c' {
+  g4 a f g
+}
+tenorWords = \lyricmode {
+  hu hu hu hu
+}
+
+bassMusic = \relative c {
+  c4 c g c
+}
+bassWords = \lyricmode {
+  ho ho ho ho
+}
+
+\score {
+  \new ChoirStaff <<
+     \new Staff = women <<
+        \new Voice =
+          "sopranos" { \voiceOne << \global \sopMusic >> }
+        \new Voice =
+          "altos" { \voiceTwo << \global \altoMusic >> }
+     >>
+     \new Lyrics \with {alignAboveContext=women} \lyricsto sopranos \sopWords
+     \new Lyrics \with {alignBelowContext=women} \lyricsto altos \altoWords
+% we could remove the line about this with the line below, since we want
+% the alto lyrics to be below the alto Voice anyway.
+%    \new Lyrics \lyricsto altos \altoWords
+
+     \new Staff = men <<
+        \clef bass
+        \new Voice =
+          "tenors" { \voiceOne <<\global \tenorMusic >> }
+        \new Voice =
+          "basses" { \voiceTwo <<\global \bassMusic >> }
+     >>
+
+     \new Lyrics \with {alignAboveContext=men} \lyricsto tenors \tenorWords
+     \new Lyrics \with {alignBelowContext=men} \lyricsto basses \bassWords
+% again, we could replace the line above this with the line below.
+%    \new Lyrics \lyricsto basses \bassWords
+  >>
+
+  \layout {
+     \context {
+        % a little smaller so lyrics
+        % can be closer to the staff
+        \Staff
+        \override VerticalAxisGroup #'minimum-Y-extent = #'(-3 . 3)
+     }
+  }
+}
+
+
+\score {
+  \new ChoirStaff <<
+     \new Staff = women <<
+        \new Voice =
+          "sopranos" { \voiceOne << \global \sopMusic >> }
+        \new Voice =
+          "altos" { \voiceTwo << \global \altoMusic >> }
+     >>
+
+     \new Lyrics \with {alignAboveContext=women} \lyricsto sopranos \sopWords
+     \new Lyrics \lyricsto altos \altoWords
+
+     \new Staff = men <<
+        \clef bass
+        \new Voice =
+          "tenors" { \voiceOne <<\global \tenorMusic >> }
+        \new Voice =
+          "basses" { \voiceTwo <<\global \bassMusic >> }
+     >>
+
+     \new Lyrics \with {alignAboveContext=men} \lyricsto tenors \tenorWords
+     \new Lyrics \lyricsto basses \bassWords
+  >>
+
+  \layout {
+     \context {
+        % a little smaller so lyrics
+        % can be closer to the staff
+        \Staff
+        \override VerticalAxisGroup #'minimum-Y-extent = #'(-3 . 3)
+     }
+  }
+} 
+@end lilypond
+
 
 @c bad node name to avoid node name confict
 @node Ancient notation templates
@@ -739,7 +859,7 @@ notes.  As a compromise, bar lines are often printed between the
 staves rather than on the staves.
 
 @lilypond[quote,verbatim,line-width=11.0\cm]
-\version "2.9.13"
+\version "2.11.15"
 
 global = {
   \set Score.skipBars = ##t
@@ -979,7 +1099,7 @@ quarter noteheads, and special marks, indicating rests of different length.
 
 @lilypond[quote,verbatim,ragged-right]
 \include "gregorian-init.ly"
-\version "2.9.13"
+\version "2.11.15"
 
 chant = \relative c' {
   \set Score.timing = ##f
@@ -1039,7 +1159,7 @@ is within a @code{\transpose} section.
 @c The `line-width' argument is for the \header.
 
 @lilypond[quote,verbatim,ragged-right,line-width]
-\version "2.9.13"
+\version "2.11.15"
 \header {
   title = "Song"
   subtitle = "(tune)"
@@ -1315,7 +1435,7 @@ violin concerto as TchaikovskyPI, whereas perhaps you wish to print
 
 @ The `line-width' is for \header.
 @li lypond[quote,verbatim,ragged-right,line-width]
-\version "2.9.13"
+\version "2.11.15"
 \header {
   dedication = "dedication"
   title = "Title"