From bf692d90f10f1489eed56adad3c80ca097cb496e Mon Sep 17 00:00:00 2001 From: "zuk (Jakob Krueger)" Date: Wed, 17 Sep 2025 10:40:28 +0200 Subject: [PATCH] Refactor Include System --- lieder/authors_sandbox/authors_sandbox.ly | 2 +- lieder/sandbox/sandbox.ly | 4 +- lieder/vorlage_light/vorlage_light.ly | 8 +- lieder/vorlage_light/vorlage_light_old.ly | 4 +- .../beispiel_liederbuch.ly | 5 +- lilypond-common-includes | 2 +- lilypond-custom-includes/base_config.ily | 14 +++ lilypond-custom-includes/base_config.ly | 6 -- .../{categories.ly => categories.ily} | 0 ...verrides.ly => custom_style_overrides.ily} | 0 .../liedbausteine/00_vorlage_light.ly | 86 +++++++++++++++++++ 11 files changed, 112 insertions(+), 19 deletions(-) create mode 100644 lilypond-custom-includes/base_config.ily delete mode 100644 lilypond-custom-includes/base_config.ly rename lilypond-custom-includes/{categories.ly => categories.ily} (100%) rename lilypond-custom-includes/{custom_style_overrides.ly => custom_style_overrides.ily} (100%) create mode 100644 lilypond-song-includes/liedbausteine/00_vorlage_light.ly diff --git a/lieder/authors_sandbox/authors_sandbox.ly b/lieder/authors_sandbox/authors_sandbox.ly index 47ab273..ff8a2d1 100644 --- a/lieder/authors_sandbox/authors_sandbox.ly +++ b/lieder/authors_sandbox/authors_sandbox.ly @@ -1,6 +1,6 @@ \version "2.25.8" -\include "../../lilypond-custom-includes/base_config.ly" +\include "../../lilypond-custom-includes/base_config.ily" #(set! paper-alist (cons '("testformat" . (cons (* 176 mm) (* 15 mm))) paper-alist)) \paper { diff --git a/lieder/sandbox/sandbox.ly b/lieder/sandbox/sandbox.ly index 3fd7794..5fa2aeb 100644 --- a/lieder/sandbox/sandbox.ly +++ b/lieder/sandbox/sandbox.ly @@ -1,7 +1,7 @@ \version "2.25.8" %songStyle = #'büdel -\include "../../lilypond-custom-includes/base_config.ly" +\include "../../lilypond-custom-includes/base_config.ily" \include "../../lilypond-song-includes/liedbausteine/sandbox.ly" HEADER = \bookpart { @@ -90,4 +90,4 @@ TEXT = \markuplist \fret-chord #"x;2;4;4;4;o;" #"h:1.3.5.11" } -\include "../../lilypond-common-includes/standalone_output.ly" \ No newline at end of file +\include "public_includes/layout_bottom.ily" \ No newline at end of file diff --git a/lieder/vorlage_light/vorlage_light.ly b/lieder/vorlage_light/vorlage_light.ly index a328a33..5fd3668 100644 --- a/lieder/vorlage_light/vorlage_light.ly +++ b/lieder/vorlage_light/vorlage_light.ly @@ -1,7 +1,7 @@ -\version "2.25.8" +\version "2.25.27" -\include "../../lilypond-custom-includes/base_config.ly" -\include "../../lilypond-song-includes/liedbausteine/sandbox.ly" +\include "../../lilypond-custom-includes/base_config.ily" +\include "../../lilypond-song-includes/liedbausteine/00_vorlage_light.ly" HEADER = \bookpart { \header { @@ -11,4 +11,4 @@ HEADER = \bookpart { } } -\include "../../lilypond-common-includes/standalone_output.ly" \ No newline at end of file +\include "public_includes/layout_bottom.ily" \ No newline at end of file diff --git a/lieder/vorlage_light/vorlage_light_old.ly b/lieder/vorlage_light/vorlage_light_old.ly index 67bc43b..a8e83eb 100644 --- a/lieder/vorlage_light/vorlage_light_old.ly +++ b/lieder/vorlage_light/vorlage_light_old.ly @@ -1,6 +1,6 @@ \version "2.25.8" -\include "../../lilypond-custom-includes/base_config.ly" +\include "../../lilypond-custom-includes/base_config.ily" \include "../../lilypond-song-includes/liedbausteine/sandbox.ly" HEADER = \bookpart { @@ -34,4 +34,4 @@ TEXT = \markuplist { } } -\include "../../lilypond-common-includes/standalone_output.ly" \ No newline at end of file +\include "public_includes/layout_bottom.ily" \ No newline at end of file diff --git a/liederbuecher/beispiel_liederbuch/beispiel_liederbuch.ly b/liederbuecher/beispiel_liederbuch/beispiel_liederbuch.ly index 9a8f7ac..190fb0c 100644 --- a/liederbuecher/beispiel_liederbuch/beispiel_liederbuch.ly +++ b/liederbuecher/beispiel_liederbuch/beispiel_liederbuch.ly @@ -6,9 +6,8 @@ imagePagePath = "categories" songPath = "../../lieder" -\include "../../lilypond-custom-includes/base_config.ly" -\include "../../lilypond-common-includes/book_include.ly" -\include "../../lilypond-common-includes/toc_include.ly" +\include "../../lilypond-custom-includes/base_config.ily" +\include "public_includes/book_top.ily" % Brauchen wir jedes Lied als Einzelausgabe mit Midi und PDF? #(define noStandaloneOutput #t) diff --git a/lilypond-common-includes b/lilypond-common-includes index 57bcf94..0fcfaf4 160000 --- a/lilypond-common-includes +++ b/lilypond-common-includes @@ -1 +1 @@ -Subproject commit 57bcf941670c1c93e55a5e2e7eb0ba78e296a343 +Subproject commit 0fcfaf450c21fd961b9ae81caec13db12cdc629c diff --git a/lilypond-custom-includes/base_config.ily b/lilypond-custom-includes/base_config.ily new file mode 100644 index 0000000..6f58271 --- /dev/null +++ b/lilypond-custom-includes/base_config.ily @@ -0,0 +1,14 @@ +#(ly:set-option 'relative-includes #t) +#(define include-path-unextended (if (defined? 'include-path-unextended) include-path-unextended #t)) +#(if include-path-unextended + (let* ((custom-include-dir (dirname (current-filename))) + (project-dir (dirname custom-include-dir)) + (pool-dir (string-append project-dir file-name-separator-string "lilypond-song-includes"))) + (ly:parser-append-to-include-path custom-include-dir) + (ly:parser-append-to-include-path pool-dir)) + (set! include-path-unextended #f)) + +customStyleOverridesFile = "custom_style_overrides.ily" + +\include "categories.ily" +\include "../lilypond-common-includes/public_includes/layout_top.ily" \ No newline at end of file diff --git a/lilypond-custom-includes/base_config.ly b/lilypond-custom-includes/base_config.ly deleted file mode 100644 index 5ed150a..0000000 --- a/lilypond-custom-includes/base_config.ly +++ /dev/null @@ -1,6 +0,0 @@ -#(ly:set-option 'relative-includes #t) - -customStyleOverridesFile = "../lilypond-custom-includes/custom_style_overrides.ly" - -\include "categories.ly" -\include "../lilypond-common-includes/general_include.ly" diff --git a/lilypond-custom-includes/categories.ly b/lilypond-custom-includes/categories.ily similarity index 100% rename from lilypond-custom-includes/categories.ly rename to lilypond-custom-includes/categories.ily diff --git a/lilypond-custom-includes/custom_style_overrides.ly b/lilypond-custom-includes/custom_style_overrides.ily similarity index 100% rename from lilypond-custom-includes/custom_style_overrides.ly rename to lilypond-custom-includes/custom_style_overrides.ily diff --git a/lilypond-song-includes/liedbausteine/00_vorlage_light.ly b/lilypond-song-includes/liedbausteine/00_vorlage_light.ly new file mode 100644 index 0000000..67b644e --- /dev/null +++ b/lilypond-song-includes/liedbausteine/00_vorlage_light.ly @@ -0,0 +1,86 @@ +\version "2.25.27" + +\include "../../lilypond-common-includes/public_includes/pool_top.ily" + +%midiQuarterNoteSpeed = + +basicSongInfo = \header { + title = "Titel" + starttext = "Liedanfang" + alttitle = #'("Alternativtitel") + authors = + #'(("" text) + ("" melody)) + year_text = "" + year_melody = "" + infotext = "" + source = "" +} + +global = { + \time 4/4 + \key c \major +} + +firstVerse = \lyricmode { + #(stanza 1) + Ly +} + +refLyrics = \lyricmode { + \ref + Ly +} + +firstVoice = \relative c' { + c +} + +refVoice = \relative c' { + c +} + +melodyVoice = \relative c' { + \global + \firstVoice + \refVoice + \bar "|." +} + +verseChords = \chordmode { + c +} + +refChords = \chordmode { + c +} + +songChords = \chords { + \verseChords \refChords +} + +MUSIC = { + << + \songChords + \new ChoirStaff = "firstStaff" + << + \new Voice = "firstVoice" { \melodyVoice } + \addlyrics { \firstVerse \refLyrics } + >> + >> +} + +verse-breaks = { + s1 \break +} + +TEXT = \markuplist { + %\override #`(verse-chords . ,verse-chords) + %\override #`(verse-reference-voice . ,verse-voice) + \override #`(verse-break-voice . ,verse-breaks) + \group-verses { + \chordlyrics \firstVerse + } +} + +\include "public_includes/pool_bottom.ily"