]> git.donarmstrong.com Git - lilypond.git/blob - input/wilhelmus.ly
(conv): add 2.2.0 rule.
[lilypond.git] / input / wilhelmus.ly
1 \version "2.1.36"
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 modernText = \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 text = \lyrics {
121   Wil -- hel -- mus van Nas -- sou -- we
122   Ben ick van duyt -- schen bloet,
123   Den Va -- der -- landt ghe -- trou -- we,
124   blyf ick tot in den doot!
125   Een Prin -- ce van O -- ran -- gien
126   Ben ick, vry, on -- ver -- veert;
127   Den Co -- ninck van His -- pan -- gien
128   Heb ick al -- tijt ghe -- eert.
129 }
130
131 oneHalfNoteTime = \markup {
132   \override #'(baseline-skip . 0)
133   \column < { \number "1" } { \smaller \smaller \note #"2" #-0.5 } >
134 }
135
136 linebreaks = \notes {
137   \repeat unfold 2 { s4 s1 s4 s8 \bar "" \break
138                      s8 s1 s2. \bar "" \break }
139   s4 s2*3 s4 s8 \bar "" \break
140   s8 s1 s2. \bar "" \break
141   s4 s4*7 s4. \bar "" \break
142   s8 s1 s\breve \endBarLine
143 }
144
145 \score {
146   \context Score <<
147     \context Staff <<
148       \override Staff.StaffSymbol #'width = #'80
149       \set Staff.autoBeaming = ##f
150       \margins
151       \smallBarLines
152
153       %% Less vertical space needed with lyrics
154       \set Staff.minimumVerticalExtent = #'(2 . 2)
155       
156       %% Second time signature
157       %% \override Staff.TimeSignature   #'print-function =
158       %% #(second-time-signature '(3 . 2) Time_signature::print)
159       
160       %% Custom time signature
161       \override Staff.TimeSignature #'print-function = #Text_item::print
162       \override Staff.TimeSignature #'text = #oneHalfNoteTime
163       
164       %% Invisible alternating time signature 
165       \notes {
166         \partial 4 s4
167         \override Staff.TimeSignature #'print-function = #'()
168         \repeat unfold 2 { \time 4/4 s1 \time 2/4 s2 \time 4/4 s1*2 }
169         \time 3/2 s2*3 \time 2/4 s2 \time 4/4 s1*2
170         \time 7/4 s4*7 \time 2/4 s2
171         \time 4/4 s1 \time 4/2 s1*2
172       }
173
174       \context Voice = "voice" \voice
175         \linebreaks
176         \noclefs
177       \context Voice = "stich" \stich
178     >>
179     \lyricsto "voice" \new Lyrics {
180       \set minimumVerticalExtent = #'(2 . 2)
181       \text
182     }
183   >>
184   \paper {}
185 %  \midi {}
186 }
187
188 %%% Local variables:
189 %%% LilyPond-indent-level:2
190 %%% End: