lilypond-user
[Top][All Lists]
Advanced

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

Format LilyMusic as string


From: Urs Liska
Subject: Format LilyMusic as string
Date: Thu, 24 May 2018 17:33:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

I have a ly:music? argument and want to store the LilyPond representation as a string, that is I want to have a string with the content that \displayLilyMusic prints to the console.

From what I know I have to provide a port to which \displayLilyMusic's output is redirected and that I can then store. But For some reason (well, that includes the "conciseness" of the Guile reference manual ...) I don't get it done.


\version "2.19.80"
#(define format-ly-music (mus)
  (dont-know-what-to-do-here))

#(define my-var (format-ly-music #{ c' #}))

looks like a MWE for what I need.
From the reference I would have thought that call-with-output-string would be what I need, but I don't get it to work as it complains about the "unspecified" argument.

Any pointers?
Thanks in advance
Urs



reply via email to

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