lilypond-user
[Top][All Lists]
Advanced

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

Re: scheme function returning two scores


From: Gianmaria Lari
Subject: Re: scheme function returning two scores
Date: Sun, 25 Feb 2018 22:55:15 +0100



On 25 February 2018 at 14:50, David Kastrup <address@hidden> wrote:
Gianmaria Lari <address@hidden> writes:

> Yes, I tried it but didn't work.... did I made a mistake?
>
> \version "2.19.81"
>
> myScore = #(define-scheme-function (music) (ly:music?) #{
>   \bookpart {
>     \score { $music \layout{} }
>     \score { \unfoldRepeats $music \midi{}}
>   } #} )
>
> \myScore {\repeat percent 2 {c' d' e' f'}}
> \myScore {\repeat percent 2 {g c' c' c'}}
>
>
> I also tried bookpart inside a book
>
> \version "2.19.81"
>
> myScore = #(define-scheme-function (music) (ly:music?) #{
>   \bookpart {
>     \score { $music \layout{} }
>     \score { \unfoldRepeats $music \midi{}}
>   } #} )
>
> \book {
> \myScore {\repeat percent 2 {c' d' e' f'}}
> \myScore {\repeat percent 2 {g c' c' c'}}
> }

Interesting.  Looks like books/bookparts as scheme function values are
not handled in the parser.  Probably worth a bug report.

At the moment http://sourceforge.net/p/testlilyissues/issues is down and I'm not able to check if the bug has been already reported. I will check again later. (I have never reported a bug before. Please let me know if this is not  the correct procedure).

In the mean time, you could define a void function and let it just call
toplevel-score-handler on your scores.  Of course, this would no longer
allow you to place those scores in a book or bookpart.

Ahem.... I need some more help. I saw online that I can create a void function with this "signature": define-void-function. But I have no idea what I have to do with it. If you can help I would appreciate.
Thank you David.

reply via email to

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