lilypond-user
[Top][All Lists]
Advanced

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

Re: Defining a markup text using Scheme


From: tisimst
Subject: Re: Defining a markup text using Scheme
Date: Mon, 20 Jul 2015 15:23:44 -0700 (MST)

Caio,

You almost have it. Just add a hyphen - immediately before \markup inside the function and when you call the function in the music with \circled (or using an underscore _ or carat ^ if a specific direction is needed) and it should work in both versions (2.18.2 and 2.19.23):

circled = #(define-music-function (parser location txt) (string?)
#{ -\markup { \circle #txt } #})

\relative c' { c-\circled #"1" c_\circled #"dn" c^\circled #"up"}

- Abraham

On Mon, Jul 20, 2015 at 3:12 PM, Caio Barros [via Lilypond] <[hidden email]> wrote:
Hello!

I'm trying to build a function that creates a circled text of my choice using \markup and a bit of Scheme. So far what I have is:

circled = #(define-music-function (parser location txt) (string?)

#{ \markup { \circle #txt } #})


\relative c' { c \circled #"1" }



But when I run it with Lilypond 2.19.23 I get:


In _expression_ (value->lily-string m):

/home/caio/lilypond/usr/share/lilypond/current/scm/ly-syntax-constructors.scm:33:14: Unbound variable: value->lily-string



Version 2.18.2 gives me:

music function cannot return (#<procedure line-markup (layout props args)> ((#<procedure circle-markup (layout props arg)> 1)))

\relative c' { c
 
\circled #"1" }


What am I doing wrong?
Caio G. de Barros


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user



If you reply to this email, your message will be added to the discussion below:
http://lilypond.1069038.n5.nabble.com/Defining-a-markup-text-using-Scheme-tp178878.html
To start a new topic under User, email [hidden email]
To unsubscribe from Lilypond, click here.
NAML



View this message in context: Re: Defining a markup text using Scheme
Sent from the User mailing list archive at Nabble.com.

reply via email to

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