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
Branches
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@
<$- endif $>
\header {
instrument = \<< instrument >>InstrumentName
scorenumber = \markup{\scoreNumber \<< instrument>>Number}
instrumentnr = \<< instrument>>Number
}
<$ for p in parts -$>
......
......@@ -7,7 +7,7 @@
\header {
scoretype = \<< score >>Title
scorenumber = \markup{\scoreNumber \<< score >>Number}
instrumentnr = \<< score >>Number
}
<$ if score in ['OriginalScore'] -$>
SClef = \clef "soprano"
......
......@@ -2,9 +2,9 @@
\include "orchestrallily/oly_settings_names.ily"
scorenumber="<< scorenumber >>"
\header {
scorenumberbase = "<< scorenumber >>"
title = "<< title >>"
titlepagetitle = "<< title >>"
subtitle = "<< subtitle >>"
......
......@@ -6,66 +6,66 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Clef definitions, either old-style (using the Breitkopf style) or new style
FlClef = \clef "treble"
FlClef = "treble"
FlIClef = \FlClef
FlIIClef = \FlClef
ObClef = \clef "treble"
ObClef = "treble"
ObIClef = \ObClef
ObIIClef = \ObClef
ClIClef = \clef "treble"
ClIClef = "treble"
ClIIClef = \ClIClef
FagClef = \clef "bass"
FagClef = "bass"
FagIClef = \FagClef
FagIIClef = \FagClef
FagTenorClef = \clef "tenor"
CFagClef = \clef "bass"
CorClef = \clef "treble"
FagTenorClef = "tenor"
CFagClef = "bass"
CorClef = "treble"
CorIClef = \CorClef
CorIIClef = \CorClef
TrbClef = \clef "tenor"
TrbClef = "tenor"
TrbIClef = \TrbClef
TrbIIClef = \TrbClef
TrbIIIClef = \clef "bass"
TbeClef = \clef "treble"
TrbIIIClef = "bass"
TbeClef = "treble"
TbeIClef = \TbeClef
TbeIIClef = \TbeClef
ClniClef = \clef "treble"
ClniClef = "treble"
ClnoIClef = \ClniClef
ClnoIIClef = \ClniClef
TimClef = \clef "bass"
VClef = \clef "treble"
TimClef = "bass"
VClef = "treble"
VIClef = \VClef
VIIClef = \VClef
VaClef = \clef "alto"
VaClef = "alto"
VaIClef = \VaClef
VaIIClef = \VaClef
VaSoloClef = \VaClef
VcBClef = \clef "bass"
VcBClef = "bass"
VcClef = \VcBClef
VcTenorClef = \clef "tenor"
VcTenorClef = "tenor"
CbClef = \VcBClef
SClef = \clef "treble"
AClef = \clef "treble"
TClef = \clef "treble_8"
SClef = "treble"
AClef = "treble"
TClef = "treble_8"
TIClef = \TClef
TIIClef = \TClef
BClef = \clef "bass"
BClef = "bass"
BIClef = \BClef
BIIClef = \BClef
SingstimmeClef = \clef "treble"
SingstimmeClef = "treble"
SSoloClef = \SClef
ASoloClef = \AClef
TSoloClef = \TClef
BSoloClef = \BClef
OIClef = \clef "treble"
OIIClef = \clef "bass"
OIaClef = \clef "treble"
OIIaClef = \clef "bass"
OIbClef = \clef "treble"
OIIbClef = \clef "bass"
BCClef = \clef "bass"
PIClef = \clef "treble"
PIIClef = \clef "bass"
OIClef = "treble"
OIIClef = "bass"
OIaClef = "treble"
OIIaClef = "bass"
OIbClef = "treble"
OIIbClef = "bass"
BCClef = "bass"
PIClef = "treble"
PIIClef = "bass"
......
......@@ -28,6 +28,8 @@
% Use relative include pathes!
#(ly:set-option 'relative-includes #t)
\include "sceaux_clef-key.ily"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -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?)
; Append the settings, key and clef (if defined)
(map
(lambda (type)
(let* ((object (namedPieceInstrObject piece name type)))
(let* ((object (oly:processExtractedObject piece name type (namedPieceInstrObject piece name type))))
(if (ly:music? 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))
......@@ -999,12 +1008,12 @@ namedTransposedCueDuring = #(define-music-function (parser location cuevoice dir
)
% set the cue instrument name and clef
setClefCue = #(define-music-function (parser location instr clef)
(string? ly:music?)
#{
\once \override Staff.Clef #'font-size = #-3 #clef
\insertCueText #instr
#} )
% setClefCue = #(define-music-function (parser location instr clef)
% (string? ly:music?)
% #{
% \once \override Staff.Clef #'font-size = #-3 \clef $clef
% \insertCueText $instr
% #} )
% generate a cue music section with instrument names and clef changes
% Parameters: \cleffedCueDuring NameOfQuote CueDirection CueInstrument CueClef OriginalInstrument OriginalClef music
......@@ -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
% 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)
(string? number? string? ly:music? string? ly:music? ly:music?)
(string? number? string? string? string? string? ly:music?)
#{
\cueDuring #cuevoice #direction {
\tag #'cued \setClefCue #instrcue #clefcue
#cuemusic
\tag #'cued \setClefCue #instr #clefinstr
}
\namedCueDuringWithClef $cuevoice $direction $instrcue $clefcue $instr $cuemusic
#}
)
% generate a cue music section with instrument names and clef changes
......@@ -1032,14 +1037,14 @@ cleffedCueDuring = #(define-music-function (parser location cuevoice direction i
% -) CueInstrument and OriginalInstrument are the displayed instrument names
% -) CueClef is the clef for the the cue notes
% 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
% 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
namedCueDuringWithClef = #(define-music-function (parser location cuevoice direction instrcue clefcue instr cuemusic)
(string? number? string? string? string? ly:music?)
#{
\cueDuringWithClef #cuevoice #direction #clefcue {
\cueDuringWithClef #cuevoice #direction #(extract-ancient-or-modern-clef clefcue) {
\insertCueText #instrcue
#cuemusic
\insertCueText #instr
......@@ -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"))
cresc = #(make-music 'CrescendoEvent 'span-direction START
'span-type 'text 'span-text "cresc.")
dim = #(make-music 'DecrescendoEvent 'span-direction START
'span-type 'text 'span-text "dim.")
decresc = #(make-music 'DecrescendoEvent 'span-direction START
'span-type 'text 'span-text "decresc.")
% cresc = #(make-music 'CrescendoEvent 'span-direction START
% 'span-type 'text 'span-text "cresc.")
% dim = #(make-music 'DecrescendoEvent 'span-direction START
% 'span-type 'text 'span-text "dim.")
% decresc = #(make-music 'DecrescendoEvent 'span-direction START
% 'span-type 'text 'span-text "decresc.")
sim = ^\markup{\italic "sim."}
......@@ -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" }}
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 @@
;; unly use modern clef, if no ancient clef given
(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 =
#(define-music-function (parser location clef-name) (string?)
(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