While constructing books using Scheme functions, I found some behaviour
I did not expect.
The scores are written out in the reverse order from the order of the
arguments. Easily fixed by applying the reverse function to the list of
scores. Is there a reason for this choice of ordering?
The scores to be written by ly:make-book-part are in a single list
argument, whereas the scores for ly:make-book are provided as one score
per argument and a variable number of arguments. The documentation
strings for the two functions are identical as regards passing the
scores. ly:make-book-part's syntax seems more natural.
\version "2.19.44"
scorea = \score { a'1 }
scoreb = \score { b'1 }
mybookpart = #(define-void-function (a b) (ly:score? ly:score?)
(let* ((bookpart (ly:make-book-part (list a b)))
(book (ly:make-book $defaultpaper $defaultheader)))
(ly:book-add-bookpart! book bookpart)
(ly:book-process book $defaultpaper $defaultlayout "bookpart")))
mybook = #(define-void-function (a b) (ly:score? ly:score?)
(let* ((book (ly:make-book $defaultpaper $defaultheader a b)))
(ly:book-process book $defaultpaper $defaultlayout "book")))
\mybookpart \scorea \scoreb
\mybook \scorea \scoreb
--
Timothy Lanfear, Bristol, UK.
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user