3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 % Desciption: Lilypond package to make writing large orchestral scores easier.
7 % Documentation: http://wiki.kainhofer.com/lilypond/orchestrallily
8 % Version: 0.02, 2008-03-06
9 % Author: Reinhold Kainhofer, reinhold@kainhofer.com
10 % Copyright: (C) 2008 by Reinhold Kainhofer
11 % License: GPL v3.0, http://www.gnu.org/licenses/gpl.html
14 % 0.01 (2008-03-02): Initial Version
15 % 0.02 (2008-03-06): Added basic MIDI support (*MidiInstrument and \setCreateMIDI)
16 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18 #(use-modules
(ice-
9 match
))
21 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23 %%%%% SCORE STRUCTURE AND AUTOMATIC GENERATION
24 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
25 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
34 % Helper function to filter all non-null entries
35 #(define
(not-null? x
) (not
(null? x
)))
37 % Helper function to extract a given variable, built from [Piece][Instrument]Identifier
38 #(define
(namedPieceInstrObject piece instr name
)
40 (fullname
(string-
>symbol
(string-append piece instr name
)))
41 (instrname
(string-
>symbol
(string-append instr name
)))
42 (piecename
(string-
>symbol
(string-append piece name
)))
45 ((defined? fullname
) (primitive-eval fullname
))
46 ((defined? instrname
) (primitive-eval instrname
))
47 ((defined? piecename
) (primitive-eval piecename
))
53 %% Print text as a justified paragraph, taken from the lilypond Notation Reference
54 #(define-markup-list-command
(paragraph layout props args
) (markup-list?
)
55 (let
((indent
(chain-assoc-get
'par-indent props
2)))
56 (interpret-markup-list layout props
57 (make-justified-lines-markup-list
(cons
(make-hspace-markup indent
)
60 conditionalBreak
= #(define-music-function
(parser location
) ()
61 #{ \tag #'instrumental-score
\pageBreak #}
64 #(define
(oly
:piece-title-markup title
) (markup
#:column
(#:line
(#:fontsize
#'3 #:bold title
))) )
66 #(define-markup-command
(piece-title layout props title
) (markup?
)
67 (interpret-markup layout props
(oly
:piece-title-markup title
))
70 #(define
(oly
:generate
_object
_name piece instr obj
)
71 (if
(and
(string? piece
) (string? instr
) (string? obj
))
72 (string-append piece instr obj
)
76 #(define
(oly
:generate
_staff
_name piece instr
) (oly
:generate
_object
_name piece instr
"St"))
78 #(define
(set-context-property context property value
)
79 (set
! (ly
:music-property context property
) value
)
83 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
84 % Score structure and voice types
85 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
87 #(define oly
:orchestral
_score
_structure
'())
89 #(define
(oly
:set
_score
_structure struct
)
91 (set
! oly
:orchestral
_score
_structure struct
)
92 (ly
:warning
(_ "oly:set_score_structure needs an association list as argument!"))
96 orchestralScoreStructure
= #(define-music-function
(parser location structure
) (list?
)
97 (oly
:set
_score
_structure structure
)
98 (make-music
'Music
'void
#t
)
101 #(define oly
:voice
_types
'())
103 #(define
(oly
:set
_voice
_types types
)
105 (set
! oly
:voice
_types types
)
106 (ly
:warning
(_ "oly:set_voice_types needs an association list as argument!"))
110 orchestralVoiceTypes
= #(define-music-function
(parser location types
) (list?
)
111 (oly
:set
_voice
_types types
)
112 (make-music
'Music
'void
#t
)
116 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
117 % Automatic staff and group generation
118 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
120 % Retrieve all music definitions for the given
121 #(define
(oly
:get
_music
_object piece instrument
)
122 (namedPieceInstrObject piece instrument
"Music")
124 #(define
(oly
:get
_music
_objects piece instruments
)
125 (filter not-null?
(map
(lambda
(i
) (oly
:get
_music
_object piece i
)) instruments
))
128 % Given a property name and the extensions, either generate the pair to set
129 % the property or an empty list, if no pre-defined variable could be found
130 #(define
(oly
:generate
_property
_pair prop piece instr type
)
131 (let
* ((val
(namedPieceInstrObject piece instr type
)))
132 (if
(not-null? val
) (list
'assign prop val
) '() )
136 #(define
(oly
:staff
_type type
)
138 ((string? type
) (string-
>symbol type
))
139 ((symbol? type
) type
)
145 #(define
(oly
:voice
_handler
_internal parser piece name type music
)
147 (tempo
(namedPieceInstrObject piece name
"Tempo"))
148 (lyrics
(namedPieceInstrObject piece name
"Lyrics"))
152 (if
(ly
:music? lyrics
)
153 (set
! musiccontent
(append musiccontent
(list dynamicUp
)))
154 (if
(not-null? lyrics
) (ly
:warning
(_ "Wrong type (no lyrics) for lyrics for instrument ~S in piece ~S") name piece
))
156 ; Append the settings
, key and clef
(if defined
)
159 (let
* ((object
(namedPieceInstrObject piece name type
)))
160 (if
(ly
:music? object
)
161 (set
! musiccontent
(append musiccontent
(list object
)))
162 (if
(not-null? object
) (ly
:warning
(_ "Wrong type (no ly:music) for ~S for instrument ~S in piece ~S") type name piece
))
166 '("Settings" "Key" "Clef" "TimeSignature")
169 (if
(ly
:music? music
)
171 (set
! musiccontent
(append musiccontent
(list music
)))
172 ;
(ly
:message
"Generating staff for ~a" name
)
175 (voicename
(oly
:generate
_object
_name piece name
"Voice" ))
176 (voicetype
(oly
:staff
_type type
))
177 (voice
(context-spec-music
(make-simultaneous-music musiccontent
) voicetype voicename
))
178 (staffcont
(list voice
))
180 ; I
f we have lyrics
, create
a lyrics context containing LyricCombineMusic
181 ; and add that
as second element to the staff
's elements list
...
182 (if
(ly
:music? lyrics
)
184 (lyricsname
(oly
:generate
_object
_name piece name
"Lyrics" ))
185 (lyricscont
(make-music
'LyricCombineMusic
'element lyrics
'associated-context voicename
))
187 (set
! staffcont
(append staffcont
188 (list
(context-spec-music lyricscont
'Lyrics lyricsname
))))
194 ; For empty music
, return empty
200 #(define
(oly
:voice
_handler parser piece name type
)
201 (let
* ((music
(oly
:get
_music
_object piece name
))
203 (oly
:voice
_handler
_internal parser piece name type music
)
208 #(define
(oly
:staff
_handler
_internal parser piece name type voices
)
209 (if
(not-null? voices
)
211 (staffname
(oly
:generate
_staff
_name piece name
))
212 (stafftype
(oly
:staff
_type type
))
213 (staff
(make-simultaneous-music voices
))
214 (propops
(oly
:staff
_handler
_properties piece name
))
217 ((SimultaneousMusic ParallelMusic
) #f)
218 (else
(set
! staff
(context-spec-music staff stafftype staffname
)))
220 (if
(not-null? propops
)
221 (set
! (ly
:music-property staff
'property-operations
) propops
)
225 ; For empty music
, return empty
230 #(define
(oly
:staff
_handler parser piece name type children
)
231 (let
* ((c (if
(not-null? children
) children
(list name
)))
232 (voices
(apply append
(map
(lambda
(v
) (oly
:create
_voice parser piece v
)) c)) )
234 (if
(not-null? voices
)
235 (oly
:staff
_handler
_internal parser piece name type voices
)
241 #(define
(oly
:parallel
_voices
_staff
_handler parser piece name type children
)
243 (voices
(map
(lambda
(i
) (oly
:create
_voice parser piece i
)) children
))
244 ; get the lsit of non-empty voices and flatten it
!
245 (nonemptyvoices
(apply append
(filter not-null? voices
)))
247 (if
(not-null? nonemptyvoices
)
248 (oly
:staff
_handler
_internal parser piece name
"Staff" nonemptyvoices
)
254 #(define
(oly
:part
_combined
_staff
_handler parser piece name type children
)
255 (let
* ((music
(oly
:get
_music
_objects piece children
)))
257 ((and
(pair? music
) (ly
:music?
(car music
)) (not-null?
(cdr music
)) (ly
:music?
(cadr music
)))
258 ;
(ly
:message
"Part-combine with two music expressions")
259 (oly
:staff
_handler
_internal parser piece name
"Staff" (list
(make-part-combine-music parser music
))))
261 (ly
:warning
"Part-combine without any music expressions")
263 ; exactly one is
a music expression
, simply use that by joining
265 (ly
:message
"Part-combine with only one music expressions")
266 (oly
:staff
_handler
_internal parser piece name
"Staff" (list
(apply append music
))))
268 ;
(ly
:message
"make_part_combined_staff: ~S ~S ~a" piece instr instruments
)
274 % Generate the properties for the staff for piece and instr. Typically, these
275 % are the instrument name and the short instrument name (if defined).
276 % return a (possibly empty) list of all assignments.
277 #(define
(oly
:staff
_handler
_properties piece instr
)
280 (instrumentName
. "InstrumentName")
281 (shortInstrumentName
. "ShortInstrumentName")
282 (midiInstrument
. "MidiInstrument")
286 (oly
:generate
_property
_pair
(car pr
) piece instr
(cdr pr
))
289 (props
(filter not-null? assignments
))
295 #(define
(oly
:staff
_group
_handler parser piece name type children
)
297 (staves
(map
(lambda
(i
) (oly
:create
_staff
_or
_group parser piece i
)) children
))
298 (nonemptystaves
(filter not-null? staves
))
300 (if
(not-null? nonemptystaves
)
302 (musicexpr
(if
(= 1 (length nonemptystaves
))
304 (make-simultaneous-music nonemptystaves
)))
305 (groupname
(oly
:generate
_staff
_name piece name
))
306 (grouptype
(oly
:staff
_type type
))
308 (propops
(oly
:staff
_handler
_properties piece name
))
311 ((SimultaneousMusic ParallelMusic
) #f)
312 (else
(set
! group
(context-spec-music group grouptype groupname
)))
314 (set
! (ly
:music-property group
'property-operations
) propops
)
317 ; Return empty list if no staves are generated
323 #(define oly
:staff
_handlers
326 '("GrandStaff" . oly
:staff
_group
_handler
)
327 '("PianoStaff" . oly
:staff
_group
_handler
)
328 '("ChoirStaff" . oly
:staff
_group
_handler
)
329 '("StaffGroup" . oly
:staff
_group
_handler
)
330 '("ParallelMusic" . oly
:staff
_group
_handler
)
331 '("SimultaneousMusic" . oly
:staff
_group
_handler
)
333 '("Staff" . oly
:staff
_handler
)
334 '("DrumStaff" . oly
:staff
_handler
)
335 '("PartCombinedStaff" . oly
:part
_combined
_staff
_handler
)
336 '("ParallelVoicesStaff" . oly
:parallel
_voices
_staff
_handler
)
340 #(define oly
:voice
_handlers
343 '("Voice" . oly
:voice
_handler
)
344 '("FiguredBass" . oly
:voice
_handler
)
345 '("Lyrics" . oly
:lyrics
_handler
)
346 '("DrumVoice" . oly
:voice
_handler
)
347 '("Dynamics" . oly
:dynamics
_handler
)
351 #(define
(oly
:create
_voice parser piece name
)
352 (let
* ( (voice
(namedPieceInstrObject piece name
"Voice"))
353 (type
(assoc-ref oly
:voice
_types name
)) )
354 (if
(not-null? voice
)
355 ; Explicit voice variable
, use that
359 ; No entry in structure found
=> simple voice
360 (oly
:voice
_handler parser piece name
"Voice")
361 ; Entry found in structure
=> use the handler for the given type
363 (voicetype
(car type
))
364 (handler
(assoc-ref oly
:voice
_handlers voicetype
))
367 ((primitive-eval handler
) parser piece name voicetype
)
369 (ly
:warning
"No handler found for voice type ~a, using default voice handler" voicetype
)
370 (oly
:voice
_handler parser piece name voicetype
)
379 #(define
(oly
:create
_staff
_or
_group parser piece name
)
380 (let
* ( (staff
(namedPieceInstrObject piece name
"Staff"))
381 (type
_from
_structure
(assoc-ref oly
:orchestral
_score
_structure name
)) )
382 ;
(if
(not-null? staff
)
383 ;
(ly
:message
"Found staff variable for instrument ~a in piece ~a" instr piece
)
384 ;
(ly
:message
"Staff variable for instrument ~a in piece ~a NOT FOUND" instr piece
)
386 (if
(not-null? staff
)
387 ; Explicit staff variable
, use that
390 (if
(not
(list? type
_from
_structure
))
391 ; No entry in structure found
=> simple staff
392 (oly
:staff
_handler parser piece name
"Staff" '())
394 ; Entry found in structure
=> use the handler for the given type
395 (let
* ((type
(car type
_from
_structure
))
396 (handler
(assoc-ref oly
:staff
_handlers type
))
397 (children
(cadr type
_from
_structure
))
400 ((primitive-eval handler
) parser piece name type children
)
402 (ly
:warning
"No handler found for staff type ~a, using default staff handler" type
)
403 (oly
:staff
_handler parser piece name type children
)
412 #(define
(oly
:register
_staff
_type
_handler type func
)
413 ;
(ly
:message
"Registering staff handler ~a for type ~a" func type
)
414 (set
! oly
:staff
_handlers
(assoc-set
! oly
:staff
_handlers type func
))
417 #(define
(oly
:register
_voice
_type
_handler type func
)
418 ;
(ly
:message
"Registering voice type handler ~a for type ~a" func type
)
419 (set
! oly
:voice
_handlers
(assoc-set
! oly
:voice
_handlers type func
))
422 % handlers for deprecated API
423 #(oly
:register
_staff
_type
_handler
'StaffGroup
'oly
:staff
_group
_handler
)
424 #(oly
:register
_staff
_type
_handler
'ParallelMusic
'oly
:staff
_group
_handler
)
427 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
428 % Automatic score generation
429 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
431 % \setUseBook ##t/##f sets a flag to determine whether the calls to createScore
432 % are from within a book block or not
433 % #(define oly:score_handler collect-scores-for-book)
434 #(define oly
:score
_handler toplevel-score-handler
)
435 #(define oly
:music
_handler toplevel-music-handler
)
436 #(define oly
:text
_handler toplevel-text-handler
)
438 setUseBook
= #(define-music-function
(parser location usebook
) (boolean?
)
441 (set
! oly
:score
_handler book-score-handler
)
442 (set
! oly
:music
_handler book-music-handler
)
443 (set
! oly
:text
_handler book-text-handler
)
446 (set
! oly
:score
_handler toplevel-score-handler
)
447 (set
! oly
:music
_handler toplevel-music-handler
)
448 (set
! oly
:text
_handler toplevel-text-handler
)
451 (make-music
'Music
'void
#t
)
455 % Two functions to handle midi-blocks: Either don't set one, or set an empty
456 % one so that MIDI is generated
457 #(define
(oly
:set
_no
_midi
_block score
) '())
458 #(define
(oly
:set
_midi
_block score
)
459 (let
* ((midiblock
(if
(defined?
'$defaultmidi
)
460 (ly
:output-def-clone $defaultmidi
)
461 (ly
:make-output-def
))))
462 (ly
:output-def-set-variable
! midiblock
'is-midi
#t
)
463 (ly
:score-add-output-def
! score midiblock
)
467 % \setCreateMidi ##t/##f sets a flag to determine wheter MIDI output should
469 #(define oly
:apply
_score
_midi oly
:set
_no
_midi
_block
)
470 setCreateMIDI
= #(define-music-function
(parser location createmidi
) (boolean?
)
472 (set
! oly
:apply
_score
_midi oly
:set
_midi
_block
)
473 (set
! oly
:apply
_score
_midi oly
:set
_no
_midi
_block
)
475 (make-music
'Music
'void
#t
)
479 % Two functions to handle layout-blocks: Either don't set one, or set an empty
480 % one so that a PDF is generated
481 #(define
(oly
:set
_no
_layout
_block score
) '())
482 #(define
(oly
:set
_layout
_block score
)
483 (let
* ((layoutblock
(if
(defined?
'$defaultlayout
)
484 (ly
:output-def-clone $defaultlayout
)
485 (ly
:make-output-def
))))
486 (ly
:output-def-set-variable
! layoutblock
'is-layout
#t
)
487 (ly
:score-add-output-def
! score layoutblock
)
491 % \setCreatePDF ##t/##f sets a flag to determine wheter PDF output should
493 #(define oly
:apply
_score
_layout oly
:set
_no
_layout
_block
)
494 setCreatePDF
= #(define-music-function
(parser location createlayout
) (boolean?
)
496 (set
! oly
:apply
_score
_layout oly
:set
_layout
_block
)
497 (set
! oly
:apply
_score
_layout oly
:set
_no
_layout
_block
)
499 (make-music
'Music
'void
#t
)
503 % Set the piece title in a new header block.
504 #(define
(oly
:set
_piece
_header score piecename
)
505 (if
(not-null? piecename
)
506 (let
* ((header
(make-module
)))
507 (module-define
! header
'piece piecename
)
508 (ly
:score-set-header
! score header
)
514 % post-filter functions. By default, no filtering is done. However,
515 % for the *NoCues* function, the cue notes should be killed
516 identity
= #(define-music-function
(parser location music
) (ly
:music?
) music
)
517 cuefilter
= #(define-music-function
(parser location music
) (ly
:music?
)
518 ((ly
:music-function-extract removeWithTag
) parser location
'cued
((ly
:music-function-extract killCues
) parser location music
))
521 #(define-public
(oly
:add-toc-item parser markup-symbol text
)
522 (oly
:music
_handler parser
(add-toc-item
! markup-symbol text
)))
525 #(define
(oly
:add-score parser score piecename
)
526 (if
(not-null? piecename
)
527 (oly
:add-toc-item parser
'tocItemMarkup piecename
))
528 (oly
:score
_handler parser score
)
530 % The helper function to build a score.
531 #(define
(oly
:createScoreHelper parser location piece children func
)
533 (staves
(oly
:staff
_group
_handler parser piece
"" "SimultaneousMusic" children
))
534 (music
(if
(not-null? staves
)
535 ((ly
:music-function-extract func
) parser location staves
)
539 (piecename
(namedPieceInstrObject piece
(car children
) "PieceName"))
540 (piecenametacet
(namedPieceInstrObject piece
(car children
) "PieceNameTacet"))
544 ; No staves
, print tacet
546 (if
(not-null? piecenametacet
) (set
! piecename piecenametacet
))
547 (if
(not-null? piecename
)
548 (oly
:add-score parser
(list
(oly
:piece-title-markup piecename
)) piecename
)
549 (ly
:warning
(_ "No music and no score title found for part ~a and instrument ~a") piece children
)
552 ; we have staves
, apply the piecename to the score and add layout
/midi blocks if needed
554 (set
! score
(scorify-music music parser
))
555 (oly
:set
_piece
_header score piecename
)
556 (oly
:apply
_score
_midi score
)
557 (oly
:apply
_score
_layout score
)
558 ; Schedule the score for typesetting
559 (oly
:add-score parser score piecename
)
563 ; This is
a void function
, the score has been schedulled for typesetting already
564 (make-music
'Music
'void
#t
)
567 createScore
= #(define-music-function
(parser location piece children
) (string? list?
)
568 (oly
:createScoreHelper parser location piece children identity
)
570 createNoCuesScore
= #(define-music-function
(parser location piece children
) (string? list?
)
571 (oly
:createScoreHelper parser location piece children cuefilter
)
574 createHeadline
= #(define-music-function
(parser location headline
) (string?
)
575 (oly
:add-toc-item parser
'tocItemMarkup headline
)
576 (oly
:score
_handler parser
(list
(oly
:piece-title-markup headline
)))
577 (make-music
'Music
'void
#t
)
582 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
583 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
585 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
586 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
588 % set the cue instrument name
589 setCue
= #(define-music-function
(parser location instr
) (string?
)
590 #{ \set Voice
.instrumentCueName
= $instr
#} )
592 % generate a cue music section with instrument names
593 % Parameters: \namedCueDuring NameOfQuote CueDirection CueInstrument OriginalInstrument music
594 % -) NameOfQuote CueDirection music are the parameters for \cueDuring
595 % -) CueInstrument and OriginalInstrument are the displayed instrument names
597 % \namedCueDuring #"vIQuote" #UP #"V.I" #"Sop." { R1*3 }
598 % This adds the notes from vIQuote (defined via \addQuote) to three measures, prints "V.I" at
599 % the beginning of the cue notes and "Sop." at the end
600 namedCueDuring
= #(define-music-function
(parser location cuevoice direction instrcue instr cuemusic
) (string? number? string? string? ly
:music?
)
602 \cueDuring #$cuevoice
#$direction
{ \tag #'cued
\setCue #$instrcue $cuemusic
\tag #'cued
\setCue #$instr
}
603 % \tag #'uncued $cuemusic
606 namedTransposedCueDuring
= #(define-music-function
(parser location cuevoice direction instrcue instr trans cuemusic
) (string? number? string? string? ly
:music? ly
:music?
)
608 \transposedCueDuring #$cuevoice
#$direction $trans
{ \tag #'cued
\setCue #$instrcue $cuemusic
\tag #'cued
\setCue #$instr
}
609 % \tag #'uncued $cuemusic
613 % set the cue instrument name and clef
614 setClefCue
= #(define-music-function
(parser location instr clef
)
617 \once \override Staff
.Clef
#'font-size
= #-
3 $clef
618 \set Voice
.instrumentCueName
= $instr
621 % generate a cue music section with instrument names and clef changes
622 % Parameters: \cleffedCueDuring NameOfQuote CueDirection CueInstrument CueClef OriginalInstrument OriginalClef music
623 % -) NameOfQuote CueDirection music are the parameters for \cueDuring
624 % -) CueInstrument and OriginalInstrument are the displayed instrument names
625 % -) CueClef and OriginalClef are the clefs for the the cue notes and the clef of the containing voice
627 % \cleffedCueDuring #"vIQuote" #UP #"V.I" #"treble" #"Basso" #"bass" { R1*3 }
628 % This adds the notes from vIQuote (defined via \addQuote) to three measures, prints "V.I" at
629 % the beginning of the cue notes and "Basso" at the end. The clef is changed to treble at the
630 % beginning of the cue notes and reset to bass at the end
631 cleffedCueDuring
= #(define-music-function
(parser location cuevoice direction instrcue clefcue instr clefinstr cuemusic
)
632 (string? number? string? ly
:music? string? ly
:music? ly
:music?
)
634 \cueDuring #$cuevoice
#$direction
{ \tag #'cued
\setClefCue #$instrcue $clefcue $cuemusic
\tag #'cued
\setClefCue #$instr $clefinstr
}
635 % \tag #'uncued $cuemusic
642 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
643 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
645 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
646 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
648 tempoMark
= #(define-music-function
(parser location padding marktext
) (number? string?
)
650 \once \override Score
. RehearsalMark
#'padding
= $padding
651 \mark \markup { \bold \smaller $marktext
}
654 shiftDynamics
= #(define-music-function
(parser location xshift yshift
) (number? number?
)
656 \once \override DynamicTextSpanner
#'padding
= $yshift
657 \once\override DynamicText
#'extra-offset
= #(cons $xshift $yshift
)
660 ffz
= #(make-dynamic-script
"ffz")
661 pf
= #(make-dynamic-script
"pf")
662 sempp
= #(make-dynamic-script
(markup
#:line
( #:with-dimensions
'(0 . 0)
663 '(0 . 0) #:right-align
#:normal-text
#:italic
"sempre" #:dynamic
"pp")))
664 parenf
= #(make-dynamic-script
(markup
#:line
(#:normal-text
#:italic
#:fontsize
2 "(" #:dynamic
"f" #:normal-text
#:italic
#:fontsize
2 ")" )))
665 parenp
= #(make-dynamic-script
(markup
#:line
(#:normal-text
#:italic
#:fontsize
2 "(" #:dynamic
"p" #:normal-text
#:italic
#:fontsize
2 ")" )))
669 dim
= #(make-span-event
'DecrescendoEvent START
)
670 enddim
= #(make-span-event
'DecrescendoEvent STOP
)
671 decresc
= #(make-span-event
'DecrescendoEvent START
)
672 enddecresc
= #(make-span-event
'DecrescendoEvent STOP
)
673 cresc
= #(make-span-event
'CrescendoEvent START
)
674 endcresc
= #(make-span-event
'CrescendoEvent STOP
)
677 \set crescendoText
= \markup { \italic "cresc." }
678 \set crescendoSpanner
= #'text
679 \override DynamicTextSpanner
#'style
= #'dashed-line
682 \set decrescendoText
= \markup { \italic "decresc." }
683 \set crescendoSpanner
= #'text
684 \override DynamicTextSpanner
#'style
= #'dashed-line
687 \set decrescendoText
= \markup { \italic "dim." }
688 \set crescendoSpanner
= #'text
689 \override DynamicTextSpanner
#'style
= #'dashed-line
692 newOrOldClef
= #(define-music-function
(parser location new old
) (string? string?
)
693 (if
(ly
:get-option
'old-clefs
) #{ \clef $old
#} #{ \clef $new
#})
698 %%% Thanks to "Gilles THIBAULT" <gilles.thibault@free.fr>, there is a way
699 % to remove also the fermata from R1-\fermataMarkup: By filtering the music
700 % and removing the corresponding events.
701 % Documented as an LSR snippet: http://lsr.dsi.unimi.it/LSR/Item?id=372
702 #(define
(filterOneEventsMarkup event
)
703 ( let
( (eventname
(ly
:music-property event
'name
)) )
705 (or ;; add here event name you do NOT want
706 (eq? eventname
'MultiMeasureTextEvent
)
707 (eq? eventname
'AbsoluteDynamicEvent
)
708 (eq? eventname
'TextScriptEvent
)
709 (eq? eventname
'ArticulationEvent
)
710 (eq? eventname
'CrescendoEvent
)
711 (eq? eventname
'DecrescendoEvent
)
716 filterArticulations
= #(define-music-function
(parser location music
) (ly
:music?
)
717 Â Â
(music-filter filterOneEventsMarkup music
)
730 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
731 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
732 %%%%% REST COMBINATION
733 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
734 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
738 %% REST COMBINING, TAKEN FROM http://lsr.dsi.unimi.it/LSR/Item?id=336
741 %% \new Staff \with {
742 %% \override RestCollision #'positioning-done = #merge-rests-on-positioning
743 %% } << \somevoice \\ \othervoice >>
748 %% \override RestCollision #'positioning-done = #merge-rests-on-positioning
753 %% - only handles two voices
754 %% - does not handle multi-measure/whole-measure rests
756 #(define
(rest-score r
)
758 (yoff
(ly
:grob-property-data r
'Y-offset
))
759 (sp
(ly
:grob-property-data r
'staff-position
)))
761 (set
! score
(+ score
2))
762 (if
(eq? yoff
'calculation-in-progress
)
763 (set
! score
(- score
3))))
766 (set
! score
(+ score
2))
767 (set
! score
(- score
(abs
(-
1 sp
)))))
770 #(define
(merge-rests-on-positioning grob
)
771 (let
* ((can-merge
#f)
772 (elts
(ly
:grob-object grob
'elements
))
773 (num-elts
(and
(ly
:grob-array? elts
)
774 (ly
:grob-array-length elts
)))
775 (two-voice?
(= num-elts
2)))
777 (let
* ((v
1-grob
(ly
:grob-array-ref elts
0))
778 (v
2-grob
(ly
:grob-array-ref elts
1))
779 (v
1-rest
(ly
:grob-object v
1-grob
'rest
))
780 (v
2-rest
(ly
:grob-object v
2-grob
'rest
)))
784 (let
* ((v
1-duration-log
(ly
:grob-property v
1-rest
'duration-log
))
785 (v
2-duration-log
(ly
:grob-property v
2-rest
'duration-log
))
786 (v
1-dot
(ly
:grob-object v
1-rest
'dot
))
787 (v
2-dot
(ly
:grob-object v
2-rest
'dot
))
788 (v
1-dot-count
(and
(ly
:grob? v
1-dot
)
789 (ly
:grob-property v
1-dot
'dot-count -
1)))
790 (v
2-dot-count
(and
(ly
:grob? v
2-dot
)
791 (ly
:grob-property v
2-dot
'dot-count -
1))))
794 (number? v
1-duration-log
)
795 (number? v
2-duration-log
)
796 (= v
1-duration-log v
2-duration-log
)
797 (eq? v
1-dot-count v
2-dot-count
)))
799 ;; keep the rest that looks best
:
800 (let
* ((keep-v
1?
(>= (rest-score v
1-rest
)
801 (rest-score v
2-rest
)))
802 (rest-to-keep
(if keep-v
1? v
1-rest v
2-rest
))
803 (dot-to-kill
(if keep-v
1? v
2-dot v
1-dot
)))
804 ;; uncomment if you
're curious of which rest was chosen
:
805 ;;
(ly
:grob-set-property
! v
1-rest
'color green
)
806 ;;
(ly
:grob-set-property
! v
2-rest
'color blue
)
807 (ly
:grob-suicide
! (if keep-v
1? v
2-rest v
1-rest
))
808 (if
(ly
:grob? dot-to-kill
)
809 (ly
:grob-suicide
! dot-to-kill
))
810 (ly
:grob-set-property
! rest-to-keep
'direction
0)
811 (ly
:rest
::y-offset-callback rest-to-keep
)))))))
814 (ly
:rest-collision
::calc-positioning-done grob
))))
820 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
821 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
822 %%%%% TABLE OF CONTENTS
823 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
824 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
827 contentsTitle
= "Inhalt / Contents"
830 tocTitleMarkup
= \markup \fill-line
{
833 \override #(cons
'line-width
(* 7 cm
))
834 \line{ \fill-line
{\piece-title
{\contentsTitle} \null }}
839 tocItemMarkup
= \markup \fill-line
{
842 \override #(cons
'line-width
(* 7 cm
))
843 \line { \fill-line
{\fromproperty #'toc
:text
\fromproperty #'toc
:page
}}
850 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
851 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
852 %%%%% TITLE PAGE / HEADER
853 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
854 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
856 #(define-markup-command
(when-property layout props symbol markp
) (symbol? markup?
)
857 (if
(chain-assoc-get symbol props
)
858 (interpret-markup layout props markp
)
859 (ly
:make-stencil
'() '(1 . -
1) '(1 . -
1))))
861 #(define-markup-command
(vspace layout props amount
) (number?
)
862 "This produces a invisible object taking vertical space."
863 (let
((amount
(* amount
3.0)))
865 (ly
:make-stencil
"" (cons -
1 1) (cons
0 amount
))
866 (ly
:make-stencil
"" (cons -
1 1) (cons amount amount
)))))
870 titlePageMarkup
= \markup { \fontsize #2 \when-property
#'header
:title
\column {
872 \fill-line
{ \fontsize #8 \fromproperty #'header
:composer
}
874 \fill-line
{ \fontsize #8 \fromproperty #'header
:poet
}
876 \fill-line
{ \fontsize #10 \bold \fromproperty #'header
:titlepagetitle
}
878 \fontsize #2 \when-property
#'header
:enteredby
{
879 \fill-line
{ \fromproperty #'header
:subtitle
}
882 \fill-line
{ \postscript #"-20 0 moveto 40 0 rlineto stroke" }
884 \fill-line
{ \fontsize #5 \fromproperty #'header
:ensemble
}
886 \fill-line
{ \fontsize #2 \fromproperty #'header
:instruments
}
888 \fill-line
{ \fontsize #5 \fromproperty #'header
:date
}
890 \fill-line
{ \fontsize #5 \fromproperty #'header
:scoretype
}
892 \fontsize #2 \when-property
#'header
:enteredby
{
893 \fill-line
{ "Herausgegeben von: / Edited by:"}
895 \fill-line
{ \fromproperty #'header
:enteredby
}
898 \when-property
#'header
:arrangement
\column {
900 \fill-line
{ \fontsize #3 \fromproperty #'header
:arrangement
}
906 titleHeaderMarkup
= \markup {
907 \override #'(baseline-skip
. 3.5)
909 \override #'(baseline-skip
. 3.5)
913 \bigger \fromproperty #'header
:title
916 \large \smaller \bold
917 \bigger \fromproperty #'header
:subtitle
921 \fromproperty #'header
:subsubtitle
924 { \large \bold \fromproperty #'header
:instrument
}
927 \fromproperty #'header
:poet
928 \fromproperty #'header
:composer
931 \fromproperty #'header
:meter
932 \fromproperty #'header
:arranger
938 titleScoreMarkup
= \markup \piece-title
\fromproperty #'header
:piece
941 scoreTitleMarkup
= \titleScoreMarkup
942 bookTitleMarkup
= \titleHeaderMarkup
947 %%%%%%%%%%%%%% headers and footers %%%%%%%%%%%%%%%%%%%%%%%%%%
949 #(define
(first-score-page layout props arg
)
950 (let
* ((label
'first-score-page
)
951 (table
(ly
:output-def-lookup layout
'label-page-table
))
952 (label-page
(and
(list? table
) (assoc label table
)))
953 (page-number
(and label-page
(cdr label-page
)))
955 (if
(eq?
(chain-assoc-get
'page
:page-number props -
1) page-number
)
956 (interpret-markup layout props arg
)
959 #(define no-header-table
'())
960 thisPageNoHeader
= #(define-music-function
(parser location
) ()
961 (let
* ((label
(gensym
"header")))
962 (set
! no-header-table
(cons label no-header-table
))
968 % TODO: Use the no-header-table!
969 #(define
(is-header-page layout props arg
)
970 (let
* ((page-number
(chain-assoc-get
'page
:page-number props -
1))
972 (if
(and
(> page-number
2) (!= page-number
7))
973 (interpret-markup layout props arg
)
976 #(define no-footer-table
'())
977 thisPageNoFooter
= #(define-music-function
(parser location
) ()
978 (let
* ((label
(gensym
"footer")))
979 (set
! no-footer-table
(cons label no-footer-table
))
984 % TODO: Use the no-footer-table!
985 #(define
(is-footer-page layout props arg
)
986 (let
* ((page-number
(chain-assoc-get
'page
:page-number props -
1))
987 (label
'first-score-page
)
988 (table
(ly
:output-def-lookup layout
'label-page-table
))
989 (label-page
(and
(list? table
) (assoc label table
)))
990 ;
(page-number
(and label-page
(cdr label-page
)))
992 (if
(and
(> page-number
2) (!= page-number
7))
993 (interpret-markup layout props arg
)
997 #(define copyright-footer-table
'())
998 thisPageCopyrightFooter
= #(define-music-function
(parser location
) ()
999 (let
* ((label
(gensym
"copyrightfooter")))
1000 (set
! copyright-footer-table
(cons label copyright-footer-table
))
1003 'page-label label
)))
1005 % TODO: Use the copyright-footer-table!
1006 #(define
(copyright-page layout props arg
)
1007 (if
(= (chain-assoc-get
'page
:page-number props -
1) 7)
1008 (interpret-markup layout props arg
)
1013 oddHeaderMarkup
= \markup \fill-line
{
1014 %% force the header to take some space, otherwise the
1015 %% page layout becomes a complete mess.
1017 \on-the-fly
#is-header-page
\fromproperty #'header
:title
1018 \on-the-fly
#is-header-page
\fromproperty #'page
:page-number-string
1020 evenHeaderMarkup
= \markup \fill-line
{
1021 \on-the-fly
#is-header-page
\fromproperty #'page
:page-number-string
1022 \on-the-fly
#is-header-page
\fromproperty #'header
:composer
1026 oddFooterMarkup
= \markup {
1029 %% publisher header field only on title page.
1030 \on-the-fly
#first-page
\fromproperty #'header
:publisher
1033 %% copyright on the first real score page
1034 \on-the-fly
#copyright-page
\fromproperty #'header
:copyright
1035 \on-the-fly
#copyright-page
\null
1038 %% All other pages get the number of the edition centered
1039 \on-the-fly
#is-footer-page
\fromproperty #'header
:scorenumber
1056 % Interpret the given markup with the header fields added to the props.
1057 % This way, one can re-use the same functions (using fromproperty
1058 % #'header:field) in the header block and as top-level markup.
1060 % This function is originally copied from mark-up-title (file scm/titling.scm),
1061 % which is lilypond's internal function to handle the title markups. I needed
1062 % to replace the scopes and manually add the $defaultheader (which is internally
1063 % done in paper-book.cc before calling mark-up-title. Also, I don't extract the
1064 % markup from the header block, but use the given markup.
1066 % I'm not sure if I really need the page properties in props, too... But I
1067 % suppose it does not hurt, either.
1068 #(define-markup-command
(markupWithHeader layout props markup
) (markup?
)
1069 "Interpret the given markup with the header fields added to the props.
1070 This way, one can re-use the same functions (using fromproperty
1071 #'header:field) in the header block and as top-level markup."
1073 ; TODO
: I
f we are inside
a score
, add the score
's local header block
, too
!
1074 ; Currently
, I only use the global header block
, stored in $defaultheader
1075 (scopes
(list $defaultheader
))
1076 (alists
(map ly
:module-
>alist scopes
))
1079 (map
(lambda
(alist
)
1080 (map
(lambda
(entry
)
1082 (string-
>symbol
(string-append
"header:" (symbol-
>string
(car entry
))))
1086 (props
(append prefixed-alist
1088 (layout-extract-page-properties layout
)))
1090 (interpret-markup layout props markup
)
1099 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1100 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1101 %%%%% Equally spacing multiple columns (e.g. for translations)
1102 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1103 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1105 % Credits: Nicolas Sceaux on the lilypond-user mailinglist
1106 #(define-markup-command
(columns layout props args
) (markup-list?
)
1107 (let
((line-width
(/ (chain-assoc-get
'line-width props
1108 (ly
:output-def-lookup layout
'line-width
))
1109 (max
(length args
) 1))))
1110 (interpret-markup layout props
1111 (make-line-markup
(map
(lambda
(line
)
1112 (markup
#:pad-to-box `
(0 . ,line-width
) '(0 . 0)
1113 #:override `
(line-width
. ,line-width
)
1118 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1119 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1120 %%%%% Defaults for instrument names, short names, cue names, etc.
1121 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1122 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1124 %%% Clef definitions, either old-style (using the Breitkopf style) or new style
1125 FlClef
= \clef "treble"
1128 O
bClef
= \clef "treble"
1131 ClIClef
= \clef "treble"
1133 FagClef
= \clef "bass"
1135 FagIIClef
= \FagClef
1136 CFagClef
= \clef "bass"
1137 CorClef
= \clef "treble"
1139 CorIIClef
= \CorClef
1143 TrIIIClef
= \clef "bass"
1144 TbeIClef
= \clef "treble"
1145 TbeIIClef
= \clef "treble"
1146 TimClef
= \clef "bass"
1147 VClef
= \clef "treble"
1150 V
aClef
= \clef "alto"
1153 V
cBClef
= \clef "bass"
1156 SClef
= \clef "treble"
1157 AClef
= \clef "treble"
1158 TClef
= \clef "treble_8"
1159 BClef
= \clef "bass"
1164 OIClef
= \clef "treble"
1165 OIIClef
= \clef "bass"
1169 FlInstrumentName
= "Flauti"
1170 FlIInstrumentName
= "Flauto I"
1171 FlIIInstrumentName
= "Flauto II"
1172 O
bInstrumentName
= "Oboi"
1173 O
bIInstrumentName
= "Oboe I"
1174 O
bIIInstrumentName
= "Oboe II"
1175 ClInstrumentName
= "Clarinetti"
1176 ClIInstrumentName
= "Clarinetto I"
1177 ClIIInstrumentName
= "Clarinetto II"
1178 FagInstrumentName
= "Fagotti"
1179 FagIInstrumentName
= "Fagotto I"
1180 FagIIInstrumentName
= "Fagotto II"
1181 CFagInstrumentName
= "Contrafagotto"
1182 CorInstrumentName
= "Corni"
1183 CorIInstrumentName
= "Corno I"
1184 CorIIInstrumentName
= "Corno II"
1185 TrInstrumentName
= "Tromboni"
1186 TrIInstrumentName
= "Trombone I"
1187 TrIIInstrumentName
= "Trombone II"
1188 TrIIIInstrumentName
= "Trombone III"
1189 TbeInstrumentName
= "Trombe"
1190 TbeIInstrumentName
= "Tromba I"
1191 TbeIIInstrumentName
= "Tromba II"
1192 TimInstrumentName
= "Timpani"
1193 VIInstrumentName
= "Violino I"
1194 VIIInstrumentName
= "Violino II"
1195 V
aInstrumentName
= "Viola"
1196 V
aIInstrumentName
= "Viola I"
1197 V
aIIInstrumentName
= "Viola II"
1198 V
cBInstrumentName
= \markup {\column { "Cello e" "Contrabbasso"}}
1199 V
cInstrumentName
="Violoncello"
1200 C
bInstrumentName
="Basso"
1201 SInstrumentName
= "Soprano"
1202 AInstrumentName
= "Alto"
1203 TInstrumentName
= "Tenore"
1204 BInstrumentName
= "Basso"
1205 SSoloInstrumentName
= "Soprano Solo"
1206 TSoloInstrumentName
= "Tenore Solo"
1207 BSoloInstrumentName
= "Basso Solo"
1208 ASoloInstrumentName
= "Alto Solo"
1209 OInstrumentName
= "Organo"
1211 C
hInstrumentTitle
= "Coro"
1214 FlShortInstrumentName
= "Fl."
1215 FlIShortInstrumentName
= "Fl. I"
1216 FlIIShortInstrumentName
= "Fl. II"
1217 O
bShortInstrumentName
= "Ob."
1218 O
bIShortInstrumentName
= "Ob. I"
1219 O
bIIShortInstrumentName
= "Ob. II"
1220 ClShortInstrumentName
= "Cl."
1221 ClIShortInstrumentName
= "Cl.I"
1222 ClIIShortInstrumentName
= "Cl.II"
1223 FagShortInstrumentName
= "Fag."
1224 FagIShortInstrumentName
= "Fag. I"
1225 FagIIShortInstrumentName
= "Fag. II"
1226 CFagShortInstrumentName
= "Cfag."
1227 CorShortInstrumentName
= "Cor."
1228 CorIShortInstrumentName
= "Cor.I"
1229 CorIIShortInstrumentName
= "Cor.II"
1230 TrShortInstrumentName
= "Tr."
1231 TrIShortInstrumentName
= "Tr. I"
1232 TrIIShortInstrumentName
= "Tr. II"
1233 TrIIIShortInstrumentName
= "Tr. III"
1234 TbeShortInstrumentName
= "Tbe."
1235 TbeIShortInstrumentName
= "Tbe.I"
1236 TbeIIShortInstrumentName
= "Tbe.II"
1237 TimShortInstrumentName
= "Tim."
1238 VIShortInstrumentName
= "V.I"
1239 VIIShortInstrumentName
= "V.II"
1240 V
aShortInstrumentName
= "Va."
1241 V
aIShortInstrumentName
= "Va.I"
1242 V
aIIShortInstrumentName
= "Va.II"
1243 V
cBShortInstrumentName
= \markup{\column{"Vc." "e B."}}
1244 V
cShortInstrumentName
= "Vc."
1245 C
bShortInstrumentName
= "B."
1246 SShortInstrumentName
= "S."
1247 AShortInstrumentName
= "A."
1248 TShortInstrumentName
= "T."
1249 BShortInstrumentName
= "B."
1250 SSoloShortInstrumentName
= "S.Solo"
1251 ASoloShortInstrumentName
= "A.Solo"
1252 TSoloShortInstrumentName
= "T.Solo"
1253 BSoloShortInstrumentName
= "B.Solo"
1254 OShortInstrumentName
= "Org."
1258 newInstrument
= #(define-music-function
(parser location instr
) (string?
)
1260 \set Voice
.instrumentCueName
= #$
(string-join
(list
"+" instr
))
1263 cueText
= #(define-music-function
(parser location instr
) (string?
)
1265 \set Voice
.instrumentCueName
= $instr
1296 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1297 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1298 %%%%% SCORE NUMBERS FOR PUBLISHING
1299 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1300 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1303 #(define-markup-command
(scoreNumber layout props nr
) (markup?
)
1304 (interpret-markup layout props
(markup
(format
"~a-~a" EKnumber nr
)))
1307 FullScoreNumber
= "1"
1308 PianoScoreNumber
= "2"
1309 VocalScoreNumber
= "3"
1311 ChoirScoreNumber
= "10"
1316 SoloScoreNumber
= "15"
1324 InstrumentsNumber
= "25"
1354 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1355 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1356 %%%%% SCORE (HEADER / LAYOUT) SETTINGS
1357 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1358 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1364 bottom-margin
= 1\cm
1366 % after-title-space = 0.5\cm
1368 ragged-last-bottom
= ##f
1373 % If only one non-empty staff in a system exists, still print the backet
1374 \override SystemStartBracket
#'collapse-height
= #1
1375 \consists "Instrument_name_engraver"
1379 % If only one non-empty staff in a system exists, still print the backet
1380 \override SystemStartBracket
#'collapse-height
= #1
1381 \consists "Instrument_name_engraver"
1385 \override SystemStartBracket
#'collapse-height
= #1
1386 \consists "Instrument_name_engraver"
1390 % Force multi-measure rests to be written as one span
1391 \override MultiMeasureRest
#'expand-limit
= #3
1394 % hairpinToBarline = ##f
1395 \override BarNumber
#'break-visibility
= #end-of-line-invisible
1396 \override CombineTextScript
#'avoid-slur
= #'outside
1397 barNumberVisibility
= #(every-nth-bar-number-visible
5)
1398 \override DynamicTextSpanner
#'dash-period
= #-
1.0
1399 \override InstrumentSwitch
#'font-size
= #-
1
1402 \override RestCollision
#'positioning-done
= #merge-rests-on-positioning
1403 % Auto-Accidentals: Use modern-cautionary style...
1405 autoAccidentals
= #'(Staff
(same-octave
. 0))
1406 autoCautionaries
= #'(Staff
(any-octave
. 0) (same-octave
. 1))
1407 printKeyCancellation
= ##t
1410 \RemoveEmptyStaffContext
1414 \override VerticalAxisGroup
#'minimum-Y-extent
= #'(0.5 . 0.5)
1422 \type "Engraver_group"
1424 % So that \cresc works, for example.
1426 \consists "Output_property_engraver"
1428 \override VerticalAxisGroup
#'minimum-Y-extent
= #'(-
1 . 1)
1429 pedalSustainStrings
= #'("Ped." "*Ped." "*")
1430 pedalUnaCordaStrings
= #'("una corda" "" "tre corde")
1432 \consists "Piano_pedal_engraver"
1433 \consists "Script_engraver"
1434 \consists "Dynamic_engraver"
1435 \consists "Text_engraver"
1437 \override TextScript
#'font-size
= #2
1438 \override TextScript
#'font-shape
= #'italic
1439 \override DynamicText
#'extra-offset
= #'(0 . 2.5)
1440 \override Hairpin
#'extra-offset
= #'(0 . 2.5)
1442 \consists "Skip_event_swallow_translator"
1444 \consists "Axis_group_engraver"
1449 % \override VerticalAlignment #'forced-distance = #7