lilypond-user
[Top][All Lists]
Advanced

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

Re: Markup macro?


From: Stewart Holmes
Subject: Re: Markup macro?
Date: Thu, 17 Aug 2006 22:13:57 +0100

Okay... I've tried that, but I'm still getting an error. A test file:

fingerSwitch =
#(define-music-function (parser location text) (string?)
 (make-music 'TextScriptEvent
  'direction 1
  'text (markup #:finger text)))

\relative
{
c1-\fingerSwitch "5-4" | c | c | c |
}

gives me the error, "syntax error, unexpected MUSIC_FUNCTION_SCM". I'm not quite sure what I'm doing wrong.

Cheers,
Stewart

----- Original Message ----- From: "Nicolas Sceaux" <address@hidden>
To: "Stewart Holmes" <address@hidden>
Cc: <address@hidden>
Sent: Thursday, August 17, 2006 7:17 PM
Subject: Re: Markup macro?


"Stewart Holmes" <address@hidden> writes:

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.

Use "$variable" only inside a #{ #} expression. When in plain scheme,
just use "variable", without $.
And the music function should only return the TextScriptEvent part.

fingerSwitch =
#(define-music-function (parser location text) (string?)
 (make-music 'TextScriptEvent
  'direction 1
  'text (markup #:finger text)))





reply via email to

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