lilypond-user
[Top][All Lists]
Advanced

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

trouble putting \book block in a scheme function


From: Jeff Olson
Subject: trouble putting \book block in a scheme function
Date: Wed, 5 Apr 2023 14:30:50 -0600
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1

The conclusion of [1], on how to put nicely cropped png or svg images into individual files with specified file names, was to wrap each score in a \book block with an individual \bookOutputName, as shown in that message.

Since I have 1000+ such scores, each conveniently created by a scheme function, it should be easy to just add the book wrapper inside that function.  The first step was beginning like this MWE:

\version "2.24.1"
scr =
#(define-scheme-function (mus) (ly:music?)
    #{
      %\book {
        \score { #mus }
      %}
    #} )
\scr { c'' }

But un-commenting the two lines above generates "error: bad expression type".

Adding -lDEBUG didn't explain more.  Does that error mean \book is forbidden here?

How can I include a \book wrapper (and \bookOutputName) in my score function?

Thx,
Jeff

[1] https://lists.gnu.org/archive/html/lilypond-user/2023-03/msg00417.html




reply via email to

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