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: David Kastrup
Subject: Re: Proposed new available and recommended behavior of \relative
Date: Fri, 08 Mar 2013 07:24:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Graham Percival <address@hidden> writes:

> On Fri, Mar 08, 2013 at 06:29:34AM +0100, David Kastrup wrote:
>> Graham Percival <address@hidden> writes:
>> 
>> > Whereas keeping the explicit initial pitch:
>> >   \relative c' { c' c' }
>> > the c' outside the {} means "middle C"
>> > each c' inside the {} means "jump an octave higher"
>> 
>> Not every piece starts from c, and we had lots of discussions about what
>> to do when it doesn't.  I think we promoted using \relative x''' { x for
>
> Yes.
>
>> this case so that one would not have to figure out the relation of x to
>> c to figure out the starting pitch, and \relative x''' { x is really
>> not more helpful than \relative { x'''.
>
> I disagree.  In that case, the x''' *outside* the {} is interepted
> as an absolute note, while all the xyz *inside* the {} are
> interpreted as relative notes.

So after my proposal, the first explicit pitch after \relative is
interpreted as an absolute note, whether or not it comes right after
\relative or occurs within the music itself.

> The fact that this uses \context Voice tells me that it was
> probably written before 2005 or so, since I don't use that
> construct and would normally complain about it if I saw it in a
> patch.  I am entirely unsurprised that there are flaws in the
> docs.
>
>> sopranoMusic = \relative c'' {
>>   \clef "treble"
>>   r4 d2 a4 | d4. d8 a2 | cis4 d cis2 |
>> }
>
> looks ok to me?

You prudently snipped the following immediately adjacent code
vascillating between different conventions.

>> And make no mistake: our code base does not show _any_ coherent usage
>> of \relative.
>
> That's no surprise to anybody familiar with the docs.

The thing is that we could make an automated conversion (after all,
that's what I do) to rectify this.

It is just that the existing possibilities as a target for automatic
conversion are not really satisfactory.  The only thing not leading to
undesirable out-of-scale contortions would be \relative x''' { ... x
(rather than octave of c), and if one uses that consistently, there is
no point in not calling it \relative { ... x''' in the first place.

-- 
David Kastrup



reply via email to

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