[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: \score block as variable/function
From: |
Neil Puttock |
Subject: |
Re: \score block as variable/function |
Date: |
Mon, 14 Mar 2011 23:01:26 +0000 |
On 14 March 2011 19:11, Xavier Scheuer <address@hidden> wrote:
> I would like to define the \score blocks as variables or as music
> functions. Unfortunately it seems impossible.
>
> I tried
>
> scoreOne = \score {
> c'1
> \layout {} % required!
> }
>
> \markup {
> \column {
> \scoreOne
> }
> }
>
> which gives "Error : syntax error, unexpected SCORE_IDENTIFIER".
>
> I tried also
>
> scoreTwo = #(define-music-function (parser location foo)
> (ly:music?)
> #{
> \score {
> $foo
> \layout {}
> }
> #}
> )
>
> \markup {
> \column {
> \scoreTwo d'1
> }
> }
>
> but it fails also : "Error : syntax error, unexpected MUSIC_FUNCTION".
>
> Any idea would be welcome!
You want a markup identifier, so all you need to do is put \markup
before \score:
scoreOne = \markup \score {
c'1
\layout {} % required!
}
\markup {
\column {
\scoreOne
}
}
Cheers,
Neil