]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/ly-examples/aucun-snippet.ly
Add '-dcrop' option to ps and svg backends
[lilypond.git] / Documentation / ly-examples / aucun-snippet.ly
1 \version "2.19.22"
2 \include "example-header.ily"
3
4 \paper {
5 %  line-width=158\mm  % produces 624 pixels
6   line-width = 143\mm  % reserve 15mm for incipit
7 }
8
9 % Aucun ont trouvé, from Montpellier Codex
10 %
11 % Put brackets in where the original has ligatures, using
12 % "Analysis Brackets," and adjust the "bracket-flare" property
13 % to make the ends vertical instead of slanted.
14
15 #(set-global-staff-size 15)
16
17 %%%%%%%%%%% INCIPIT DEFS %%%%%%%%%%
18
19 incipitGlobal = {
20                 \override NoteHead.style = #'mensural
21                 \override Accidental.style = #'mensural
22                 \override KeySignature.style = #'mensural
23                 \override Rest.style = #'mensural
24 %               \override Staff.TimeSignature.style = #'mensural
25                 \cadenzaOn
26           \override Score.Clef.extra-offset = #'(-0.0 . 0.5)
27           \override Score.Clef.font-size = #3
28           \clef "vaticana-do1"
29 }
30
31 incipitTriplum = \markup{
32         \score{
33                 {
34                 \set Staff.instrumentName="Triplum "
35                 \incipitGlobal
36                 s1.
37     }
38           \layout {
39                 %indent = 1\cm
40                   \context {\Voice
41                           \remove "Ligature_bracket_engraver"
42                           \consists "Mensural_ligature_engraver"
43                   }
44                   \context {\Staff
45                     \remove "Time_signature_engraver"
46                   }
47                  line-width=5\mm
48           }
49         }
50 }
51
52 incipitMotetus = \markup{
53         \score{
54                 {
55                 \set Staff.instrumentName="Motetus"
56                 \incipitGlobal
57                 s1.
58                 }
59           \layout {
60                 %       indent = 1\cm
61                   \context {\Voice
62                           \remove "Ligature_bracket_engraver"
63                           \consists "Mensural_ligature_engraver"
64                   }
65                   \context {\Staff
66                     \remove "Time_signature_engraver"
67                   }
68                  line-width=5\mm
69           }
70         }
71 }
72
73 incipitTenor = \markup{
74     \score{
75                 {
76     \set Staff.instrumentName = "Tenor  "
77                 \incipitGlobal
78                 s1.*2
79     }
80     \layout {
81                 %indent = 1\cm
82                 \context {\Voice
83                         \remove "Ligature_bracket_engraver"
84                         \consists "Mensural_ligature_engraver"
85                 }
86                 \context {\Staff
87                   \remove "Time_signature_engraver"
88                 }
89                  line-width=5\mm
90 }
91 }
92 }
93
94 incipitBassus = \markup{
95     \score{ {
96     \set Staff.instrumentName = "Bassus  "
97     \override NoteHead.style = #'neomensural
98                 \override Accidental.style = #'neomensural
99         \override Rest.style = #'neomensural
100         \override Staff.TimeSignature.style = #'neomensural
101         \cadenzaOn
102         \clef "petrucci-f3"
103         \key f \major
104         \time 3/2
105   \relative c' {
106     s1. % R1.*2
107   }
108     }
109     \layout {
110                   \context { \Voice
111                           \remove "Ligature_bracket_engraver"
112                           \consists "Mensural_ligature_engraver"
113                   }
114                  line-width=5\mm
115     }
116   }
117 }
118
119 %%%%%%%%%%% END INCIPIT DEFS %%%%%%%%%%%
120
121 #(ly:set-option 'point-and-click #f)
122
123 global = {
124   \override Staff.TimeSignature.stencil = #(lambda (grob)
125         (bracketify-stencil (ly:time-signature::print grob) Y 0.1 0.2 0.1))
126   \time 3/4
127         \hide Staff.BarLine
128   \override HorizontalBracket.direction = #UP
129   \override HorizontalBracket.bracket-flare = #'(0 . 0)
130 }
131
132 %%%%%%%%% MACRO FOR MAKING SLASHES THROUGH STEMS %%%%%%%%%%
133 MakeSlash = #(define-music-function (angle len-left len-right
134 thick y-factor offset)
135                                     (number? number? number? number? number?
136 pair?)
137 #{
138 \once \override Voice.Stem.text = \markup {
139     \postscript #(let ((x-off (car offset))
140                        (y-off (cdr offset)))
141     (string-append
142     (ly:number->string (car offset)) " " (ly:number->string (cdr offset)) "
143 translate "
144     (ly:number->string angle) " rotate "
145     (ly:number->string (- x-off)) " "
146     (ly:number->string (- y-off)) " translate 0 setlinewidth "
147     (ly:number->string (- x-off len-left))  " " (ly:number->string (+ y-off
148 thick)) " moveto "
149     (ly:number->string (- x-off len-left))  " " (ly:number->string y-off)
150                                              " " (ly:number->string thick) "
151 90 270 arc "
152     (ly:number->string (+ x-off len-right)) " " (ly:number->string y-off)
153                                              " " (ly:number->string thick) "
154 270 90 arc "
155                                              " gsave fill grestore stroke")) }
156
157 \once \override Voice.Stem.stencil = #(lambda (grob)
158     (let* ((sten1 (ly:stem::print grob))
159            (sten2 (ly:text-interface::print grob))
160            (extent1 (ly:stencil-extent sten1 Y))
161            (extent2 (ly:stencil-extent sten2 Y)))
162     (ly:stencil-add
163         sten1
164         (ly:stencil-translate sten2
165                               (cons 0 (+ (* y-factor (cdr extent1))
166                                          (* (- 1 y-factor) (car extent1))))))))
167 #})
168
169
170 slash = { \MakeSlash #20 #1.0 #1.1 #0.05 #0.75 #'(0 . -.5) }
171
172 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
173
174 triplumWords = \lyricmode {
175   Au -- cun ont trou -- ve chant par u -- sa -- ge,
176         mes a moi en doune o -- choi -- son __
177   a -- mours, qui res -- bou -- dist mon cou -- ra -- ge
178         si que m'ès -- tuet fai -- re _ chan -- _ _ çon
179 }
180
181 triplumNotes = \relative {
182   \clef "treble_8"
183         %\set Staff.midiInstrument = "flute"
184 %       \global
185         \override StemTremolo.beam-thickness = #.125
186         \override StemTremolo.slope = #1.0
187   f'8 f4 e8 d c f f f | % 1
188         % the \scaleDurations command below makes 5 notes last the
189         % duration of a dotted quarter
190         e8 c4 \scaleDurations 3/2 {     \tuplet 5/4{e16[ d e d e]} } e8 f4 | % 2
191   g2. ~ 4. | % 3
192         f8 d4 f4. \scaleDurations 3/2 { \tuplet 6/4{ g16[ f e f e f]}} % 4
193         g8 g4 g4. e4. | % 5
194         fis8 d4 e8\startGroup g4\stopGroup f8[ e d] | % 6
195         c2. r4. | % 7
196 }
197
198 motetusWords = \lyricmode {
199   lonc tans _ _  me fiu -- te -- nu de chan -- _ _ ter __
200   mes or ai _ _
201 }
202
203 motetusNotes = \relative {
204   \clef "treble_8"
205   c'2. c8\startGroup b8 \slash c\stopGroup | % 1
206         a2. c4. | d2. e4. | % 2-3
207   f2. f8 e d | % 4
208         c2. ~ 4. | r2. r4. | % 5-6
209         g'4. g g8 f e | % 7
210 }
211
212
213 tenorNotes = \relative {
214   \clef "treble_8"
215         f2. | a2. | g2. | r2. | % 1-4
216         c2. | b2. | c2. |  % 5-7
217 }
218
219 \score {
220   \new StaffGroup <<
221           \new Staff = "triplum" <<
222                   %\set Staff.instrumentName = "Triplum"
223                   \set Staff.instrumentName = \incipitTriplum
224                         \set Staff.shortInstrumentName = "Tr."
225       \set Staff.timeSignatureFraction = 9/8
226       \scaleDurations 2/3
227                   \context Voice = "triplum" { \global \triplumNotes }
228 %      \scaleDurations 2/3
229 %                       \context Voice = "slashes" { \triplumSkips }
230             \new Lyrics { \lyricsto "triplum" { \triplumWords }}
231                 >>
232                 \new Staff = "motetus" <<
233                   %\set Staff.instrumentName = "Motetus"
234                   \set Staff.instrumentName = \incipitMotetus
235                         \set Staff.shortInstrumentName = "M."
236       \set Staff.timeSignatureFraction = 9/8
237       \scaleDurations 2/3
238                         \context Voice = "motetus" { \global \motetusNotes }
239             \new Lyrics { \lyricsto "motetus" { \motetusWords }}
240           >>
241                 \new Staff = "tenor" {
242                   %\set Staff.instrumentName = "Tenor"
243                   \set Staff.instrumentName = \incipitTenor
244                         \set Staff.shortInstrumentName = "T."
245                         \global \tenorNotes
246                 }
247         >>
248         %\midi {}
249         \layout {
250           %\context {
251            % \Staff \consists "Horizontal_bracket_engraver"
252           %}
253                 \context {
254                   \Voice \consists "Horizontal_bracket_engraver"
255           }
256         }
257 }