lilypond-user
[Top][All Lists]
Advanced

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

Re: Proposed new available and recommended behavior of \relative


From: Olivier Biot
Subject: Re: Proposed new available and recommended behavior of \relative
Date: Sat, 9 Mar 2013 16:10:03 +0100

On Sat, Mar 9, 2013 at 12:20 AM, David Kastrup <address@hidden> wrote:
Olivier Biot <address@hidden> writes:

> I have mixed feelings regarding the proposed syntax update of
> \relative.
>
> Treating the first pitch of \music in \relative \music differently is
> not intuitive and will likely result in octave errors.

Treating the first pitch of \music in \relative is _absolutely_
_unavoidable_ since the very _definition_ of relative pitches means that
each pitch is specified in relation to the previous pitch, and the first
pitch _has_ no previous pitch.

So the first pitch will _always_ be special-cased.  With a reference
pitch, it is special-cased to refer to that absolute pitch.  Without a
reference pitch, it has to behave in _some_ manner as well.

I agree.
 
> Personally I think that
>
> c'' \relative { ... }
>
> is more intuitive than
>
> \relative c'' { ... }

music functions don't look back into context, and if they are in
variables, they don't even _have_ context.

I wasn't aware of this - I took for granted that this was needed to keep state. Probably \relative does this under the hood. Considering that \relative came as a feature after the core LilyPond was written, it makes sense to me now.
 
> and could be made to work even when no starting pitch has been
> specified, where the default LilyPond pitch would apply (IIRC c' as
> starting point).

The default LilyPond pitch.  If you personally think that could be made
to work, I am looking forward to your sample implementation.

Well, since there is no state information available as you stated, this is going to be tricky indeed, unless we add another command that adds some context the same way \relative computes the closest pitch to transform a relative pitch _expression_ into absolute pitches.

Or actually even a coherent and comprehensive human-readable definition
that could be placed in the manual and would make it possible for a user
to predict LilyPond's behavior without experimenting.

I see that as less of a problem. I'd read c'' \relative { e g b } as c'', then after this a series of relative pitches starting from the last known pitch (or c' - the default LilyPond pitch).

Thinking of which, I believe I am struggling with "music entry notation" versus "music storage": writing in relative pitch is often easier for note entry, but absolute pitches are IMHO better suited for storing music. I may be trying to do both with the same "grammar".

Best regards,

Olivier

reply via email to

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