lilypond-user
[Top][All Lists]
Advanced

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

Re: \add-score and \bookOutputName


From: Gianmaria Lari
Subject: Re: \add-score and \bookOutputName
Date: Tue, 18 Dec 2018 16:44:28 +0100



On Tue, 18 Dec 2018 at 16:23, David Kastrup <address@hidden> wrote:
Gianmaria Lari <address@hidden> writes:

> This is just an example.
> I would like that my scheme function "test " generates a midi file with the
> name I passed to it.
> This is what I have been able to do. It compiles but it does not work:
>
> \version "2.19.82"
> test = #(define-void-function (music filename) (ly:music? string?)
>    #(add-score
>      #{
>        \book {
>          \bookOutputName $filename
>          \score $music
>          \midi{}
>        } #} ) )
>
> \test {a b} "MyFile"
>
> Any mistakes?

Sure.  add-score wants a score and you feed it a book.  Maybe you want
print-book-with-defaults instead?

Right :)
Ok, tried to substitute "add-score" with "print-book-with-defaults" but I didn't see any midi file in the default folder. But print-book-with-defaults works for midi output?
This is the code I tried:

\version "2.19.82"
test = #(define-void-function (music filename) (ly:music? string?)
   #(print-book-with-defaults 
     #{ 
       \book { 
         \bookOutputName $filename
         \score $music     
         \midi{} 
       } #} ) )

\test {a b} "MyFile"

Thank you, g.

reply via email to

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