[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using \score in define-markup-command
From: |
Thomas Morley |
Subject: |
Re: Using \score in define-markup-command |
Date: |
Mon, 29 Feb 2016 21:26:49 +0100 |
2016-02-29 20:57 GMT+01:00 Abraham Lee <address@hidden>:
> All,
>
> I'm trying to utilize the \score markup command within a custom
> define-markup-command that accepts a music expression, but I can't figure
> out how. I'm probably missing something obvious, but here's a minimal
> example:
>
> %%%%%%%%%%%%
>
> \version "2.19.36"
>
> \markup {
> I know I can do this:
> \score {
> \relative c'' { c8[ c] }
> }
> }
>
> #(define-markup-command (ezscore layout props mus) (ly:music?)
> (interpret-markup layout props
> #{
> \markup {
> \score {
> \relative c'' { #mus }
> }
> }
> #}))
>
> \markup { But I'd like to do this: \ezscore { c8[ c] } }
>
> %%%%%%%%%%%%
>
> Any suggestions?
>
> - Abraham
>
Uhh, markup-mode
#(define-markup-command (ezscore layout props mus) (ly:music?)
(interpret-markup layout props
#{
\markup {
\score {
\relative c'' { #mus }
}
}
#}))
\markup { I'd like to do this: "\\ezscore { c8[ c] } }" }
\markup { You can do this: \ezscore ##{ { c8[ c] } #} }
mus = { c8[ c] }
\markup { or this: \ezscore #mus }
HTH,
Harm