lilypond-user
[Top][All Lists]
Advanced

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

Using strings and other types to return markup


From: Phil Holmes
Subject: Using strings and other types to return markup
Date: Wed, 11 May 2016 09:31:28 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

> I'm not top posting

I want to create a function in scheme that will take a string argument 
something like "san~t" and return a markup which will place the tilde 
above the n.  I know how to create the markup using markup functions like 
combine and translate, but I want to make this easier by using a scheme 
function.  I'm struggling to work out how to take a string argument and 
use it to return markup.  My test function is:

#(define-markup-command (do-tilde layout props theText) (string?)
  (interpret-markup layout props
        (markup (theText) )
))

I call it with:

mel = \relative c'' { c4  }
lyr = \lyricmode { \markup { \do-tilde #"Testing" } }
<<
\new Voice = melody \mel
\new Lyrics \lyricsto melody \lyr
>>

I get the error

In expression (theText):
LyricTest.ly:13:17: Wrong type to apply: "Testing"

Can anyone point out to me what I'm doing wrong (or how to do this 
correctly?)

TIA




reply via email to

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