Compare commits
1 Commits
main
...
chord-spac
| Author | SHA1 | Date | |
|---|---|---|---|
| 0338f1329b |
@@ -21,17 +21,8 @@
|
|||||||
)))))
|
)))))
|
||||||
(scm-load "resolve_inherits.scm")
|
(scm-load "resolve_inherits.scm")
|
||||||
(scm-load "yaml_parser.scm")))
|
(scm-load "yaml_parser.scm")))
|
||||||
|
#(define AUTHOR_DATA (if (defined? 'AUTHOR_DATA) AUTHOR_DATA (parse-yml-file "../../lilypond-song-includes/data/authors.yml")))
|
||||||
#(define (song-includes-data-path filename)
|
#(define SONG_DATA (if (defined? 'SONG_DATA) SONG_DATA (parse-yml-file "../../lilypond-song-includes/data/songs.yml")))
|
||||||
(string-join
|
|
||||||
(list
|
|
||||||
(dirname (dirname (dirname (dirname (current-filename)))))
|
|
||||||
"lilypond-song-includes"
|
|
||||||
"data"
|
|
||||||
filename)
|
|
||||||
file-name-separator-string))
|
|
||||||
#(define AUTHOR_DATA (if (defined? 'AUTHOR_DATA) AUTHOR_DATA (parse-yml-file (song-includes-data-path "authors.yml"))))
|
|
||||||
#(define SONG_DATA (if (defined? 'SONG_DATA) SONG_DATA (parse-yml-file (song-includes-data-path "songs.yml"))))
|
|
||||||
|
|
||||||
\include "merge_rests_engraver_override.ily"
|
\include "merge_rests_engraver_override.ily"
|
||||||
\include "basic_format_and_style_settings.ily"
|
\include "basic_format_and_style_settings.ily"
|
||||||
|
|||||||
@@ -29,11 +29,6 @@
|
|||||||
(if (null? stanzanumbers)
|
(if (null? stanzanumbers)
|
||||||
refString
|
refString
|
||||||
(ly:format refStringWithNumbers (string-join (map (lambda (stanzanumber) (ly:format "~a" stanzanumber)) stanzanumbers) ", ")))))
|
(ly:format refStringWithNumbers (string-join (map (lambda (stanzanumber) (ly:format "~a" stanzanumber)) stanzanumbers) ", ")))))
|
||||||
bridgeMarkupFormatter = #(lambda (layout props stanzanumbers)
|
|
||||||
(interpret-markup layout props
|
|
||||||
(if (null? stanzanumbers)
|
|
||||||
bridgeString
|
|
||||||
(ly:format bridgeStringWithNumbers (string-join (map (lambda (stanzanumber) (ly:format "~a" stanzanumber)) stanzanumbers) ", ")))))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
generalLayout = \layout {
|
generalLayout = \layout {
|
||||||
@@ -54,7 +49,6 @@ generalLayout = \layout {
|
|||||||
\context {
|
\context {
|
||||||
\Score
|
\Score
|
||||||
\remove "Bar_number_engraver"
|
\remove "Bar_number_engraver"
|
||||||
\remove "Metronome_mark_engraver"
|
|
||||||
\RemoveEmptyStaves
|
\RemoveEmptyStaves
|
||||||
\override VerticalAxisGroup.remove-first = ##t
|
\override VerticalAxisGroup.remove-first = ##t
|
||||||
\overrideTimeSignatureSettings
|
\overrideTimeSignatureSettings
|
||||||
@@ -84,11 +78,6 @@ generalLayout = \layout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#(define (customized-layout base-layout)
|
|
||||||
(let
|
|
||||||
((custom-size (ly:output-def-lookup base-layout 'size #f)))
|
|
||||||
(if custom-size (layout-set-staff-size custom-size))))
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%%% kleine Helferlein:
|
%%% kleine Helferlein:
|
||||||
|
|
||||||
@@ -144,23 +133,18 @@ override-stanza =
|
|||||||
#}
|
#}
|
||||||
)
|
)
|
||||||
|
|
||||||
#(define (handle-stanza-numbers context numbers number-formater)
|
|
||||||
(let* ((stanzanumbers (ly:assoc-get 'custom-stanzanumber-override (ly:assoc-get 'details (ly:context-grob-definition context 'StanzaNumber) '()) numbers))
|
|
||||||
(stanza-style (ly:assoc-get 'style (ly:context-grob-definition context 'StanzaNumber)))
|
|
||||||
(roman-format (lambda (stanzanumber) (format #f "~@r" stanzanumber))))
|
|
||||||
(ly:context-set-property! context 'stanza
|
|
||||||
(number-formater
|
|
||||||
(if (eq? stanza-style 'roman)
|
|
||||||
(map roman-format stanzanumbers)
|
|
||||||
stanzanumbers)))))
|
|
||||||
|
|
||||||
#(define (stanza . stanzanumbers)
|
#(define (stanza . stanzanumbers)
|
||||||
#{
|
#{
|
||||||
\once \override StanzaNumber.details.custom-realstanza = ##t % set this to signal that there is a real stanza and no repeat signs
|
\once \override StanzaNumber.details.custom-realstanza = ##t % set this to signal that there is a real stanza and no repeat signs
|
||||||
\applyContext
|
\applyContext
|
||||||
#(lambda (context)
|
#(lambda (context)
|
||||||
(handle-stanza-numbers context stanzanumbers
|
(let* ((stanzanumbers-override (ly:assoc-get 'custom-stanzanumber-override (ly:assoc-get 'details (ly:context-grob-definition context 'StanzaNumber) '()) #f))
|
||||||
(lambda (numbers) (string-join (map (lambda (n) (format #f stanzaFormat n)) numbers) ", "))))
|
(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 stanzanumbers-override stanzanumbers-override stanzanumbers))
|
||||||
|
", "))))
|
||||||
#}
|
#}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -168,31 +152,7 @@ ref =
|
|||||||
#(define-music-function (stanzanumbers lyrics) ((number-list? (list)) ly:music?)
|
#(define-music-function (stanzanumbers lyrics) ((number-list? (list)) ly:music?)
|
||||||
#{ \lyricmode {
|
#{ \lyricmode {
|
||||||
\once \override StanzaNumber.details.custom-realstanza = ##t % set this to signal that there is a real stanza and no repeat signs
|
\once \override StanzaNumber.details.custom-realstanza = ##t % set this to signal that there is a real stanza and no repeat signs
|
||||||
\applyContext
|
\set stanza = #(make-on-the-fly-markup (lambda (layout props m) ((ly:output-def-lookup layout 'refMarkupFormatter) layout props stanzanumbers)) (make-null-markup))
|
||||||
#(lambda (context)
|
|
||||||
(handle-stanza-numbers context stanzanumbers
|
|
||||||
(lambda (numbers)
|
|
||||||
(make-on-the-fly-markup
|
|
||||||
(lambda (layout props m)
|
|
||||||
((ly:output-def-lookup layout 'refMarkupFormatter) layout props numbers))
|
|
||||||
(make-null-markup)))))
|
|
||||||
#lyrics
|
|
||||||
}
|
|
||||||
#}
|
|
||||||
)
|
|
||||||
|
|
||||||
bridge =
|
|
||||||
#(define-music-function (stanzanumbers lyrics) ((number-list? (list)) ly:music?)
|
|
||||||
#{ \lyricmode {
|
|
||||||
\once \override StanzaNumber.details.custom-realstanza = ##t % set this to signal that there is a real stanza and no repeat signs
|
|
||||||
\applyContext
|
|
||||||
#(lambda (context)
|
|
||||||
(handle-stanza-numbers context stanzanumbers
|
|
||||||
(lambda (numbers)
|
|
||||||
(make-on-the-fly-markup
|
|
||||||
(lambda (layout props m)
|
|
||||||
((ly:output-def-lookup layout 'bridgeMarkupFormatter) layout props numbers))
|
|
||||||
(make-null-markup)))))
|
|
||||||
#lyrics
|
#lyrics
|
||||||
}
|
}
|
||||||
#}
|
#}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
poetPrefix = "Worte:"
|
poetPrefix = "Worte:"
|
||||||
composerPrefix = "Weise:"
|
composerPrefix = "Weise:"
|
||||||
compositionPrefix = "Satz:"
|
compositionPrefix = "Satz:"
|
||||||
adaptionTextPrefix = "Bearbeitung:"
|
adaptionTextPrefix = "Bearbeitung Text:"
|
||||||
adaptionMusicPrefix = "Bearbeitung:"
|
adaptionMusicPrefix = "Bearbeitung Musik:"
|
||||||
poetAndComposerEqualPrefix = "Worte und Weise:"
|
poetAndComposerEqualPrefix = "Worte und Weise:"
|
||||||
voicePrefix = "Stimme:"
|
voicePrefix = "Stimme:"
|
||||||
versePrefix = "Strophe:"
|
versePrefix = "Strophe:"
|
||||||
@@ -12,7 +12,6 @@
|
|||||||
pronunciationPrefix = "Aussprache:"
|
pronunciationPrefix = "Aussprache:"
|
||||||
interludePrefix = "Zwischenspiel:"
|
interludePrefix = "Zwischenspiel:"
|
||||||
bridgePrefix = "Bridge:"
|
bridgePrefix = "Bridge:"
|
||||||
author-joiner = #(lambda (author-list) (string-join author-list ", "))
|
|
||||||
|
|
||||||
authorFormat =
|
authorFormat =
|
||||||
#(lambda (noDetails name trail_name birth_year death_year organization)
|
#(lambda (noDetails name trail_name birth_year death_year organization)
|
||||||
@@ -32,105 +31,6 @@
|
|||||||
""
|
""
|
||||||
)))
|
)))
|
||||||
|
|
||||||
authorContributionFormat =
|
|
||||||
#(lambda* (render-contribution-group render-partial-contribution-group #:key
|
|
||||||
(poetIds '())
|
|
||||||
(translatorIds '())
|
|
||||||
(versePoetData '())
|
|
||||||
(composerIds '())
|
|
||||||
(verseComposerData '())
|
|
||||||
(voiceComposerData '())
|
|
||||||
(compositionIds '())
|
|
||||||
(adaptionTextIds '())
|
|
||||||
(adaptionMusicIds '())
|
|
||||||
(bridgeIds '())
|
|
||||||
(interludeIds '())
|
|
||||||
(year_text #f)
|
|
||||||
(year_translation #f)
|
|
||||||
(year_melody #f)
|
|
||||||
(year_composition #f)
|
|
||||||
(year_adaption_text #f)
|
|
||||||
(year_adaption_music #f)
|
|
||||||
(poetAndComposerEqualPrefix "")
|
|
||||||
(poetPrefix "")
|
|
||||||
(composerPrefix "")
|
|
||||||
(translationPrefix "")
|
|
||||||
(pronunciationPrefix "")
|
|
||||||
(compositionPrefix "")
|
|
||||||
(adaptionTextPrefix "")
|
|
||||||
(adaptionMusicPrefix "")
|
|
||||||
(bridgePrefix "")
|
|
||||||
(interludePrefix ""))
|
|
||||||
(if (and
|
|
||||||
(equal? poetIds composerIds)
|
|
||||||
(null? translatorIds)
|
|
||||||
(null? versePoetData)
|
|
||||||
(null? verseComposerData)
|
|
||||||
(null? voiceComposerData)
|
|
||||||
(null? compositionIds)
|
|
||||||
(null? adaptionTextIds)
|
|
||||||
(null? adaptionMusicIds)
|
|
||||||
(null? bridgeIds)
|
|
||||||
(null? interludeIds))
|
|
||||||
(list
|
|
||||||
(join-present (list
|
|
||||||
(render-contribution-group poetAndComposerEqualPrefix poetIds)
|
|
||||||
(if (equal? year_text year_melody) year_text (join-present (list year_text year_melody) "/"))
|
|
||||||
) ", ")
|
|
||||||
#f)
|
|
||||||
(list
|
|
||||||
(if (and (null? poetIds) (null? versePoetData) (null? translatorIds)) #f
|
|
||||||
(string-append
|
|
||||||
poetPrefix
|
|
||||||
" "
|
|
||||||
(join-present (list
|
|
||||||
(join-present (list
|
|
||||||
(render-contribution-group "" poetIds)
|
|
||||||
year_text
|
|
||||||
) ", ")
|
|
||||||
(render-partial-contribution-group 'versePrefix versePoetData)
|
|
||||||
(join-present (list
|
|
||||||
(render-contribution-group adaptionTextPrefix adaptionTextIds)
|
|
||||||
year_adaption_text
|
|
||||||
) ", ")
|
|
||||||
(join-present (list
|
|
||||||
(render-contribution-group translationAuthorPrefix translatorIds)
|
|
||||||
year_translation
|
|
||||||
) ", ")
|
|
||||||
) "; ")
|
|
||||||
))
|
|
||||||
(if (and
|
|
||||||
(null? composerIds)
|
|
||||||
(null? compositionIds)
|
|
||||||
(null? adaptionMusicIds)
|
|
||||||
(null? verseComposerData)
|
|
||||||
(null? voiceComposerData)
|
|
||||||
(null? bridgeIds)
|
|
||||||
(null? interludeIds)) #f
|
|
||||||
(string-append
|
|
||||||
composerPrefix
|
|
||||||
" "
|
|
||||||
(join-present (list
|
|
||||||
(join-present (list
|
|
||||||
(render-contribution-group "" composerIds)
|
|
||||||
year_melody
|
|
||||||
) ", ")
|
|
||||||
(render-partial-contribution-group 'versePrefix verseComposerData)
|
|
||||||
(render-partial-contribution-group 'voicePrefix voiceComposerData)
|
|
||||||
(join-present (list
|
|
||||||
(render-contribution-group compositionPrefix compositionIds)
|
|
||||||
year_composition
|
|
||||||
) ", ")
|
|
||||||
(join-present (list
|
|
||||||
(render-contribution-group adaptionMusicPrefix adaptionMusicIds)
|
|
||||||
year_adaption_music
|
|
||||||
) ", ")
|
|
||||||
(render-contribution-group bridgePrefix bridgeIds)
|
|
||||||
(render-contribution-group interludePrefix interludeIds)
|
|
||||||
) "; ")
|
|
||||||
)))))
|
|
||||||
|
|
||||||
|
|
||||||
songinfoMarkup =
|
songinfoMarkup =
|
||||||
#(make-on-the-fly-markup
|
#(make-on-the-fly-markup
|
||||||
(lambda (layout props m)
|
(lambda (layout props m)
|
||||||
@@ -145,15 +45,13 @@
|
|||||||
(year_melody (chain-assoc-get 'songinfo:year_melody props #f))
|
(year_melody (chain-assoc-get 'songinfo:year_melody props #f))
|
||||||
(poet-with-year (if (and poet-maybe-with-composer year_text) (string-append poet-maybe-with-composer ", " year_text) poet-maybe-with-composer))
|
(poet-with-year (if (and poet-maybe-with-composer year_text) (string-append poet-maybe-with-composer ", " year_text) poet-maybe-with-composer))
|
||||||
(composer-with-year (if (and composer year_melody) (string-append composer ", " year_melody) composer))
|
(composer-with-year (if (and composer year_melody) (string-append composer ", " year_melody) composer))
|
||||||
(concat-markupped-strings (lambda (text)
|
|
||||||
(ly:regex-replace (ly:make-regex "(\\S+)(\\\\\\w+(?:\\s+\\[^\\{\\s]*|\\s*\\{[^\\}]*\\}))(\\S*)") text "\\concat {" 1 "\\line {" 2 "}" 3 "}")))
|
|
||||||
(string-with-paragraphs->markuplist (lambda (prefix text)
|
(string-with-paragraphs->markuplist (lambda (prefix text)
|
||||||
(if text
|
(if text
|
||||||
(apply append
|
(apply append
|
||||||
(map
|
(map
|
||||||
(lambda (paragraph)
|
(lambda (paragraph)
|
||||||
(make-wordwrap-internal-markup-list #t
|
(make-wordwrap-internal-markup-list #t
|
||||||
#{ \markuplist { $(ly:parser-include-string (concat-markupped-strings paragraph)) } #}))
|
#{ \markuplist { $(ly:parser-include-string paragraph) } #}))
|
||||||
(ly:regex-split (ly:make-regex "\r?\n[ \t\r\n]*\n[ \t\r\n]*") (string-append prefix text))))
|
(ly:regex-split (ly:make-regex "\r?\n[ \t\r\n]*\n[ \t\r\n]*") (string-append prefix text))))
|
||||||
'())))
|
'())))
|
||||||
(poet-and-composer-markup-list
|
(poet-and-composer-markup-list
|
||||||
|
|||||||
@@ -16,10 +16,9 @@ songTocColumns = 3
|
|||||||
globalSize = 15
|
globalSize = 15
|
||||||
lyricSize = 1.6
|
lyricSize = 1.6
|
||||||
stanzaFormat = "~a."
|
stanzaFormat = "~a."
|
||||||
|
romanStanzaFormat = "~@r."
|
||||||
refString = "Ref.:"
|
refString = "Ref.:"
|
||||||
refStringWithNumbers = "Ref. ~a:"
|
refStringWithNumbers = "Ref. ~a:"
|
||||||
bridgeString = "Bridge:"
|
|
||||||
bridgeStringWithNumbers = "Bridge ~a:"
|
|
||||||
% hübsche Wiederholungszeichen für den Liedtext
|
% hübsche Wiederholungszeichen für den Liedtext
|
||||||
repStart = "𝄆"
|
repStart = "𝄆"
|
||||||
repStop = "𝄇"
|
repStop = "𝄇"
|
||||||
|
|||||||
@@ -30,9 +30,6 @@
|
|||||||
(lambda (a b) (< (cadr a) (cadr b))))
|
(lambda (a b) (< (cadr a) (cadr b))))
|
||||||
(list)))
|
(list)))
|
||||||
|
|
||||||
#(define (join-present items joiner)
|
|
||||||
(string-join (filter (lambda (item) (and (string? item) (not (string-null? (string-trim-both item))))) items) joiner))
|
|
||||||
|
|
||||||
#(define-markup-command (print-songinfo layout props) ()
|
#(define-markup-command (print-songinfo layout props) ()
|
||||||
(define (songinfo-from songId key)
|
(define (songinfo-from songId key)
|
||||||
(let ((song (if (defined? 'SONG_DATA) (assoc-ref SONG_DATA songId) #f)))
|
(let ((song (if (defined? 'SONG_DATA) (assoc-ref SONG_DATA songId) #f)))
|
||||||
@@ -77,7 +74,11 @@
|
|||||||
(define (render-contribution-group contributionPrefix authorIds)
|
(define (render-contribution-group contributionPrefix authorIds)
|
||||||
(if (null? authorIds)
|
(if (null? authorIds)
|
||||||
""
|
""
|
||||||
(string-append contributionPrefix " " ((ly:output-def-lookup layout 'author-joiner) (format-authors authorIds))))
|
(string-append contributionPrefix " " (string-join (format-authors authorIds) ", ")))
|
||||||
|
)
|
||||||
|
|
||||||
|
(define (join-present items joiner)
|
||||||
|
(string-join (filter (lambda (item) (and (string? item) (not (string-null? (string-trim-both item))))) items) joiner)
|
||||||
)
|
)
|
||||||
|
|
||||||
(define (render-partial-contribution-group prefixLookup authorData)
|
(define (render-partial-contribution-group prefixLookup authorData)
|
||||||
@@ -93,37 +94,93 @@
|
|||||||
|
|
||||||
(define (poet-and-composer-from-authors authors)
|
(define (poet-and-composer-from-authors authors)
|
||||||
(if authors
|
(if authors
|
||||||
((ly:output-def-lookup layout 'authorContributionFormat)
|
(let (
|
||||||
render-contribution-group
|
(poetIds (find-author-ids-by 'text authors))
|
||||||
render-partial-contribution-group
|
(translatorIds (find-author-ids-by 'translation authors))
|
||||||
#:poetIds (find-author-ids-by 'text authors)
|
(versePoetData (find-author-id-with-part-numbers 'verse authors))
|
||||||
#:translatorIds (find-author-ids-by 'translation authors)
|
(composerIds (find-author-ids-by 'melody authors))
|
||||||
#:versePoetData (find-author-id-with-part-numbers 'verse authors)
|
(verseComposerData (find-author-id-with-part-numbers 'meloverse authors))
|
||||||
#:composerIds (find-author-ids-by 'melody authors)
|
(voiceComposerData (find-author-id-with-part-numbers 'voice authors))
|
||||||
#:verseComposerData (find-author-id-with-part-numbers 'meloverse authors)
|
(compositionIds (find-author-ids-by 'composition authors))
|
||||||
#:voiceComposerData (find-author-id-with-part-numbers 'voice authors)
|
(adaptionTextIds (find-author-ids-by 'adaption_text authors))
|
||||||
#:compositionIds (find-author-ids-by 'composition authors)
|
(adaptionMusicIds (find-author-ids-by 'adaption_music authors))
|
||||||
#:adaptionTextIds (find-author-ids-by 'adaption_text authors)
|
(bridgeIds (find-author-ids-by 'bridge authors))
|
||||||
#:adaptionMusicIds (find-author-ids-by 'adaption_music authors)
|
(interludeIds (find-author-ids-by 'interlude authors))
|
||||||
#:bridgeIds (find-author-ids-by 'bridge authors)
|
(year_text (chain-assoc-get 'header:year_text props #f))
|
||||||
#:interludeIds (find-author-ids-by 'interlude authors)
|
(year_translation (chain-assoc-get 'header:year_translation props #f))
|
||||||
#:year_text (chain-assoc-get 'header:year_text props #f)
|
(year_melody (chain-assoc-get 'header:year_melody props #f))
|
||||||
#:year_translation (chain-assoc-get 'header:year_translation props #f)
|
(year_composition (chain-assoc-get 'header:year_composition props #f))
|
||||||
#:year_melody (chain-assoc-get 'header:year_melody props #f)
|
(year_adaption_text (chain-assoc-get 'header:year_adaption_text props #f))
|
||||||
#:year_composition (chain-assoc-get 'header:year_composition props #f)
|
(year_adaption_music (chain-assoc-get 'header:year_adaption_music props #f))
|
||||||
#:year_adaption_text (chain-assoc-get 'header:year_adaption_text props #f)
|
)
|
||||||
#:year_adaption_music (chain-assoc-get 'header:year_adaption_music props #f)
|
(if (and
|
||||||
#:poetAndComposerEqualPrefix (ly:output-def-lookup layout 'poetAndComposerEqualPrefix)
|
(equal? poetIds composerIds)
|
||||||
#:poetPrefix (ly:output-def-lookup layout 'poetPrefix)
|
(null? translatorIds)
|
||||||
#:composerPrefix (ly:output-def-lookup layout 'composerPrefix)
|
(null? versePoetData)
|
||||||
#:translationPrefix (ly:output-def-lookup layout 'translationPrefix)
|
(null? verseComposerData)
|
||||||
#:pronunciationPrefix (ly:output-def-lookup layout 'pronunciationPrefix)
|
(null? voiceComposerData)
|
||||||
#:compositionPrefix (ly:output-def-lookup layout 'compositionPrefix)
|
(null? compositionIds)
|
||||||
#:adaptionTextPrefix (ly:output-def-lookup layout 'adaptionTextPrefix)
|
(null? adaptionTextIds)
|
||||||
#:adaptionMusicPrefix (ly:output-def-lookup layout 'adaptionMusicPrefix)
|
(null? adaptionMusicIds)
|
||||||
#:bridgePrefix (ly:output-def-lookup layout 'bridgePrefix)
|
(null? bridgeIds)
|
||||||
#:interludePrefix (ly:output-def-lookup layout 'interludePrefix)
|
(null? interludeIds))
|
||||||
)
|
(list
|
||||||
|
(join-present (list
|
||||||
|
(render-contribution-group (ly:output-def-lookup layout 'poetAndComposerEqualPrefix) poetIds)
|
||||||
|
(if (equal? year_text year_melody) year_text (join-present (list year_text year_melody) "/"))
|
||||||
|
) ", ")
|
||||||
|
#f)
|
||||||
|
(list
|
||||||
|
(if (and (null? poetIds) (null? versePoetData) (null? translatorIds)) #f
|
||||||
|
(string-append
|
||||||
|
(ly:output-def-lookup layout 'poetPrefix)
|
||||||
|
" "
|
||||||
|
(join-present (list
|
||||||
|
(join-present (list
|
||||||
|
(render-contribution-group "" poetIds)
|
||||||
|
year_text
|
||||||
|
) ", ")
|
||||||
|
(render-partial-contribution-group 'versePrefix versePoetData)
|
||||||
|
(join-present (list
|
||||||
|
(render-contribution-group (ly:output-def-lookup layout 'translationAuthorPrefix) translatorIds)
|
||||||
|
year_translation
|
||||||
|
) ", ")
|
||||||
|
(join-present (list
|
||||||
|
(render-contribution-group (ly:output-def-lookup layout 'adaptionTextPrefix) adaptionTextIds)
|
||||||
|
year_adaption_text
|
||||||
|
) ", ")
|
||||||
|
) "; ")
|
||||||
|
))
|
||||||
|
(if (and
|
||||||
|
(null? composerIds)
|
||||||
|
(null? compositionIds)
|
||||||
|
(null? adaptionMusicIds)
|
||||||
|
(null? verseComposerData)
|
||||||
|
(null? voiceComposerData)
|
||||||
|
(null? bridgeIds)
|
||||||
|
(null? interludeIds)) #f
|
||||||
|
(string-append
|
||||||
|
(ly:output-def-lookup layout 'composerPrefix)
|
||||||
|
" "
|
||||||
|
(join-present (list
|
||||||
|
(join-present (list
|
||||||
|
(render-contribution-group "" composerIds)
|
||||||
|
year_melody
|
||||||
|
) ", ")
|
||||||
|
(render-partial-contribution-group 'versePrefix verseComposerData)
|
||||||
|
(render-partial-contribution-group 'voicePrefix voiceComposerData)
|
||||||
|
(join-present (list
|
||||||
|
(render-contribution-group (ly:output-def-lookup layout 'compositionPrefix) compositionIds)
|
||||||
|
year_composition
|
||||||
|
) ", ")
|
||||||
|
(join-present (list
|
||||||
|
(render-contribution-group (ly:output-def-lookup layout 'adaptionMusicPrefix) adaptionMusicIds)
|
||||||
|
year_adaption_music
|
||||||
|
) ", ")
|
||||||
|
(render-contribution-group (ly:output-def-lookup layout 'bridgePrefix) bridgeIds)
|
||||||
|
(render-contribution-group (ly:output-def-lookup layout 'interludePrefix) interludeIds)
|
||||||
|
) "; ")
|
||||||
|
)))))
|
||||||
(list #f #f)
|
(list #f #f)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -60,20 +60,19 @@
|
|||||||
|
|
||||||
% Text über Text mittig darstellen
|
% Text über Text mittig darstellen
|
||||||
#(define-markup-command (textup layout props text uptext) (markup? markup?)
|
#(define-markup-command (textup layout props text uptext) (markup? markup?)
|
||||||
#:properties ((verselayout generalLayout)
|
|
||||||
(verse-text-chord-distance songTextChordDistance))
|
|
||||||
"Markup über Text mittig darstellen."
|
"Markup über Text mittig darstellen."
|
||||||
|
(let ((verselayout (chain-assoc-get 'verselayout props generalLayout)))
|
||||||
(interpret-markup layout props
|
(interpret-markup layout props
|
||||||
#{\markup {
|
#{\markup {
|
||||||
\size-box-to-box-style-dependent ##t ##f
|
\size-box-to-box-style-dependent ##t ##f
|
||||||
\general-align #X #LEFT \override #`(direction . ,UP) \override #'(baseline-skip . 1) \dir-column \chord-alignment-style-dependent {
|
\general-align #X #LEFT \override #`(direction . ,UP) \override #'(baseline-skip . 1.0) \dir-column \chord-alignment-style-dependent {
|
||||||
\pad-to-box #'(0 . 0) #`(0 . ,(- verse-text-chord-distance 0.8)) { #text }
|
\pad-to-box #'(0 . 0) #'(0 . 2.0) { #text }
|
||||||
\size-box-to-box ##f ##t #uptext \score { \chords { g4:m a } \layout { $verselayout #(customized-layout verselayout) } }
|
\size-box-to-box ##f ##t #uptext \score { \chords { g4:m a } \layout { \verselayout } }
|
||||||
}
|
}
|
||||||
#text
|
#text
|
||||||
}
|
}
|
||||||
#}
|
#}
|
||||||
))
|
)))
|
||||||
|
|
||||||
#(define-markup-command (anchor-x-between layout props arga argb)
|
#(define-markup-command (anchor-x-between layout props arga argb)
|
||||||
(markup? markup?)
|
(markup? markup?)
|
||||||
@@ -83,15 +82,16 @@
|
|||||||
(ly:stencil-aligned-to m X (- (/ (* la 2) l) 1))
|
(ly:stencil-aligned-to m X (- (/ (* la 2) l) 1))
|
||||||
))
|
))
|
||||||
|
|
||||||
#(define-markup-command (stanza-raw layout props arg) (string-or-music?)
|
#(define-markup-command (stanza-raw layout props arg)
|
||||||
#:properties ((verselayout generalLayout))
|
(string-or-music?)
|
||||||
|
(let ((verselayout (chain-assoc-get 'verselayout props generalLayout)))
|
||||||
(interpret-markup layout props
|
(interpret-markup layout props
|
||||||
(if (and (string? arg) (string-null? arg))
|
(if (and (string? arg) (string-null? arg))
|
||||||
" "
|
" "
|
||||||
#{\markup
|
#{\markup
|
||||||
\score { \new Lyrics { \lyricmode { #(if (ly:music? arg) arg #{ \set stanza = #arg #}) "" } } \layout { $verselayout #(customized-layout verselayout) } }
|
\score { \new Lyrics { \lyricmode { #(if (ly:music? arg) arg #{ \set stanza = #arg #}) "" } } \layout { \verselayout } }
|
||||||
#}
|
#}
|
||||||
)))
|
))))
|
||||||
|
|
||||||
#(define-markup-command (stanza layout props arg)
|
#(define-markup-command (stanza layout props arg)
|
||||||
(string-or-music?)
|
(string-or-music?)
|
||||||
@@ -141,7 +141,7 @@
|
|||||||
(make-wrap-newline-markup
|
(make-wrap-newline-markup
|
||||||
(ly:regex-replace (ly:make-regex "\\(( *)([^,()]*)( *),([^)]*)\\)")
|
(ly:regex-replace (ly:make-regex "\\(( *)([^,()]*)( *),([^)]*)\\)")
|
||||||
(ly:regex-replace (ly:make-regex "(([^ \n]*\\([^()]*,[^()]+\\)[^ \n(]*)+)") (handle-custom-newlines custom-verse-breaks verse) " \\concat { " 1 " } ")
|
(ly:regex-replace (ly:make-regex "(([^ \n]*\\([^()]*,[^()]+\\)[^ \n(]*)+)") (handle-custom-newlines custom-verse-breaks verse) " \\concat { " 1 " } ")
|
||||||
"\\textup \\line { \"" 1 "\" " 2 " \"" 3 "\" } \\score { " transp " \\chords { s4 " 4 " } \\layout { $verselayout #(customized-layout verselayout) } }")
|
"\\textup \\line { \"" 1 "\" " 2 " \"" 3 "\" } \\score { " transp " \\chords { s4 " 4 " } \\layout { \\verselayout } }")
|
||||||
)
|
)
|
||||||
))))
|
))))
|
||||||
|
|
||||||
@@ -255,97 +255,110 @@
|
|||||||
|
|
||||||
Chord_lyrics_spacing_engraver =
|
Chord_lyrics_spacing_engraver =
|
||||||
#(lambda (ctx)
|
#(lambda (ctx)
|
||||||
(let ((last-lyric-syllable #f)
|
(let ((last-note-head #f)
|
||||||
|
(note-head-extended #f)
|
||||||
|
(last-lyric-syllable-width 0)
|
||||||
(lyric-width-since-last-chord 0)
|
(lyric-width-since-last-chord 0)
|
||||||
(music-columns-for-last-syllable 0)
|
(notes-on-syllable-count 0)
|
||||||
(last-printed-chord #f)
|
(last-chord-name #f)
|
||||||
(chord-width-since-last-lyric 0)
|
(remaining-chord-width 0)
|
||||||
(lyrics-seen-since-break #f)
|
(last-rest #f)
|
||||||
(have-a-rest #f)
|
(rest-count 0)
|
||||||
(stanza #f)
|
(multi-measure-rest-count 0)
|
||||||
(place-at-right-edge
|
(stanza-shift 0))
|
||||||
(lambda (grob anchor padding)
|
|
||||||
(let ((anchor-width (interval-length (ly:grob-extent anchor anchor X))))
|
|
||||||
(ly:grob-set-parent! grob X anchor)
|
|
||||||
(ly:grob-set-property! grob 'X-offset (+ padding anchor-width))
|
|
||||||
))))
|
|
||||||
(make-engraver
|
(make-engraver
|
||||||
(listeners
|
(listeners
|
||||||
((multi-measure-rest-event engraver event)
|
((multi-measure-rest-event engraver event)
|
||||||
(set! have-a-rest #t)
|
(set! multi-measure-rest-count (+ multi-measure-rest-count 1))
|
||||||
)
|
|
||||||
((rest-event engraver event)
|
|
||||||
(set! have-a-rest #t)
|
|
||||||
)
|
|
||||||
((lyric-event engraver event)
|
|
||||||
(set! have-a-rest #f)
|
|
||||||
(set! music-columns-for-last-syllable 0)
|
|
||||||
)
|
)
|
||||||
((break-event engraver event)
|
((break-event engraver event)
|
||||||
(set! last-lyric-syllable #f)
|
(set! last-note-head #f)
|
||||||
|
(set! note-head-extended #f)
|
||||||
|
(set! last-lyric-syllable-width 0)
|
||||||
(set! lyric-width-since-last-chord 0)
|
(set! lyric-width-since-last-chord 0)
|
||||||
(set! music-columns-for-last-syllable 0)
|
(set! notes-on-syllable-count 0)
|
||||||
(set! last-printed-chord #f)
|
(set! last-chord-name #f)
|
||||||
(set! chord-width-since-last-lyric 0)
|
(set! remaining-chord-width 0)
|
||||||
(set! lyrics-seen-since-break #f)
|
(set! last-rest #f)
|
||||||
|
(set! rest-count 0)
|
||||||
|
(set! multi-measure-rest-count 0)
|
||||||
|
(set! stanza-shift 0)
|
||||||
))
|
))
|
||||||
(acknowledgers
|
(acknowledgers
|
||||||
((musical-paper-column-interface this-engraver grob source-engraver)
|
((note-head-interface this-engraver grob source-engraver)
|
||||||
(set! music-columns-for-last-syllable (+ 1 music-columns-for-last-syllable))
|
(if (and (> rest-count 0) (not last-note-head))
|
||||||
|
(let ((rest-spacing-on-line-start 1.2))
|
||||||
|
(ly:grob-set-property! grob 'minimum-X-extent (cons (- rest-spacing-on-line-start) 0))
|
||||||
|
(set! stanza-shift rest-spacing-on-line-start)
|
||||||
|
))
|
||||||
|
(set! notes-on-syllable-count (+ 1 notes-on-syllable-count))
|
||||||
|
(set! last-note-head grob)
|
||||||
|
(set! note-head-extended #f)
|
||||||
|
(set! last-rest #f)
|
||||||
|
(set! rest-count 0)
|
||||||
|
(set! multi-measure-rest-count 0)
|
||||||
)
|
)
|
||||||
((lyric-syllable-interface this-engraver grob source-engraver)
|
((lyric-syllable-interface this-engraver grob source-engraver)
|
||||||
(let ((syllable-width (interval-length (ly:grob-extent grob grob X))))
|
(set! remaining-chord-width (max 0 (- remaining-chord-width lyric-width-since-last-chord)))
|
||||||
(set! lyric-width-since-last-chord (+ lyric-width-since-last-chord syllable-width))
|
(set! last-lyric-syllable-width (- (cdr (ly:grob-extent grob grob X)) 0.2))
|
||||||
)
|
(set! lyric-width-since-last-chord (+ lyric-width-since-last-chord last-lyric-syllable-width))
|
||||||
(if (> chord-width-since-last-lyric 0)
|
(if last-note-head (set! notes-on-syllable-count 1))
|
||||||
(if lyrics-seen-since-break
|
|
||||||
(ly:grob-set-property! grob 'extra-spacing-width
|
|
||||||
(cons (- chord-width-since-last-lyric) (cdr (ly:grob-property grob 'extra-spacing-width '(0 . 0)))))
|
|
||||||
(if last-printed-chord
|
|
||||||
(let ((gap-for-starting-rest 2.0))
|
|
||||||
(if stanza (ly:grob-set-property! stanza 'padding (+ 1 gap-for-starting-rest)))
|
|
||||||
(ly:grob-set-parent! grob X last-printed-chord)
|
|
||||||
(ly:grob-set-property! grob 'X-offset gap-for-starting-rest)
|
|
||||||
)))
|
|
||||||
)
|
|
||||||
(set! last-lyric-syllable grob)
|
|
||||||
(set! chord-width-since-last-lyric 0)
|
|
||||||
(set! lyrics-seen-since-break #t)
|
|
||||||
)
|
)
|
||||||
((chord-name-interface this-engraver grob source-engraver)
|
((chord-name-interface this-engraver grob source-engraver)
|
||||||
(if (not (and
|
(if (not (and
|
||||||
(boolean? (ly:grob-property grob 'begin-of-line-visible))
|
(boolean? (ly:grob-property grob 'begin-of-line-visible))
|
||||||
(ly:grob-property grob 'begin-of-line-visible)
|
(ly:grob-property grob 'begin-of-line-visible)))
|
||||||
lyrics-seen-since-break))
|
(let ((on-a-rest (> rest-count 0)))
|
||||||
(let* ((last-printed-chord-width (if last-printed-chord (interval-length (ly:grob-extent last-printed-chord last-printed-chord X)) 0))
|
(if (not on-a-rest)
|
||||||
(chord-overwidth (- last-printed-chord-width lyric-width-since-last-chord))
|
(set! notes-on-syllable-count (- notes-on-syllable-count 1)))
|
||||||
(chord-gap 0.5))
|
(if (and last-chord-name (= multi-measure-rest-count 1) (> lyric-width-since-last-chord remaining-chord-width))
|
||||||
(if have-a-rest
|
(ly:grob-set-property! last-chord-name 'extra-spacing-width (cons -0.1 (+ 0.1 (- lyric-width-since-last-chord remaining-chord-width)))))
|
||||||
(let ((chord-width (interval-length (ly:grob-extent grob grob X))))
|
(if last-note-head
|
||||||
(if last-lyric-syllable
|
(let* ((last-note-min-x-extent (ly:grob-property last-note-head 'minimum-X-extent))
|
||||||
(if (and last-printed-chord (> chord-overwidth 0))
|
(last-note-min-x-lower (if (pair? last-note-min-x-extent) (car last-note-min-x-extent) 0))
|
||||||
(place-at-right-edge grob last-printed-chord chord-gap)
|
(last-note-min-x-upper (if (pair? last-note-min-x-extent) (cdr last-note-min-x-extent) 0)))
|
||||||
(place-at-right-edge grob last-lyric-syllable 0))
|
(if on-a-rest
|
||||||
(if last-printed-chord
|
(begin
|
||||||
(place-at-right-edge grob last-printed-chord chord-gap)))
|
(if (not note-head-extended)
|
||||||
(set! chord-width-since-last-lyric (+ chord-width-since-last-lyric chord-width chord-gap))
|
(begin
|
||||||
))
|
(ly:grob-set-property! last-note-head 'minimum-X-extent
|
||||||
(if (and last-lyric-syllable last-printed-chord (> chord-overwidth 0))
|
(cons last-note-min-x-lower (- last-lyric-syllable-width -2 (* 2.2 rest-count))))
|
||||||
(ly:grob-set-property! last-lyric-syllable 'extra-spacing-width
|
(set! note-head-extended #t)
|
||||||
(cons (car (ly:grob-property last-lyric-syllable 'extra-spacing-width '(0 . 0))) (+ chord-gap chord-overwidth)))
|
))
|
||||||
)
|
(ly:grob-set-property! last-rest 'minimum-X-extent (cons 0 2))
|
||||||
(set! lyric-width-since-last-chord (* (if last-lyric-syllable (interval-length (ly:grob-extent last-lyric-syllable last-lyric-syllable X)) 0) (- 1 (/ 1.0 music-columns-for-last-syllable))))
|
)
|
||||||
(set! last-printed-chord grob)
|
(if (and (> lyric-width-since-last-chord 0)
|
||||||
(set! last-lyric-syllable #f)
|
(> remaining-chord-width lyric-width-since-last-chord))
|
||||||
)
|
(ly:grob-set-property! last-note-head 'minimum-X-extent
|
||||||
(ly:grob-set-property! grob 'X-extent '(+inf.0 . -inf.0))
|
(cons (- -1.2 (- remaining-chord-width lyric-width-since-last-chord)) last-note-min-x-upper))
|
||||||
)
|
(let* ((width-per-note-head 0.5)
|
||||||
|
(note-width-since-last-chord (* width-per-note-head notes-on-syllable-count)))
|
||||||
|
(if (> remaining-chord-width note-width-since-last-chord)
|
||||||
|
(ly:grob-set-property! last-note-head 'minimum-X-extent
|
||||||
|
(cons (- note-width-since-last-chord remaining-chord-width) last-note-min-x-upper))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)))
|
||||||
|
(set! last-chord-name grob)
|
||||||
|
(set! remaining-chord-width
|
||||||
|
(if (and on-a-rest (equal? (ly:prob-property (ly:grob-property grob 'cause) 'duration) (ly:prob-property (ly:grob-property last-rest 'cause) 'duration)))
|
||||||
|
0
|
||||||
|
(cdr (ly:grob-extent grob grob X))))
|
||||||
|
(set! lyric-width-since-last-chord 0)
|
||||||
|
(set! notes-on-syllable-count (if on-a-rest 0 1))
|
||||||
|
))
|
||||||
)
|
)
|
||||||
((stanza-number-interface this-engraver grob source-engraver)
|
((rest-interface this-engraver grob source-engraver)
|
||||||
(set! stanza grob)
|
(set! rest-count (+ 1 rest-count))
|
||||||
)
|
(set! last-rest grob)
|
||||||
)
|
(set! multi-measure-rest-count 0)
|
||||||
)))
|
)
|
||||||
|
((stanza-number-interface this-engraver grob source-engraver)
|
||||||
|
(ly:grob-set-property! grob 'padding (+ 1 stanza-shift)))
|
||||||
|
))))
|
||||||
|
|
||||||
|
%#(ly:set-option 'debug-skylines #t)
|
||||||
|
|
||||||
#(define-markup-command (chordlyrics layout props lyrics) (ly:music?)
|
#(define-markup-command (chordlyrics layout props lyrics) (ly:music?)
|
||||||
#:properties ((verse-chords #{#})
|
#:properties ((verse-chords #{#})
|
||||||
@@ -366,8 +379,10 @@ Chord_lyrics_spacing_engraver =
|
|||||||
\new Lyrics \lyricsto "dummyvoice" { #lyrics }
|
\new Lyrics \lyricsto "dummyvoice" { #lyrics }
|
||||||
>>
|
>>
|
||||||
\layout {
|
\layout {
|
||||||
$verselayout
|
\verselayout
|
||||||
#(customized-layout verselayout)
|
#(let
|
||||||
|
((custom-size (ly:output-def-lookup verselayout 'size #f)))
|
||||||
|
(if custom-size (layout-set-staff-size custom-size)))
|
||||||
ragged-right = ##t
|
ragged-right = ##t
|
||||||
\context {
|
\context {
|
||||||
\Lyrics
|
\Lyrics
|
||||||
@@ -388,10 +403,10 @@ Chord_lyrics_spacing_engraver =
|
|||||||
\context {
|
\context {
|
||||||
\Score
|
\Score
|
||||||
\override PaperColumn.keep-inside-line = ##f
|
\override PaperColumn.keep-inside-line = ##f
|
||||||
% \override SpacingSpanner.strict-note-spacing = ##t
|
% \override SpacingSpanner.strict-note-spacing = ##t
|
||||||
\override SpacingSpanner.uniform-stretching = ##t
|
\override SpacingSpanner.uniform-stretching = ##t
|
||||||
\override SpacingSpanner.spacing-increment = 0
|
\override SpacingSpanner.spacing-increment = 0
|
||||||
% \override SpacingSpanner.packed-spacing = ##t
|
%\override SpacingSpanner.packed-spacing = ##t
|
||||||
\consists \Chord_lyrics_spacing_engraver
|
\consists \Chord_lyrics_spacing_engraver
|
||||||
\remove Bar_number_engraver
|
\remove Bar_number_engraver
|
||||||
\remove Mark_engraver
|
\remove Mark_engraver
|
||||||
@@ -422,6 +437,15 @@ Chord_lyrics_spacing_engraver =
|
|||||||
\remove Note_heads_engraver
|
\remove Note_heads_engraver
|
||||||
\remove Script_engraver
|
\remove Script_engraver
|
||||||
}
|
}
|
||||||
|
\context {
|
||||||
|
\NullVoice
|
||||||
|
\consists Rest_engraver
|
||||||
|
\omit Rest
|
||||||
|
\override Rest.X-extent = #'(0 . 0)
|
||||||
|
\undo \omit NoteHead
|
||||||
|
\hide NoteHead
|
||||||
|
\override NoteHead.X-extent = #'(0 . 0.5)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,7 +90,7 @@
|
|||||||
(for-each (lambda (category)
|
(for-each (lambda (category)
|
||||||
(let* ((catsym (string->symbol category))
|
(let* ((catsym (string->symbol category))
|
||||||
(catlist (hashq-ref category-index-hash catsym
|
(catlist (hashq-ref category-index-hash catsym
|
||||||
(list (list label 'indexCategoryMarkup `(((combine-with-next . #t) (rawtext . ,category))))))))
|
(list (list label 'indexCategoryMarkup `(((rawtext . ,category))))))))
|
||||||
(if (assq catsym category-names)
|
(if (assq catsym category-names)
|
||||||
(hashq-set! category-index-hash catsym
|
(hashq-set! category-index-hash catsym
|
||||||
(cons (list label markup-symbol textoptions) catlist))
|
(cons (list label markup-symbol textoptions) catlist))
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
(for-each (lambda (authorID)
|
(for-each (lambda (authorID)
|
||||||
(let* ((authorsym (string->symbol authorID))
|
(let* ((authorsym (string->symbol authorID))
|
||||||
(authorlist (hashq-ref author-index-hash authorsym
|
(authorlist (hashq-ref author-index-hash authorsym
|
||||||
(list (list label 'indexAuthorMarkup `(((combine-with-next . #t) (rawtext . ,authorID))))))))
|
(list (list label 'indexAuthorMarkup `(((rawtext . ,authorID))))))))
|
||||||
(hashq-set! author-index-hash authorsym
|
(hashq-set! author-index-hash authorsym
|
||||||
(cons (list label markup-symbol textoptions) authorlist))
|
(cons (list label markup-symbol textoptions) authorlist))
|
||||||
))
|
))
|
||||||
@@ -218,29 +218,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#(define (prepare-item-markup items layout)
|
#(define (prepare-item-markup items layout)
|
||||||
(define (single-item-markup index-item)
|
(map (lambda (index-item)
|
||||||
(let* ((label (car index-item))
|
(let* ((label (car index-item))
|
||||||
(index-markup (cadr index-item))
|
(index-markup (cadr index-item))
|
||||||
(textoptions (caddr index-item))
|
(textoptions (caddr index-item))
|
||||||
(text (chain-assoc-get 'rawtext textoptions))
|
(text (chain-assoc-get 'rawtext textoptions))
|
||||||
(alternative (chain-assoc-get 'alternative textoptions))
|
(alternative (chain-assoc-get 'alternative textoptions))
|
||||||
(songnumber (chain-assoc-get 'songnumber textoptions)))
|
(songnumber (chain-assoc-get 'songnumber textoptions)))
|
||||||
(markup #:override (cons 'index:label label)
|
(markup #:override (cons 'index:label label)
|
||||||
#:override (cons 'index:page (markup #:custom-page-number label -1))
|
#:override (cons 'index:page (markup #:custom-page-number label -1))
|
||||||
#:override (cons 'index:text text)
|
#:override (cons 'index:text text)
|
||||||
#:override (cons 'index:alternative alternative)
|
#:override (cons 'index:alternative alternative)
|
||||||
#:override (cons 'index:songnumber songnumber)
|
#:override (cons 'index:songnumber songnumber)
|
||||||
(ly:output-def-lookup layout index-markup))))
|
(ly:output-def-lookup layout index-markup))))
|
||||||
(if (null? items)
|
(items)))
|
||||||
items
|
|
||||||
(let* ((index-item (car items))
|
|
||||||
(combine-with-next (chain-assoc-get 'combine-with-next (caddr index-item) #f))
|
|
||||||
(restitems (cdr items))
|
|
||||||
(item-markup (single-item-markup index-item)))
|
|
||||||
(if (and combine-with-next (not (null? restitems)))
|
|
||||||
(cons (make-column-markup (list item-markup (single-item-markup (car restitems)))) (prepare-item-markup (cdr restitems) layout))
|
|
||||||
(cons item-markup (prepare-item-markup restitems layout))))
|
|
||||||
))
|
|
||||||
|
|
||||||
#(define-markup-list-command (index-in-columns-with-title layout props index-type title-markup) (symbol? markup?)
|
#(define-markup-list-command (index-in-columns-with-title layout props index-type title-markup) (symbol? markup?)
|
||||||
( _i "Outputs index alphabetical sorted or in categories" )
|
( _i "Outputs index alphabetical sorted or in categories" )
|
||||||
@@ -254,7 +245,7 @@
|
|||||||
(make-columnlayout-markup-list songTocColumns 2
|
(make-columnlayout-markup-list songTocColumns 2
|
||||||
(let ((h (- (ly:output-def-lookup layout 'paper-height) 12)))
|
(let ((h (- (ly:output-def-lookup layout 'paper-height) 12)))
|
||||||
(cons (- h (interval-length (ly:stencil-extent title Y))) h))
|
(cons (- h (interval-length (ly:stencil-extent title Y))) h))
|
||||||
(prepare-item-markup (items) layout))))))
|
(prepare-item-markup items layout))))))
|
||||||
|
|
||||||
indexItem =
|
indexItem =
|
||||||
#(define-music-function (parser location sorttext text) (string? markup?)
|
#(define-music-function (parser location sorttext text) (string? markup?)
|
||||||
@@ -264,7 +255,7 @@ indexItem =
|
|||||||
indexSection =
|
indexSection =
|
||||||
#(define-music-function (parser location sorttext text) (string? markup?)
|
#(define-music-function (parser location sorttext text) (string? markup?)
|
||||||
"Add a section line to the alphabetical index, using @code{indexSectionMarkup} paper variable markup. This can be used to divide the alphabetical index into different sections, for example one section for each first letter."
|
"Add a section line to the alphabetical index, using @code{indexSectionMarkup} paper variable markup. This can be used to divide the alphabetical index into different sections, for example one section for each first letter."
|
||||||
(add-index-item! 'indexSectionMarkup (prepend-alist-chain 'combine-with-next #t (prepend-alist-chain 'rawtext text '())) sorttext))
|
(add-index-item! 'indexSectionMarkup (prepend-alist-chain 'rawtext text '()) sorttext))
|
||||||
|
|
||||||
#(define (extract-and-check-vars-from-header bookheader varlist)
|
#(define (extract-and-check-vars-from-header bookheader varlist)
|
||||||
(let* ((headervars (hash-map->list cons (struct-ref (ly:book-header bookheader) 0)))
|
(let* ((headervars (hash-map->list cons (struct-ref (ly:book-header bookheader) 0)))
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
MUSIC = { \transposable #TRANSPOSITION \MUSIC }
|
% set the speed of the midi music
|
||||||
|
#(define midiQuarterNoteSpeed (if (defined? 'midiQuarterNoteSpeed) midiQuarterNoteSpeed 90))
|
||||||
|
|
||||||
LAYOUT = \layout {
|
MUSIC = { \transposable #TRANSPOSITION \MUSIC }
|
||||||
\LAYOUT
|
|
||||||
#(customized-layout LAYOUT)
|
|
||||||
}
|
|
||||||
|
|
||||||
verselayout = \layout {
|
verselayout = \layout {
|
||||||
\LAYOUT
|
\LAYOUT
|
||||||
@@ -13,6 +11,13 @@ verselayout = \layout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LAYOUT = \layout {
|
||||||
|
\LAYOUT
|
||||||
|
#(let
|
||||||
|
((custom-size (ly:output-def-lookup LAYOUT 'size #f)))
|
||||||
|
(if custom-size (layout-set-staff-size custom-size)))
|
||||||
|
}
|
||||||
|
|
||||||
TEXT = \markuplist {
|
TEXT = \markuplist {
|
||||||
\override #`(transposition . ,TRANSPOSITION)
|
\override #`(transposition . ,TRANSPOSITION)
|
||||||
\override #`(verselayout . ,verselayout)
|
\override #`(verselayout . ,verselayout)
|
||||||
@@ -65,6 +70,11 @@ TEXT = \markuplist {
|
|||||||
\score {
|
\score {
|
||||||
\unfoldRepeats { \MUSIC \INLINESCOREMUSIC }
|
\unfoldRepeats { \MUSIC \INLINESCOREMUSIC }
|
||||||
\midi {
|
\midi {
|
||||||
|
\context {
|
||||||
|
\Score
|
||||||
|
% Tempo des midi files
|
||||||
|
tempoWholesPerMinute = #(/ midiQuarterNoteSpeed 4)
|
||||||
|
}
|
||||||
\context {
|
\context {
|
||||||
\Staff
|
\Staff
|
||||||
\remove "Staff_performer"
|
\remove "Staff_performer"
|
||||||
|
|||||||
Reference in New Issue
Block a user