bug-lilypond
[Top][All Lists]
Advanced

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

Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c


From: lilypond
Subject: Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c'
Date: Fri, 27 May 2011 19:00:30 +0000

Status: Accepted
Owner: ----
Labels: Type-Enhancement Priority-Postponed

New issue 1670 by address@hidden: Allow numbers in variable names: violin1mvt2 = c'
http://code.google.com/p/lilypond/issues/detail?id=1670

Users often request variable names including numbers or underscores
(http://lists.gnu.org/archive/html/lilypond-user/2011-05/msg00177.html)

1) It is not too hard for the lexer, which breaks input into tokens, to accept backslashed variable names with various characters.
(http://lists.gnu.org/archive/html/lilypond-devel/2004-03/msg00124.html)

We could then use something like:
   "violin1" = { c d e }
   \new Staff \violin1
but what do we really want to allow in variable names?

I don't think underscores are a good idea, because both human and computer could be confused: c^\slide_1 % is that slide on the first finger or did somebody define \slide_1 ?

Ending in a number would require we enforce the space after a command (and convert-ly old scores) for cases like \times2/3{c d e}


2) There is considerable difficulty in telling Lilypond to be ready for the definition of a variable that looks somewhat like, because the grammar allows un-braced music expressions and user-defined functions.
  \mySpecialAfterGrace do1 re2 mo3 = fa2

Lily would need to know how many arguments \MySpecialAfterGrace takes to know whether she needs to look up 'mo' as the name of a pitch in some language. Either that, or tentatively read through to the '=' and then back up when she realized 'mo' was not a mis-typed note name.

(2) might be impossible, but maybe users want \violin1 badly enough to use quotes around it in the definition, as I did above?





reply via email to

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