|
From: | Gianmaria Lari |
Subject: | Re: scheme function generating multiple score |
Date: | Fri, 29 Dec 2017 12:28:55 +0100 |
A function can only return a single item so you could wrap the two scores in a book and then process the book.On 29/12/17 07:03, Gianmaria Lari wrote:
Sorry to bother but I'm unable to get out from this problem.
This code generate two scores:
\version "2.19.80"
\score {
\transpose c d {c' d' e'}
\layout{}
}
\score {
\transpose c e {c' d' e'}
\layout{}
}
I tried to write a scheme function doing something similar:
\version "2.19.80"
myScore = #(define-scheme-function (music) (ly:music?) #{
\score {
\transpose c d $music
\layout{}
}
\score {
\transpose c e $music
\layout{}
}
#})
\myScore {c' d' e'}
but when I try to compile I get this error
error: syntax error, unexpected \score, expecting end of input
\score {
error: error in #{ ... #}
Any suggestion?
Thank you, Gianmaria
\version "2.19.80"
myBook = #(define-scheme-function (music) (ly:music?) #{
\book {
\score { \transpose c d $music \layout{} }
\score { \transpose c e $music \layout{} }
}
#})
mybook = #(myBook #{ { c' d' e' } #})
\mybook
--
Timothy Lanfear, Bristol, UK.
_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user
[Prev in Thread] | Current Thread | [Next in Thread] |