From aed11a70a7be6ca9921606c56dbae53061ee8678 Mon Sep 17 00:00:00 2001 From: "zuk (Jakob Krueger)" Date: Tue, 12 May 2026 10:42:14 +0200 Subject: [PATCH] Add meloref to author system --- private_includes/base/default_songinfo_style.ily | 12 +++++++++++- private_includes/base/footer_with_songinfo.ily | 4 +++- private_includes/book/toc_include.ily | 6 ++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/private_includes/base/default_songinfo_style.ily b/private_includes/base/default_songinfo_style.ily index e7dcc47..752d7f9 100644 --- a/private_includes/base/default_songinfo_style.ily +++ b/private_includes/base/default_songinfo_style.ily @@ -7,6 +7,7 @@ poetAndComposerEqualPrefix = "Worte und Weise:" voicePrefix = "Stimme:" versePrefix = "Strophe:" + refPrefix = "Refrain:" translationAuthorPrefix = "Übersetzung:" translationPrefix = "Übersetzung:" pronunciationPrefix = "Aussprache:" @@ -39,6 +40,7 @@ (versePoetData '()) (composerIds '()) (verseComposerData '()) + (refComposerIds '()) (voiceComposerData '()) (compositionIds '()) (adaptionTextIds '()) @@ -48,6 +50,7 @@ (year_text #f) (year_translation #f) (year_melody #f) + (year_melody_meloref #f) (year_composition #f) (year_adaption_text #f) (year_adaption_music #f) @@ -60,12 +63,14 @@ (adaptionTextPrefix "") (adaptionMusicPrefix "") (bridgePrefix "") - (interludePrefix "")) + (interludePrefix "") + (refPrefix "")) (if (and (equal? poetIds composerIds) (null? translatorIds) (null? versePoetData) (null? verseComposerData) + (null? refComposerIds) (null? voiceComposerData) (null? compositionIds) (null? adaptionTextIds) @@ -104,6 +109,7 @@ (null? compositionIds) (null? adaptionMusicIds) (null? verseComposerData) + (null? refComposerIds) (null? voiceComposerData) (null? bridgeIds) (null? interludeIds)) #f @@ -116,6 +122,10 @@ year_melody ) ", ") (render-partial-contribution-group 'versePrefix verseComposerData) + (join-present (list + (render-contribution-group refPrefix refComposerIds) + year_melody_meloref + ) ", ") (render-partial-contribution-group 'voicePrefix voiceComposerData) (join-present (list (render-contribution-group compositionPrefix compositionIds) diff --git a/private_includes/base/footer_with_songinfo.ily b/private_includes/base/footer_with_songinfo.ily index 566f36e..8c3f31b 100644 --- a/private_includes/base/footer_with_songinfo.ily +++ b/private_includes/base/footer_with_songinfo.ily @@ -101,6 +101,7 @@ #:versePoetData (find-author-id-with-part-numbers 'verse authors) #:composerIds (find-author-ids-by 'melody authors) #:verseComposerData (find-author-id-with-part-numbers 'meloverse authors) + #:refComposerIds (find-author-ids-by 'meloref authors) #:voiceComposerData (find-author-id-with-part-numbers 'voice authors) #:compositionIds (find-author-ids-by 'composition authors) #:adaptionTextIds (find-author-ids-by 'adaption_text authors) @@ -110,6 +111,7 @@ #:year_text (chain-assoc-get 'header:year_text props #f) #:year_translation (chain-assoc-get 'header:year_translation props #f) #:year_melody (chain-assoc-get 'header:year_melody props #f) + #:year_melody_meloref (chain-assoc-get 'header:year_melody_meloref props #f) #:year_composition (chain-assoc-get 'header:year_composition 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) @@ -123,7 +125,7 @@ #:adaptionMusicPrefix (ly:output-def-lookup layout 'adaptionMusicPrefix) #:bridgePrefix (ly:output-def-lookup layout 'bridgePrefix) #:interludePrefix (ly:output-def-lookup layout 'interludePrefix) - ) + #:refPrefix (ly:output-def-lookup layout 'refPrefix)) (list #f #f) ) ) diff --git a/private_includes/book/toc_include.ily b/private_includes/book/toc_include.ily index a2fbfea..c8a02d9 100644 --- a/private_includes/book/toc_include.ily +++ b/private_includes/book/toc_include.ily @@ -283,13 +283,14 @@ headerToTOC = #(define-music-function (parser location header label) (ly:book? s (versePoetData (find-author-id-with-part-numbers 'verse authors)) (composerIds (find-author-ids-by 'melody authors)) (verseComposerData (find-author-id-with-part-numbers 'meloverse authors)) + (refComposerIds (find-author-ids-by 'meloref authors)) (voiceComposerData (find-author-id-with-part-numbers 'voice authors)) (compositionIds (find-author-ids-by 'composition authors)) (adaptionIds (find-author-ids-by 'adaption authors)) (bridgeIds (find-author-ids-by 'bridge authors)) (interludeIds (find-author-ids-by 'interlude authors))) (delete-duplicates - (append poetIds translatorIds (map car versePoetData) composerIds (map car verseComposerData) (map car voiceComposerData) compositionIds adaptionIds bridgeIds interludeIds)) + (append poetIds translatorIds (map car versePoetData) composerIds (map car verseComposerData) refComposerIds (map car voiceComposerData) compositionIds adaptionIds bridgeIds interludeIds)) )) (let* ( @@ -377,6 +378,7 @@ headerToTOC = #(define-music-function (parser location header label) (ly:book? s (versePoetData (find-author-id-with-part-numbers 'verse authors)) (composerIds (find-author-ids-by 'melody authors)) (verseComposerData (find-author-id-with-part-numbers 'meloverse authors)) + (refComposerIds (find-author-ids-by 'meloref authors)) (voiceComposerData (find-author-id-with-part-numbers 'voice authors)) (compositionIds (find-author-ids-by 'composition authors)) (adaptionTextIds (find-author-ids-by 'adaption_text authors)) @@ -398,7 +400,7 @@ headerToTOC = #(define-music-function (parser location header label) (ly:book? s (headervar-or-empty 'categories) (format-authors (append poetIds adaptionTextIds (map car versePoetData))) (format-authors translatorIds) - (format-authors (append composerIds compositionIds adaptionMusicIds bridgeIds interludeIds (map car voiceComposerData) (map car verseComposerData))) + (format-authors (append composerIds compositionIds adaptionMusicIds bridgeIds interludeIds (map car voiceComposerData) (map car verseComposerData) refComposerIds)) (headervar-or-empty 'year_text) (headervar-or-empty 'year_melody) (headervar-or-empty 'year_translation)