lilypond-user
[Top][All Lists]
Advanced

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

Re: Why no numbers allowed in variables?


From: David Kastrup
Subject: Re: Why no numbers allowed in variables?
Date: Tue, 02 Oct 2018 23:07:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Kieren MacMillan <address@hidden> writes:

> Hi David,
>
> Thanks for the examples and explanations.
>
>> You'd probably also think that
>> 
>> { c = -3 }
>> 
>> is an assignment.  It isn't.  It is a note c with a relative octave
>> check and a fingering of 3 .
>
> Fair enough. So there would, at the very least, be some sort of new
> assignment syntax for variables with numbers in them. Ugh.
>
>> It isn't "post-fixed".  It is a note of its own.
>> partI = { tambourine 4. 8 4 4 }
>> \drums { \rhythm 2 r2 }
>
> Can the compiler not be instructed on how to tell the difference between
>
>    \rhythm2
>
> and
>
>   \rhythm 2
>
> ? (Honest question: I don’t know the parser / lexer / compiler limitations.)

So spaces before numbers and following letters are to be interpreted
differently when the preceding letters happen to be a pitch name?  And
when assigning a pitch to a variable, I need to separate the use of the
variable from the following duration?  Also if the duration is something
like \breve ?

At any rate, spaces are _separators_ of some lexical entities but do not
become a lexical entity themselves.  Trying to let them interact with
some semantical differences here is really nightmarish stuff.  It would
be close to impossible to write coherent reliable manuals describing
that kind of handwaving even if you managed to fudge something meeting
more naive expectations than breaking currently more-or-less consistent
behavior.

-- 
David Kastrup



reply via email to

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