lilypond-user
[Top][All Lists]
Advanced

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

String as a command?


From: Jay Vara
Subject: String as a command?
Date: Fri, 3 Oct 2014 11:44:04 +0100

Is there a way to execute a string as a command?

For example, 

tt = 45
#(display tt)
#(newline)
jj = "tt = 65"
#(display jj)
#(newline)
tt = #(eval-string jj)
#(display tt)
#(newline)

would display the value 65 for tt, the result of evaluating the string jj.

If I define lilyA, lilyB, lilyC to be strings containing lilypond commands, and I have set xyz = lilyA, is there a way to execute xyz?

For example, 

lilyA = "\new Voice { music = {a b c d}}"

or some larger block of lilypond. 

Need: The score is standardized in an include file, the only thing changing is the music which can be a variable number of sub parts: musicA, musicB, ...... , musicN. If in the main .ly file only musicA and musicB are defined, only those two should be in score, etc. 

reply via email to

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