multiple stanza numbers for one verse
This commit is contained in:
@@ -121,16 +121,18 @@ override-stanza =
|
||||
#}
|
||||
)
|
||||
|
||||
stanza =
|
||||
#(define-music-function (parser location stanzanumber) (number?)
|
||||
#(define (stanza . stanzanumbers)
|
||||
#{
|
||||
\once \override StanzaNumber.layer = 23 % set this to signal that there is a real stanza and no repeat signs
|
||||
\applyContext
|
||||
#(lambda (context)
|
||||
(let* ((stanzanumber (ly:assoc-get 'forced-spacing (ly:context-grob-definition context 'StanzaNumber) stanzanumber))
|
||||
(stanzastyle (ly:assoc-get 'style (ly:context-grob-definition context 'StanzaNumber)))
|
||||
(formattedStanzaNumber (format #f (if (eq? stanzastyle 'roman) romanStanzaFormat stanzaFormat) stanzanumber)))
|
||||
(ly:context-set-property! context 'stanza formattedStanzaNumber)))
|
||||
(let* ((stanzanumber-override (ly:assoc-get 'forced-spacing (ly:context-grob-definition context 'StanzaNumber) #f))
|
||||
(stanza-style (ly:assoc-get 'style (ly:context-grob-definition context 'StanzaNumber)))
|
||||
(stanza-format (lambda (stanzanumber) (format #f (if (eq? stanza-style 'roman) romanStanzaFormat stanzaFormat) stanzanumber))))
|
||||
(ly:context-set-property! context 'stanza
|
||||
(string-join (map stanza-format
|
||||
(if stanzanumber-override (list stanzanumber-override) stanzanumbers))
|
||||
", "))))
|
||||
#}
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user