lilypond-devel
[Top][All Lists]
Advanced

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

Re: why recommend \relative to take a "c"?


From: Valentin Villenave
Subject: Re: why recommend \relative to take a "c"?
Date: Tue, 15 Dec 2009 21:24:01 +0100

On Tue, Dec 15, 2009 at 9:01 PM, Neil Puttock <address@hidden> wrote:
> A good reason would be that it would allow \relative to be removed
> from the parser: currently we need two parser rules to cater for both
> cases, whereas deprecating \relative { } would allow the command to be
> implemented as a music function instead.

Please, please don't. To me, having the ability to use \relative
without specifying a pitch is (and should remain) a feature, not a
bug. Yeah, I know, that requires parsing, yadda yadda. We can live
with it.

That being said, I can imagine (not *code*, unfortunately) a music
function that would mimic the current behavior, using one mandatory
(ly:music) argument and a second optional (ly:music) arg. If the first
arg is longer than one single note, then the optional arg isn't taken
into account and an arbitrary reference pitch is used instead.

However, considering how ubiquitous the \relative mode is, I'm not
even sure that removing it from the parser and using a (much heavier)
Scheme structure instead wouldn't affect overall performance.

Cheers,
Valentin




reply via email to

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