lilypond-devel
[Top][All Lists]
Advanced

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

Re: PATCH: Doc: Clarify \relative inside \repeat issue.


From: Carl Sorensen
Subject: Re: PATCH: Doc: Clarify \relative inside \repeat issue.
Date: Thu, 29 Apr 2010 07:24:52 -0600



On 4/29/10 1:42 AM, "Mark Polesky" <address@hidden> wrote:

> Carl,
> you didn't "reply to all", but here's my response anyway:

Oh, I'm sorry.  I didn't mean to not reply to all.  Thanks for covering for
me.

> - Mark
> 
> 
> Carl Sorensen wrote:
>> I disagree with the idea that the simplest solution is to
>> move the \relative outside the \repeat.
> 
> Well, I disagree too, but the wording currently in the
> docs is even stronger:
> 
>   The correct way is to reverse the \repeat and \relative
>   commands...
> 
>     -- AU 1.4 Common errors * An extra staff appears
> 
> 
>>  This changes the music.
> 
> Good point.
> 
> 
>> I think the simplest solution is to explicitly declare the
>> Voice:
>> 
>> \context Voice {
>>   \repeat unfold 2 {
>>     \relative c' {
>>        c2 d
>>     }
>>   }
>> }
> 
> Nice.  But wouldn't the code below be just as good?  It
> would prevent an extra level of {...}, along with the
> additional indentation:
> 
> \repeat unfold 2 \context Voice {
>   \relative c' {
>     c d
>   }
> }

Personally, I think that it's better to put the \context Voice outside, but
this way works as well.

If you want to use the minumum number of { and indentation levels, you can
write

\context Voice \repeat unfold 2 \relative c' { c2 d }

or 

\context Voice \repeat unfold 2 \relative c' {
  c2 d 
}

but back when the GDP was established the LilyPond format rules said we
needed to use { } even if it wasn't required.  I couldn't find this rule in
section 3.4.3 of Contributing,  so maybe it's gone away.
> 
> 
>> Perhaps we need a (sub)section in Notation on implicit
>> Staff and Voice creation that explains the LilyPond
>> constructs that cause implicit Staff creation so that
>> users can know what to look for.
> 
> What about
>   AU 1.4 Common errors * An extra staff appears
> ?


Perfect!

Thanks,

Carl





reply via email to

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