A few nits.
[opus_libre.git] / scores / etoilesanscouleur / texte.ly
blob15a3f85e0e0059c88575c45729e4cbb0b2109ac4
1 %-- Étoile sans couleur -- texte.ly -------------------------------%
2 % (c) 2011 Valentin Villenave <valentin@villenave.net>
5 %-- Look-and-feel -------------------------------------------------%
7 #(set-global-staff-size 14)
9 \paper {
10 system-separator-markup = \slashSeparator
13 \pointAndClickOff
16 \layout {
17 \context {
18 \Score
19 % Wouldn't normally use this, but in this case
20 % I like to see where tied syllables are.
21 melismaBusyProperties = #'()
25 % No you didn't, no you didn't!...
26 %#(ly:set-option 'untainted #t)
27 #(ly:set-option 'show-letters #t)
30 %-- Titling -------------------------------------------------------%
32 \header {
33 title = "Étoile sans couleur"
34 subtitle = \markup \center-column {
35 "pour récitant et quatre instruments,"
36 "sur un texte de Jacques Roubaud"
37 \vspace #2
39 composer = "Valentin Villenave"
40 date = "automne 2011"
41 piece = "Étoile sans couleur"
44 \paper {
45 first-page-number = #-1
46 % min-systems-per-page = #4
49 taintedText =
50 \markup \justify {
51 Avant de reproduire cette partition, vous êtes toutefois invité à
52 vous assurer de ne pas contrevenir au droit moral de l’auteur du
53 texte qu’elle contient. Si ce point vous semble incertain, il vous
54 est possible de recompiler la partition avec l’option
55 \concat { \typewriter untainted , } ce qui aura pour effet de remplacer
56 toutes les syllabes du texte d’origine par d’autres syllabes aléatoires
57 (par défaut \concat { «  \bold pa  » ,} \concat { «  \bold ta  » }
58 et \concat { «  \bold touille  »). } La partition ainsi produite pourra
59 être diffusée librement, sans autres restrictions que celles indiquées
60 par sa licence.
63 untaintedText =
64 \markup \justify {
65 Cet exemplaire a été compilé avec l’option \concat { \typewriter untainted  : }
66 toutes les syllabes du texte d’origine ont été remplacées par des
67 syllabes aléatoires. De ce fait, la présente partition peut être diffusée
68 librement, sans autres restrictions que celles indiquées par sa licence.
71 #(define-markup-command (choose-text layout props) ()
72 (let ((text (if (ly:get-option 'untainted)
73 untaintedText
74 taintedText)))
75 (interpret-markup layout props text)))
77 \pageBreak
78 \markup \fill-page {
79 " "
80 \fill-line {
82 \italic \line {
83 Pièce rédigée pour le concours Pierre-Jean Jouve, « Printemps des poètes » 2011.
86 " "
87 " "
88 \fill-line {
89 \override #'(line-width . 100)
90 \left-column {
91 \fill-line {\epsfile #X #30 #"scores/etoilesanscouleur/oumupo.eps" }
92 \wordwrap {
93 \hspace #4 Cette pièce s’inscrit dans le cadre d’un projet de refondation
94 de l’Ouvroir de Musique Potentielle
95 \concat { ( \with-url #"http://oumupo.org" \typewriter http://oumupo.org ),}
96 dédié à l’écriture musicale sous contraintes formelles.
98 \vspace #.5
99 \wordwrap {
100 \hspace #4 À ce titre, la construction harmonique et mélodique est
101 entièrement dictée par une correspondance entre notes et lettres,
102 mots et motifs (dont quelques-uns ont ici été explicités littéralement,
103 même si ce n’est pas nécessaire à la compréhension de la partition).
104 De même, la construction structurelle et rythmique est gouvernée par
105 le schéma de longueur des vers ainsi que par leur prosodie.
106 L’écriture s’inspire également de contraintes suggérées
107 par Jacques Roubaud lui-même dans son \italic \wordwrap { Atlas de
108 Littérature Potentielle } (Paris, Gallimard, 1981), et notamment des célèbres
109 \italic \wordwrap {« principes de Roubaud »} auxquels elle tente de proposer
110 ici quelques réponses musicales.
112 \vspace #.5
113 \wordwrap {
114 \hspace #4 Cette pièce contient également une courte
115 citation extraite de la première version du
116 \italic \line {Berliner Requiem} de Kurt Weill
117 et Bertolt Brecht (commande de Radio Frankfurt, 1929).
121 \fill-line {
122 \override #'(box-padding . 6)
123 \box \center-column {
124 \line {
125 Texte : Jacques Roubaud.
127 \line {
128 Copyright & copyleft © Valentin Villenave, 2011.
130 \line {
131 \with-url #"http://valentin.villenave.net"
132 \typewriter http://valentin.villenave.net
134 \vspace #.5
135 \override #'(line-width . 100)
136 \justify {
137 Cette partition est publiée suivant les termes de la licence
138 \with-url #"http://artlibre.org/licence/lal"
139 \bold { Art Libre }
140 \concat { ( \with-url #"http://artlibre.org" \typewriter http://artlibre.org ).}
141 Vous pouvez la copier, la modifier et la jouer \italic librement
142 sans contrevenir au droit d’auteur, à condition de respecter les
143 termes de la licence (notamment en veillant à mentionner le nom
144 de l’auteur et l’adresse web d’origine).
146 \vspace #.5
147 \override #'(line-width . 100)
148 \choose-text
149 \vspace #.5
150 \line {
151 Gravure réalisée au moyen du logiciel libre
152 \with-url #"http://www.LilyPond.org"
153 \concat {\bold "GNU LilyPond" ,}
154 \concat { #(ly:export (string-append "version " (lilypond-version) ".")) }
160 \pageBreak
163 %-- Instrument names ----------------------------------------------%
165 FluteInstr = \markup {
166 \override #'(baseline-skip . 0)
167 \center-column {
168 \vspace #1
169 "Flûte hulusi"
170 \vspace #.4
171 \smaller "(instrument"
172 \smaller "traditionnel"
173 \smaller "chinois)"
176 FluteShortInstr = "Fl."
177 GuitareInstr = "Guitare"
178 GuitareShortInstr = "G."
179 MarimbaInstr = \markup \center-column {
180 "Marimba"
181 \smaller "(cinq octaves)"
183 MarimbaShortInstr = "M."
184 RecitantInstr = \markup \center-column {
185 "Récitant"
186 \smaller "(sans amplification)"
188 RecitantShortInstr = "R."
189 PianoInstr = "Piano"
190 PianoShortInstr = "P."
192 %%% Century SchoolBook doesn't have capital Œ!
193 oeil =
194 \markup {
195 \concat {
196 \combine
197 \line {
198 \combine O {
199 \with-color #white \filled-box #'(1 . 2) #'(0 . 2) #0
202 \line {
203 \hspace #0.6
211 %-- Spoken text ----------------------------------------------------%
213 %%% What if we don't want the original text?
214 %%% Then we'll replace each syllable with
215 %%% something pronouncable (and preferably
216 %%% not too serious).
218 #(define word-list '("pa" "ta" "touille"))
220 %%% This will retrieve the text from a separate file,
221 %%% and assign it to the appropriate variable.
223 %%% ... Or not.
225 #(let* ((orig-text (ly:gulp-file "scores/etoilesanscouleur/texte.txt")))
226 (ly:parser-include-string parser
227 (format #f "RecitantTexte = \\lyricmode { ~a }"
228 (if (ly:get-option 'untainted)
229 (regexp-substitute/global #f "[\\a-zA-Z’]+" orig-text
230 'pre
231 (lambda (x)
232 (let* ((word (match:substring x))
233 (rand (list-ref word-list (random (length word-list))))
234 (result (if (string-prefix? "\\" word) word rand)))
235 (if (string-any char-set:upper-case word)
236 (string-capitalize result)
237 result)))
238 'post)
239 orig-text)))
240 (if (ly:get-option 'untainted)
241 (set! oeil
242 (make-simple-markup
243 (string-capitalize
244 (list-ref word-list (random (length word-list))))))))
247 %-- Letter hints ---------------------------------------------------%
249 %%% This piece is mostly coded after the poem's words,
250 %%% so in some cases we might want to give a
251 %%% hint as to what letter each note stands for.
253 %%% The letter will be conveyed through the 'tweaks
254 %%% property, so we need to extract it from the alist.
255 #(define (set-letter str note)
256 (set!
257 (ly:music-property note 'tweaks)
258 (acons 'letter str
259 (ly:music-property note 'tweaks)))
260 note)
262 %%% Let's enclose it in a music function (and use it
263 %%% scarcely, we don't want to give it all away).
265 #(define letter
266 (define-music-function (parser location str note) (string? ly:music?)
267 ;; The good news is: we can call this function either before a
268 ;; simple note, or even inside a chord construct.
269 (music-map
270 (lambda (x)
271 ; ugh. Causes a memory leak.
272 ; (if (eq? (ly:music-property x 'name) 'NoteEvent)
273 (set-letter str x))
275 note)
276 note))
278 %%% This is a hack built around the note-head-interface,
279 %%% with a custom-made Scheme engraver in lieu of the
280 %%% Easy_notes_ thingy.
281 #(define Letter_engraver
282 (list
283 (cons 'acknowledgers
284 (list
285 (cons 'note-head-interface
286 (lambda (engraver grob source-engraver)
287 (let* ((context (ly:translator-context engraver))
288 (tweaks (ly:event-property (event-cause grob) 'tweaks))
289 (str (ly:assoc-get 'letter tweaks))
290 (letter
291 (if str
292 ;; only the first letter if there are several.
293 (string-upcase (string-take str 1))
294 ""))
295 (note-names (make-vector 7 letter)))
296 (ly:grob-set-property! grob 'note-names note-names))))))))
298 \layout {
299 \context {
300 \Voice
301 \consists \Letter_engraver
305 %%% Of course, if we're running in 'untainted mode,
306 %%% then this whole thingamajig becomes moot.
307 #(if (ly:get-option 'untainted)
308 (ly:set-option 'show-letters #f))
310 %%% Just for consistency (and fun!), let's hide
311 %%% the \easyHeads command behind a suitably-named wrapper...
312 lettersOn =
313 #(if (ly:get-option 'show-letters)
315 \override NoteHead #'stencil = #note-head::brew-ez-stencil
316 %% ... which allows us to tweak the defaults:
317 \override NoteHead #'font-size = #-7 %% was 8 originally
318 \override NoteHead #'font-family = #'sans
319 \override NoteHead #'font-series = #'bold %% ugly. But safer.
321 (make-music 'Music 'void #t))
322 lettersOff = {
323 \easyHeadsOff
326 %-------------------------------------------------------------------%