Hello all,

When working on pieces with many movements or parts, it's desirable to use some mechanism to encode the hierarchy of information. Everything ends up in variables anyway, so unless there is some convenient POJO/dictionary/map-like structure to introduce hierarchy, it should be reflected in the variable names.

LilyPond variables are Scheme variables under the hood, and, so far as I can tell, Scheme generally uses the so-called kebab-case, with a colon to indicate scoping/hierarchy (as reflected in LilyPond itself with ly: functions). Since numbers and most other punctuation characters are also allowed, various conventions are used for specific types of values/functions (like ? for predicates, ! for mutation, -> for conversion, etc.). / is also allowed, and I've seen it used for scoping in Emacs Lisp.

The trouble is that numbers and punctuation (…all that I've tried) other than - are not allowed in LilyPond identifier syntax. In my own projects, I've been using camelCase, - for hierarchy, and Roman numerals for numbers: stuff like `\movementXVII-tenoreII-lyrics-it' (not a real example). Roman numerals can get annoying very quickly, though. So my question:

 * Is there some way to express hierarchy other than in variable names?
 * Is there some way to express hierarchy and plain Arabic numerals in
   variable names, that can be used from LilyPond syntax directly
   without relying on $?

Reply via email to