[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Call a score variable by a scheme expression
From: |
Marc Hohl |
Subject: |
Call a score variable by a scheme expression |
Date: |
Thu, 27 Dec 2012 18:37:37 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
Hello list,
I think this has been answered before, but I don't find it in the
archives...
Assume I have the following file scoretest.ly:
\version "2.17.10"
#(define opt-score (or (ly:get-option 'score) "Full"))
musicA = \relative f {
c''4 d e f | g1
}
musicB = \relative f {
c'4 b a f | g 2 g
}
testScoreA = \score {
\new Staff { \musicA }
}
testScoreB = \score {
\new Staff { \musicB }
}
testScoreFull = \score {
<<
\new Staff { \musicA }
\new Staff { \musicB }
>>
}
\score {
#(string-append "testScore" opt-score)
}
I want to call this file either by lilypond without options,
which should yield in calling \testScoreFull in the \score { ... },
or by 'lilypond -dscore="A" testscore.ly' to obtain \score { \testScoreA },
'lilypond -dscore="B" testscore.ly' should produce \score { \testScoreB }.
The test file does not work, and I am sure that I have seen
something very similar somemonths ago, but I don't find it right now.
Any hints are highly welcome!
Thanks in advance,
Marc
- Call a score variable by a scheme expression,
Marc Hohl <=