]> git.donarmstrong.com Git - lilypond.git/blob - input/wilhelmus.ly
New file.
[lilypond.git] / input / wilhelmus.ly
1 \version "2.1.34"
2
3 \header {
4   texidoc = "Wilhelmus van Nassouwe"
5   title = "Wilhelmus van Nassouwe"
6   composer = "Valerius"
7   subtitle = "Neder-landtsche gedenck-clanck"
8   opus = "1626"
9   copyright = "public domain"
10   enteredby = "janneke@gnu.org"
11 }
12
13 %% hymn tricks
14 #(define (override-alist-property grob-name alist-property entry)
15   (lambda (context)
16     (let* ((grob-properties (ly:context-property context grob-name))
17            (alist-cons (chain-assoc-get alist-property grob-properties '()))
18            (new-alist-cons (assoc-set! alist-cons (car entry) (cdr entry)))
19            (new-props (assoc-set! (car grob-properties)
20                                   alist-property new-alist-cons)))
21       (ly:context-set-property! context grob-name (list new-props)))))
22   
23 #(define (set-extra-space grob-name entry value)
24   (override-alist-property grob-name 'space-alist
25    ;;;huh, broken? --jcn
26    ;;;(cons entry (cons 'fixed-space value))))
27    (cons entry (cons 'extra-space value))))
28       
29 noclefs = \notes { s1 \set Staff.Clef = \turnOff }
30 margins = {
31   %% first line left margin
32   \applycontext #(set-extra-space 'TimeSignature 'first-note 4.5)
33   
34   %% next lines left margin
35   %% \applycontext #(set-extra-space 'KeySignature 'first-note 15)
36   \applycontext #(set-extra-space 'KeySignature 'staff-bar 15)
37   
38   %% next lines small key-signature margin
39   \applycontext #(set-extra-space 'LeftEdge 'key-signature 1.0)
40
41   %% using StaffSymbol.width now
42   %% right margin
43   %%\applycontext #(set-extra-space 'BarLine 'right-edge 12.5)
44 }
45
46 smallBarLines = {
47   %% Set height of bar line to 2 staff-spaces
48   \override Staff.BarLine #'bar-size-procedure = #(lambda (x) 2)
49   %% Move barline one staff-space up
50   \override Staff.BarLine #'extra-offset = #'(0 . 1)
51 }
52
53 endBarLine = {
54   \revert Staff.BarLine #'bar-size-procedure
55   \revert Staff.BarLine #'extra-offset
56   \override Staff.BarLine #'extra-offset = #'(12 . 0)
57   \bar "|."
58 }
59
60 \paper {
61   indent = 0.0\mm
62   linewidth = 120.0\mm
63   textheight = 270.0\mm
64 }
65
66 voice = \notes \relative c' {
67   \clef violin
68   \key g \major
69   \partial 4
70   d4 g g a a b a8
71   b8 c4 b a a g2.
72
73   d4 g g a a b a8
74   b8 c4 b a a g2.
75
76   b8[ c] d2 e4 d2 c4 b a8
77   b8 c4 b a g a2.
78
79   d,4 g4.\melisma a8\melismaEnd b2 a2 g4 fis e8
80   d8 e4 g g fis
81   \override NoteHead #'style = #'neo_mensural
82   g\breve
83 }
84
85 stich = \notes \relative c'' {
86   \override Staff.NoteCollision #'merge-differently-dotted = ##t
87   \set fontSize = #-3
88   %% broken?
89   \override Voice.Stem #'beamed-lengths = #(map (lambda (x) (* 0.2 x)) '(3.26))
90
91   \voiceTwo
92   \partial 4
93   s4 s s a8[ b] c[ a] s4.
94   s8 s4 s a8 g s4 s2.
95
96   s4 s s a8[ b] c[ a] s4.
97   s8 s4 s a8 g s4 s2.
98   
99   s8 s s2 s4 s2 s4 s s8
100   s8 s4 s s s s2.
101
102   s4 g8 fis g a s2 s2 s4 s s8
103   s8 e8[ fis]
104 }
105
106 text = \lyrics {
107   Wil -- hel -- mus van Nas -- sou -- we
108   ben ik van duit -- sen bloed,
109
110   den va -- der -- land ge -- trou -- we
111   blijf ik tot in den dood.
112
113   Een prin -- se van O -- ran -- je
114   ben ik vrij on -- ver -- veerd,
115
116   den ko -- ning van His -- pan -- je
117   heb ik al -- tijd ge -- eerd.
118 }
119
120 oneHalfNoteTime = \markup {
121   \override #'(baseline-skip . 0)
122   \column < { \number "1" } { \smaller \smaller \note #"2" #-0.5 } >
123 }
124
125 linebreaks = \notes {
126   \repeat unfold 2 { s4 s1 s4 s8 \bar "" \break
127                      s8 s1 s2. \bar "" \break }
128   s4 s2*3 s4 s8 \bar "" \break
129   s8 s1 s2. \bar "" \break
130   s4 s4*7 s4. \bar "" \break
131   s8 s1 s\breve \endBarLine
132 }
133
134 \score {
135   \context Score <<
136     \context Staff <<
137       \override Staff.StaffSymbol #'width = #'80
138       \margins
139       \smallBarLines
140
141       %% Less vertical space needed with lyrics
142       \set Staff.minimumVerticalExtent = #'(2 . 2)
143       
144       %% Second time signature
145       %% \override Staff.TimeSignature   #'print-function =
146       %% #(second-time-signature '(3 . 2) Time_signature::print)
147       
148       %% Custom time signature
149       \override Staff.TimeSignature #'print-function = #Text_item::print
150       \override Staff.TimeSignature #'text = #oneHalfNoteTime
151       
152       %% Invisible alternating time signature 
153       \notes {
154         \partial 4 s4
155         \override Staff.TimeSignature #'print-function = #'()
156         \repeat unfold 2 { \time 4/4 s1 \time 2/4 s2 \time 4/4 s1*2 }
157         \time 3/2 s2*3 \time 2/4 s2 \time 4/4 s1*2
158         \time 7/4 s4*7 \time 2/4 s2
159         \time 4/4 s1 \time 4/2 s1*2
160       }
161
162       \context Voice = "voice" \voice
163         \linebreaks
164         \noclefs
165       \context Voice = "stich" \stich
166     >>
167     \lyricsto "voice" \new Lyrics {
168       \set minimumVerticalExtent = #'(2 . 2)
169       \text
170     }
171   >>
172   \paper {}
173 %  \midi {}
174 }
175
176 %%% Local variables:
177 %%% LilyPond-indent-level:2
178 %%% End: