|
From: | Jean Abou Samra |
Subject: | Re: trouble putting \book block in a scheme function |
Date: | Wed, 05 Apr 2023 22:37:30 +0200 |
User-agent: | Evolution 3.46.4 (3.46.4-1.fc37) |
Le mercredi 05 avril 2023 à 14:30 -0600, Jeff Olson a écrit :
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?
Yeah... there are known syntax quirks in that area. This works though:
\version "2.24.1"
scr =
#(define-void-function (mus) (ly:music?)
(print-book-with-defaults
#{
\book {
\score { #mus }
}
#}))
\scr { c'' }
signature.asc
Description: This is a digitally signed message part
[Prev in Thread] | Current Thread | [Next in Thread] |