From 195110923a421320b99d29cccdd87261d0b9e357 Mon Sep 17 00:00:00 2001 From: tux Date: Fri, 6 Jun 2025 18:13:22 +0200 Subject: [PATCH] include another song without outputting anything --- all_base_includes.ly | 1 + include_from_song.ily | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 include_from_song.ily diff --git a/all_base_includes.ly b/all_base_includes.ly index 652abf6..def59c2 100644 --- a/all_base_includes.ly +++ b/all_base_includes.ly @@ -29,6 +29,7 @@ \include "swing_style.ly" \include "inline_score.ly" \include "custom_indentation.ily" +\include "include_from_song.ily" % reset important variables LAYOUT = \layout { \generalLayout } diff --git a/include_from_song.ily b/include_from_song.ily new file mode 100644 index 0000000..0776331 --- /dev/null +++ b/include_from_song.ily @@ -0,0 +1,7 @@ +includeFromSong = +#(define-void-function (filename) (string?) + (let ((noDefaultOutputBackup noDefaultOutput)) + (set! noDefaultOutput #t) + (ly:parser-parse-string (ly:parser-clone) + (ly:format "\\include \"~a\"" filename)) + (set! noDefaultOutput noDefaultOutputBackup))) \ No newline at end of file