lilypond-user
[Top][All Lists]
Advanced

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

Markup macro?


From: Stewart Holmes
Subject: Markup macro?
Date: Wed, 16 Aug 2006 17:44:10 +0100

Thanks for the help Nicolas & Kieren. I've got the following:

fingerSwitch = #(define-music-function (parser location text) (string?)
(make-music 'SequentialMusic 'elements
 (list
  (make-music 'EventChord 'elements
   (list
    (make-music
     'TextScriptEvent
     'text
     (markup #:line (#:finger $text))
    )
   )
  )
 )
)
)

c4-\fingerSwitch "5"

but the error I get is that $text is an unbound variable. Since I don't really know much what I'm doing, I thought I'd ask for your help again.

Thanks,
Stewart

----- Original Message ----- From: "Nicolas Sceaux" <address@hidden>
To: "Stewart Holmes" <address@hidden>
Cc: <address@hidden>
Sent: Tuesday, August 15, 2006 10:38 AM
Subject: Re: Markup macro?


Kieren MacMillan <address@hidden> writes:

Hi, Stewart:

I can do what I want with \markup { \finger "5-4" }, but I'm
looking for a
nice neat macro I can use instead of having to add markup every time.

Have you tried \displayMusic?  =)

Stewart,

when the straight-forward #{ #} possible solution fails, reverting to
plain scheme, with the help of \displayMusic, is indeed what should be
done.

Try:

 \displayMusic c'
 \displayMusic c'^\markup \finger "3-5"

and see the difference: that would be the body of your music function,
that will be used that way:

c'-\functionName "3-5"  %% you cannot use ^\funName or _\funName
                        %% so direction should be hard coded

If you don't find a working solution, ask again here.

BTW, these are functions, not macros.

nicolas






reply via email to

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