lilypond-user
[Top][All Lists]
Advanced

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

Re: Placement of clefs at repeat bars


From: Peter Toye
Subject: Re: Placement of clefs at repeat bars
Date: Sun, 4 Feb 2018 11:31:32 +0000

Saturday, February 3, 2018, 8:22:38 PM, you wrote:

> Hi Peter,

> 2018-02-03 20:08 GMT+01:00 ptoye <
address@hidden>:
>> I've found that this is was reported as an "ugly" in 2011.

> Plese provide the link.
https://sourceforge.net/p/testlilyissues/issues/1862/

>> I think it's a bug
>> as the output is definitely incorrect.

> Look at the following examples
> (1)
> %\unfoldRepeats
> \new Staff {
>  \time 4/4
>  \clef "bass"
>  c'2 c'
>  \repeat volta 2 { c' c' | \clef "treble" c'  c' \clef "bass" }
>   c' c'
> }

> Imho, all's correct, even if you uncomment unfoldRepeats

I beg to disagree. The music you show is not the same as mine - it has a bass clef at the beginning of the repeat and at the bar following the repeat, so the bass clef at the end of bar 3 is correct.

The problem occurs when the clef at the end of the repeated section is different from the clef following the repeat, but the same as the clef at the beginning of the repeat. In that case the clef change should refer only to the music after the repeat, so shold come after the closing repeat bar, not before it. It's worse when there's an alternative, as the clef change sign is not even in the music being played. Try the following, where the player will go to the 2nd alternative without noticing that they're meant to be in bass clef, and play a treble clef A rather than a bass clef C. Embarrassing :(>

\version "2.19.52"

\language "english"


\new Staff {
 \time 4/4
 \clef "treble"
 c''1

 \repeat volta 2 {
   c''| }
 \alternative {
   {
     c''4 \clef "bass" c4 \clef "treble" c''2
   }
   {
     \clef "bass" c1
   }
 }

}


> (2)
> %\unfoldRepeats
> \new Staff {
>  \time 4/4
>  \clef "treble"
>  c'2 c'
>  \repeat volta 2 {
>   %\clef treble
>   c' c' |  c'  c'
>   \clef "bass"
>  }
>   c' c'
> }

> Here the bass-clef at end-repeat is misleading.
Agreed. That's what I want to change.

> Uncommenting unfoldRepeats will lead to likely undesired results
> (which can be fixed by uncommenting the treble-clef at start-repeat)

True

> Though, how should LilyPond behave differently?
> The clef at end-repeat can't know which one is valid at start-repeat.

Well, in theory LilyPond can remember what the clef was at the start of the repeat and insert a clef change if needed. The bug report also mentions time signatures, but I've not checked that.

> So I tend to "no bug" or rather "won't fix".

Disagree about the "no bug".

> I don't see a possibility to make it work without adding a wagonload of code.
> Likely in C++, so I'm out anyway.

I don't know the Lilypond code so can't comment. How big is your wagon? I'm an ex-programmer and software designer, but so out of practice that I wouldn't dare do anything with it. And I have only a passing acquaintance with C++ anyway.

> Instead you can add the proper clef at start-repeat (it will not be
> printed unless forced), to fix repeatUnfold, and use something at the
> lines of the override Mark provided already.

repeatUnfold isn't the issue (with me at this time, anyway), but I agree that the result is wrong.

> Cheers,
>   Harm

All the best,

Peter
reply via email to

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