]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/hymn-template.ly
Merge branch 'master' of git+ssh://git.savannah.gnu.org/srv/git/lilypond
[lilypond.git] / Documentation / snippets / new / hymn-template.ly
1 \version "2.13.31"
2 \header {
3   lsrtags = "vocal-music, template"
4   texidoc = "
5 This code shows one way of setting out a hymn tune when each line
6 starts and ends with a partial measure.  It also shows how to add
7 the verses as stand-alone text under the music.
8
9 "
10   doctitle = "Hymn template"
11 }
12
13 Timeline = {
14   \time 4/4
15   \tempo 4=96
16   \partial 2
17   s2 | s1 | s2 \breathe s2 | s1 | s2 \bar "||" \break
18   s2 | s1 | s2 \breathe s2 | s1 | s2 \bar "||"
19 }
20
21 SopranoMusic = \relative g' {
22   g4 g | g g g g | g g g g | g g g g | g2
23   g4 g | g g g g | g g g g | g g g g | g2
24 }
25
26 AltoMusic = \relative c' {
27   d4 d | d d d d | d d d d | d d d d | d2
28   d4 d | d d d d | d d d d | d d d d | d2
29 }
30
31 TenorMusic = \relative a {
32   b4 b | b b b b | b b b b | b b b b | b2
33   b4 b | b b b b | b b b b | b b b b | b2
34 }
35
36 BassMusic =  \relative g {
37   g4 g | g g g g | g g g g | g g g g | g2
38   g4 g | g g g g | g g g g | g g g g | g2
39 }
40
41 global = {
42  \key g \major
43 }
44
45 \score {  % Start score
46   <<
47     \new PianoStaff <<  % Start pianostaff
48       \new Staff <<  % Start Staff = RH
49         \global
50         \clef "treble"
51         \new Voice = "Soprano" <<  % Start Voice = "Soprano"
52           \Timeline
53           \voiceOne
54           \SopranoMusic
55         >>  % End Voice = "Soprano"
56         \new Voice = "Alto" <<  % Start Voice = "Alto"
57           \Timeline
58           \voiceTwo
59           \AltoMusic
60         >>  % End Voice = "Alto"
61       >>  % End Staff = RH
62       \new Staff <<  % Start Staff = LH
63         \global
64         \clef "bass"
65         \new Voice = "Tenor" <<  % Start Voice = "Tenor"
66           \Timeline
67           \voiceOne
68           \TenorMusic
69         >>  % End Voice = "Tenor"
70         \new Voice = "Bass" <<  % Start Voice = "Bass"
71           \Timeline
72           \voiceTwo
73           \BassMusic
74         >>  % End Voice = "Bass"
75       >>  % End Staff = LH
76     >>  % End pianostaff
77   >>
78 }  % End score
79
80 \markup {
81   \fill-line {
82     ""
83     {
84       \column {
85         \left-align {
86           "This is line one of the first verse"
87           "This is line two of the same"
88           "And here's line three of the first verse"
89           "And the last line of the same"
90         }
91       }
92     }
93     ""
94   }
95 }
96
97 \paper {  % Start paper block
98   indent = 0     % don't indent first system
99   line-width = 130   % shorten line length to suit music
100   ragged-bottom = ##f   % don't justify systems on page
101 }  % End paper block