lilypond-user
[Top][All Lists]
Advanced

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

conditional markup


From: Orm Finnendahl
Subject: conditional markup
Date: Sat, 14 Jun 2014 15:07:34 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

 for defining markups which appear selectively either only in the
parts or only in the score I'm trying to use the following strategy:

I include a "score-defs.ly" or "part-defs.ly" file in the score or
part respectively and define commands like "sMarkup" for markup only
appearing in the score or "pMarkup" for markup only appearing in the
part by defining them to be effective or have no effect accordingly in
the part-defs and score-defs.

Unfortunately I can't seem to get the definition straight for the
custom markup command to mimic the original markup command.

Below is one of my futile attempts. Can anybody help?

\version "2.9.15"

sMarkup =
#(define-music-function
     (parser location markuptext)
     (markup?)
   #{
    \markup { #markuptext }
   #})

\relative c' { a'^ \sMarkup "Test" }

-------------------------------------------
result:

Parsing...
/tmp/markup-def.ly:11:20: error: music function cannot return (#<procedure 
line-markup (layout props args)> (Test))
\relative c' { a'^ 
                   \sMarkup "Test" }
/tmp/markup-def.ly:11:20: error: post-event expected
\relative c' { a'^ 
                   \sMarkup "Test" }




reply via email to

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