lilypond-user
[Top][All Lists]
Advanced

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

Scheme question: symbol to music


From: Johan Vromans
Subject: Scheme question: symbol to music
Date: 12 Nov 2008 00:46:35 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Stupic question, I assume...

In a scheme function I have a symbol that is the name of a lilypond
expression. How can I get its music value?

E.g.

  ifDefined =
  #(define-music-function
   (parser location sym)
   (symbol?)

   (if (defined? sym)
       ??? return the value of the expression ???
    (make-music 'SequentialMusic 'void #t)))

So I can write:

  \ifDefined #'myNotes

and have it expand to myNotes (if defined), or a void music expression
otherwise.

-- Johan




reply via email to

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