Dies ist das Archiv des alten Forums (bis März 2017). Das aktuelle Forum ist unter https://lilypondforum.de zu finden. This is the archive of the old forum (until March 2017). You can find the current forum at https://lilypondforum.de.
\version "2.18.2"out = #(define-music-function (parser location fileName) (string?) #{ \score { \new Staff { \include $fileName } } #} )\out #"file.ly"
\version "2.18.2"\score { \new Staff { \include "01.ly" }}\score { \new Staff { \include "02.ly" }}\score { \new Staff { \include "03.ly" }}\score { \new Staff { \include "04.ly" }} %% etc....
\version "2.18.2"%% See the following links:%% http://lists.gnu.org/archive/html/lilypond-user/2012-02/msg00766.html%% continued:%% http://lists.gnu.org/archive/html/lilypond-user/2012-03/msg00010.html%%%% lalily in openlilylib by Jens-Peter Vogt%% https://github.com/openlilylib/openlilylib/tree/19db8f4851b04cdaceafd8851b17e6a21e0191f0/templates/lalily%% paper- and layout-settings for testing only\paper { indent = 0 }\layout { \override Staff.BarLine.color = #red }#(define-public (set-book-headers! book header) (let ((bookhead (ly:book-header book))) (if (or (not bookhead)(list? bookhead)) (begin (set! bookhead (make-module)) (ly:book-set-header! book bookhead) )) ;; 'get-music-folder-options' isn't defined here ;; look in lalily for more info, link above ;; ;;(if (not (list? header)) ;; (set! header ;; (assoc-get 'header ;; (get-music-folder-options ;; (if (ly:input-location? header) ;; header ;; #f)) ;; '()))) (for-each (lambda (p) (if (pair? p) (let ((key (car p)) (val (cdr p))) (module-define! bookhead key val)))) header) )) #(define-public (set-score-headers! score header) (let ((scorehead (ly:score-header score))) (if (or (not scorehead)(list? scorehead)) (let ((mod (make-module))) (set! scorehead mod) (ly:score-set-header! score scorehead))) ;; see comment in 'set-book-headers!' ;; ;;(if (not (list? header)) ;; (set! header (assoc-get 'header ;; (get-music-folder-options ;; (if (ly:input-location? header) ;; header ;; #f)) ;; '()))) (for-each (lambda (p) (if (pair? p) (let ((key (car p)) (val (cdr p))) (module-define! scorehead key val)))) header) ))out = #(define-void-function (parser location file-name-list header) (list? list?) (let* ((scores (map (lambda (file-name) #{ \score { \new Staff { \include $file-name } } #}) file-name-list)) (myname (ly:parser-output-name parser)) (book-part (ly:make-book-part (reverse scores)))) (set-book-headers! book-part header) (ly:book-process book-part $defaultpaper $defaultlayout myname))) %% Drawback: No other input is accepted!!%% The book-header has to be built.%% TODO: 'piece' from header will appear in every score. %% Go for 'set-score-headers!' ...\out #'( "test-include-01.ly" "test-include-02.ly" "test-include-03.ly" ) %% book-header-settings: #'( (title . "title") (subtitle . "subtitle") (composer . "composer") (piece . "piece") )