2016-04-19 23:25 GMT+02:00 David Sumbler <da...@aeolia.co.uk>: > Thank you all for your help on this. > > My original question, "how does Lilypond recognize the end of the > definition of a variable" has been answered: the definition has to be a > single, complete expression. > > Which of course produces another question: "what is classed as a single > expression?" > > Well, I think I understand what a music expression is. A single music > expression is any music (possibly including sub-expressions) enclosed > between { }, and optionally preceded by \new <context>. > > Oh yes, and it can also be preceded by \relative. > > And perhaps one or two other things. Or maybe not. > > Non-music expressions are varied: a quoted string is, not surprisingly, > a single expression. \paper { ... } is one expression. 4.5\cm is > equivalent to a particular Scheme expression. (!)
Well, all variable-definitons can be expressed in scheme... I explained it for 4.5\cm, because it's mentioned in the NR > > And, as pointed out, this is far from a complete list. > > No wonder I was, and to some extent am, confused! > > But I do have a clearer idea now of what can and cannot be used in a > variable. The form is not quite as flexible as I had hoped, Well, LilyPond uses an input-language, I don't think it qualifies as a programming-language. But you you can do a lot .... xx = \override NoteHead.color = #red is one expression yy = \override NoteHead.font-size = #5 is one expression zz = { \override NoteHead.color = #red \override NoteHead.font-size = #5 } is also one expression. A quite simple example ... > but it may > well be that it makes better sense for a variable to represent a > complete expression rather than any arbitrary chunk of the same file > without variables. > > David > Cheers, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user