Skip to content
Snippets Groups Projects
Commit 610627ea authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Update to new lilypond features (header field handling, cue clefs as string, etc.)

parent adc678ae
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<$- endif $> <$- endif $>
\header { \header {
instrument = \<< instrument >>InstrumentName instrument = \<< instrument >>InstrumentName
scorenumber = \markup{\scoreNumber \<< instrument>>Number} instrumentnr = \<< instrument>>Number
} }
<$ for p in parts -$> <$ for p in parts -$>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
\header { \header {
scoretype = \<< score >>Title scoretype = \<< score >>Title
scorenumber = \markup{\scoreNumber \<< score >>Number} instrumentnr = \<< score >>Number
} }
<$ if score in ['OriginalScore'] -$> <$ if score in ['OriginalScore'] -$>
SClef = \clef "soprano" SClef = \clef "soprano"
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
\include "orchestrallily/oly_settings_names.ily" \include "orchestrallily/oly_settings_names.ily"
scorenumber="<< scorenumber >>"
\header { \header {
scorenumberbase = "<< scorenumber >>"
title = "<< title >>" title = "<< title >>"
titlepagetitle = "<< title >>" titlepagetitle = "<< title >>"
subtitle = "<< subtitle >>" subtitle = "<< subtitle >>"
......
...@@ -6,66 +6,66 @@ ...@@ -6,66 +6,66 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Clef definitions, either old-style (using the Breitkopf style) or new style %%% Clef definitions, either old-style (using the Breitkopf style) or new style
FlClef = \clef "treble" FlClef = "treble"
FlIClef = \FlClef FlIClef = \FlClef
FlIIClef = \FlClef FlIIClef = \FlClef
ObClef = \clef "treble" ObClef = "treble"
ObIClef = \ObClef ObIClef = \ObClef
ObIIClef = \ObClef ObIIClef = \ObClef
ClIClef = \clef "treble" ClIClef = "treble"
ClIIClef = \ClIClef ClIIClef = \ClIClef
FagClef = \clef "bass" FagClef = "bass"
FagIClef = \FagClef FagIClef = \FagClef
FagIIClef = \FagClef FagIIClef = \FagClef
FagTenorClef = \clef "tenor" FagTenorClef = "tenor"
CFagClef = \clef "bass" CFagClef = "bass"
CorClef = \clef "treble" CorClef = "treble"
CorIClef = \CorClef CorIClef = \CorClef
CorIIClef = \CorClef CorIIClef = \CorClef
TrbClef = \clef "tenor" TrbClef = "tenor"
TrbIClef = \TrbClef TrbIClef = \TrbClef
TrbIIClef = \TrbClef TrbIIClef = \TrbClef
TrbIIIClef = \clef "bass" TrbIIIClef = "bass"
TbeClef = \clef "treble" TbeClef = "treble"
TbeIClef = \TbeClef TbeIClef = \TbeClef
TbeIIClef = \TbeClef TbeIIClef = \TbeClef
ClniClef = \clef "treble" ClniClef = "treble"
ClnoIClef = \ClniClef ClnoIClef = \ClniClef
ClnoIIClef = \ClniClef ClnoIIClef = \ClniClef
TimClef = \clef "bass" TimClef = "bass"
VClef = \clef "treble" VClef = "treble"
VIClef = \VClef VIClef = \VClef
VIIClef = \VClef VIIClef = \VClef
VaClef = \clef "alto" VaClef = "alto"
VaIClef = \VaClef VaIClef = \VaClef
VaIIClef = \VaClef VaIIClef = \VaClef
VaSoloClef = \VaClef VaSoloClef = \VaClef
VcBClef = \clef "bass" VcBClef = "bass"
VcClef = \VcBClef VcClef = \VcBClef
VcTenorClef = \clef "tenor" VcTenorClef = "tenor"
CbClef = \VcBClef CbClef = \VcBClef
SClef = \clef "treble" SClef = "treble"
AClef = \clef "treble" AClef = "treble"
TClef = \clef "treble_8" TClef = "treble_8"
TIClef = \TClef TIClef = \TClef
TIIClef = \TClef TIIClef = \TClef
BClef = \clef "bass" BClef = "bass"
BIClef = \BClef BIClef = \BClef
BIIClef = \BClef BIIClef = \BClef
SingstimmeClef = \clef "treble" SingstimmeClef = "treble"
SSoloClef = \SClef SSoloClef = \SClef
ASoloClef = \AClef ASoloClef = \AClef
TSoloClef = \TClef TSoloClef = \TClef
BSoloClef = \BClef BSoloClef = \BClef
OIClef = \clef "treble" OIClef = "treble"
OIIClef = \clef "bass" OIIClef = "bass"
OIaClef = \clef "treble" OIaClef = "treble"
OIIaClef = \clef "bass" OIIaClef = "bass"
OIbClef = \clef "treble" OIbClef = "treble"
OIIbClef = \clef "bass" OIIbClef = "bass"
BCClef = \clef "bass" BCClef = "bass"
PIClef = \clef "treble" PIClef = "treble"
PIIClef = \clef "bass" PIIClef = "bass"
......
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
% Use relative include pathes! % Use relative include pathes!
#(ly:set-option 'relative-includes #t) #(ly:set-option 'relative-includes #t)
\include "sceaux_clef-key.ily"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...@@ -365,6 +367,13 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) ...@@ -365,6 +367,13 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?)
) )
) )
%% Process the extracted object, e.g. wrap \clef around the
%% string for "type"=="Clef", etc.
% This allows a more fine-grained post-processing of the global vars
#(define (oly:processExtractedObject piece name type object)
(if (and (string=? type "Clef") (string? object))
(make-ancient-or-modern-clef object) ;; Use Nicolas Sceaux' old/modern clef notation
object))
...@@ -378,7 +387,7 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) ...@@ -378,7 +387,7 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?)
; Append the settings, key and clef (if defined) ; Append the settings, key and clef (if defined)
(map (map
(lambda (type) (lambda (type)
(let* ((object (namedPieceInstrObject piece name type))) (let* ((object (oly:processExtractedObject piece name type (namedPieceInstrObject piece name type))))
(if (ly:music? object) (if (ly:music? object)
(set! musiccontent (append musiccontent (list (ly:music-deep-copy object)))) (set! musiccontent (append musiccontent (list (ly:music-deep-copy object))))
(if (not-null? object) (ly:warning (_ "Wrong type (no ly:music) for ~S for instrument ~S in piece ~S") type name piece)) (if (not-null? object) (ly:warning (_ "Wrong type (no ly:music) for ~S for instrument ~S in piece ~S") type name piece))
...@@ -999,12 +1008,12 @@ namedTransposedCueDuring = #(define-music-function (parser location cuevoice dir ...@@ -999,12 +1008,12 @@ namedTransposedCueDuring = #(define-music-function (parser location cuevoice dir
) )
% set the cue instrument name and clef % set the cue instrument name and clef
setClefCue = #(define-music-function (parser location instr clef) % setClefCue = #(define-music-function (parser location instr clef)
(string? ly:music?) % (string? ly:music?)
#{ % #{
\once \override Staff.Clef #'font-size = #-3 #clef % \once \override Staff.Clef #'font-size = #-3 \clef $clef
\insertCueText #instr % \insertCueText $instr
#} ) % #} )
% generate a cue music section with instrument names and clef changes % generate a cue music section with instrument names and clef changes
% Parameters: \cleffedCueDuring NameOfQuote CueDirection CueInstrument CueClef OriginalInstrument OriginalClef music % Parameters: \cleffedCueDuring NameOfQuote CueDirection CueInstrument CueClef OriginalInstrument OriginalClef music
...@@ -1017,13 +1026,9 @@ setClefCue = #(define-music-function (parser location instr clef) ...@@ -1017,13 +1026,9 @@ setClefCue = #(define-music-function (parser location instr clef)
% the beginning of the cue notes and "Basso" at the end. The clef is changed to treble at the % the beginning of the cue notes and "Basso" at the end. The clef is changed to treble at the
% beginning of the cue notes and reset to bass at the end % beginning of the cue notes and reset to bass at the end
cleffedCueDuring = #(define-music-function (parser location cuevoice direction instrcue clefcue instr clefinstr cuemusic) cleffedCueDuring = #(define-music-function (parser location cuevoice direction instrcue clefcue instr clefinstr cuemusic)
(string? number? string? ly:music? string? ly:music? ly:music?) (string? number? string? string? string? string? ly:music?)
#{ #{
\cueDuring #cuevoice #direction { \namedCueDuringWithClef $cuevoice $direction $instrcue $clefcue $instr $cuemusic
\tag #'cued \setClefCue #instrcue #clefcue
#cuemusic
\tag #'cued \setClefCue #instr #clefinstr
}
#} #}
) )
% generate a cue music section with instrument names and clef changes % generate a cue music section with instrument names and clef changes
...@@ -1032,14 +1037,14 @@ cleffedCueDuring = #(define-music-function (parser location cuevoice direction i ...@@ -1032,14 +1037,14 @@ cleffedCueDuring = #(define-music-function (parser location cuevoice direction i
% -) CueInstrument and OriginalInstrument are the displayed instrument names % -) CueInstrument and OriginalInstrument are the displayed instrument names
% -) CueClef is the clef for the the cue notes % -) CueClef is the clef for the the cue notes
% typical call: % typical call:
% \namedCueDuringClef #"vIQuote" #UP #"V.I" #"treble" #"Basso" { R1*3 } % \namedCueDuringWithClef #"vIQuote" #UP #"V.I" #"treble" #"Basso" { R1*3 }
% This adds the notes from vIQuote (defined via \addQuote) to three measures, prints "V.I" at % This adds the notes from vIQuote (defined via \addQuote) to three measures, prints "V.I" at
% the beginning of the cue notes and "Basso" at the end. The clef is changed to treble at the % the beginning of the cue notes and "Basso" at the end. The clef is changed to treble at the
% beginning of the cue notes and reset to bass at the end % beginning of the cue notes and reset to bass at the end
namedCueDuringWithClef = #(define-music-function (parser location cuevoice direction instrcue clefcue instr cuemusic) namedCueDuringWithClef = #(define-music-function (parser location cuevoice direction instrcue clefcue instr cuemusic)
(string? number? string? string? string? ly:music?) (string? number? string? string? string? ly:music?)
#{ #{
\cueDuringWithClef #cuevoice #direction #clefcue { \cueDuringWithClef #cuevoice #direction #(extract-ancient-or-modern-clef clefcue) {
\insertCueText #instrcue \insertCueText #instrcue
#cuemusic #cuemusic
\insertCueText #instr \insertCueText #instr
...@@ -1136,12 +1141,13 @@ whiteoutf = #(make-dynamic-script (markup #:whiteout #:pad-markup 0.5 #:dynamic ...@@ -1136,12 +1141,13 @@ whiteoutf = #(make-dynamic-script (markup #:whiteout #:pad-markup 0.5 #:dynamic
whiteoutff = #(make-dynamic-script (markup #:whiteout #:pad-markup 0.5 #:dynamic "ff")) whiteoutff = #(make-dynamic-script (markup #:whiteout #:pad-markup 0.5 #:dynamic "ff"))
cresc = #(make-music 'CrescendoEvent 'span-direction START % cresc = #(make-music 'CrescendoEvent 'span-direction START
'span-type 'text 'span-text "cresc.") % 'span-type 'text 'span-text "cresc.")
dim = #(make-music 'DecrescendoEvent 'span-direction START % dim = #(make-music 'DecrescendoEvent 'span-direction START
'span-type 'text 'span-text "dim.") % 'span-type 'text 'span-text "dim.")
decresc = #(make-music 'DecrescendoEvent 'span-direction START % decresc = #(make-music 'DecrescendoEvent 'span-direction START
'span-type 'text 'span-text "decresc.") % 'span-type 'text 'span-text "decresc.")
sim = ^\markup{\italic "sim."}
...@@ -1802,7 +1808,6 @@ LicenseCCBY = \markup {Lizensiert unter / Licensed under: Creative Commons BY \w ...@@ -1802,7 +1808,6 @@ LicenseCCBY = \markup {Lizensiert unter / Licensed under: Creative Commons BY \w
LicenseCCBYNC = \markup {Lizensiert unter / Licensed under: Creative Commons BY-NC \with-url #"http://creativecommons.org/licenses/by-nc/3.0/at/" {\translate #'(0 . -0.7) \epsfile #Y #3 #"orchestrallily/cc-by-nc.eps" }} LicenseCCBYNC = \markup {Lizensiert unter / Licensed under: Creative Commons BY-NC \with-url #"http://creativecommons.org/licenses/by-nc/3.0/at/" {\translate #'(0 . -0.7) \epsfile #Y #3 #"orchestrallily/cc-by-nc.eps" }}
LicenseNoRestrictions = \markup{\line {Die Ausgabe darf kopiert und ohne Einschränkungen aufgeführt werden. / May be copied and performed without restriction.}} LicenseNoRestrictions = \markup{\line {Die Ausgabe darf kopiert und ohne Einschränkungen aufgeführt werden. / May be copied and performed without restriction.}}
\include "sceaux_clef-key.ily"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......
...@@ -213,6 +213,25 @@ ...@@ -213,6 +213,25 @@
;; unly use modern clef, if no ancient clef given ;; unly use modern clef, if no ancient clef given
(make-clef-set modern-clef))))) (make-clef-set modern-clef)))))
#(define (extract-ancient-or-modern-clef clef-name)
(let* ((match (string-match "^(.*)/(.*)$" clef-name))
(ancient-clef (cond (match (match:substring match 1))
(else #f)))
(modern-clef (cond (match (match:substring match 2))
(else clef-name))))
(cond ((eqv? #t (ly:get-option 'ancient-style))
;; ancient clef only
(if ancient-clef ancient-clef clef-name))
((eqv? #t (ly:get-option 'non-incipit))
;; modern clef only
modern-clef)
((not (eqv? #f ancient-clef))
;; modern clef + ancient clef in incipit, if different
modern-clef)
(else
;; unly use modern clef, if no ancient clef given
modern-clef))))
clef = clef =
#(define-music-function (parser location clef-name) (string?) #(define-music-function (parser location clef-name) (string?)
(make-ancient-or-modern-clef clef-name)) (make-ancient-or-modern-clef clef-name))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment