lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

List of scores for book function


From: Pierre-Luc Gauthier
Subject: List of scores for book function
Date: Sat, 13 Jan 2018 11:52:45 -0500

Hi there,

I'm trying to pass a list of scores to a book generating function and
I have a few questions.
Please see example post scriptum.

How should I structure (syntax) my score list?
I did some trials and (only) errors…

How should I iterate over said list?
I'm not quite sure how to "unfold" the score if that makes any sense.
I am using (display (car score-list)) just to figure out what is going on.

Good day
-- 
Pierre-Luc Gauthier

%%%%%%%%%%%%%%%%%
\version "2.21.0"

scoreI = \score {
  {\key cis \major ces''4}
  \layout {}
}

scoreII = \score {
  {\key ces \major cis''4}
  \layout {}
}

bookFunc = #
(define-void-function
 (score-list filename)
 (list?  string?)
 (ly:book-process #{
   \book {

     \score {
       {c'4}
       \layout {}
     }

     %$(for-each score-list
     %   (lambda (score)
     %     $score
     %     ))

   }
   #} #{ \paper {} #} #{ \layout {} #}
   (string-append "Part-" filename)))

\bookFunc #'(scoreI scoreII) "fileName"

Attachment: scoreListBookGen-01.ly
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]