lilypond-user
[Top][All Lists]
Advanced

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

Re: Repeats - Strange behavior??


From: Thomas Morley
Subject: Re: Repeats - Strange behavior??
Date: Wed, 28 Jan 2015 22:11:48 +0100

2015-01-28 3:30 GMT+01:00 Cynthia Karl <address@hidden>:
>
>> Message: 6
>> Date: Wed, 28 Jan 2015 00:02:13 +0100
>> From: Thomas Morley <address@hidden>
>> To: Chris Trahan <address@hidden>
>> Cc: LilyPond User Group <address@hidden>
>> Subject: Re: Repeats - Strange behavior??
>> Message-ID:
>>       <address@hidden>
>> Content-Type: text/plain; charset=UTF-8
>>
>> 2015-01-27 23:35 GMT+01:00 Chris Trahan <address@hidden>:
>>> I have two examples in the following code.
>>>
>>> The fist one shows a repeated section starting at measure 4.
>>>
>>> The second shows the same code, except that a double bar ends measure 3.  In
>>> this case, the repeated section is not correct.
>>>
>>> Is this a bug or by design?
>>
>> Hi,
>>
>> it's hardcoded in repeat-acknowledge-engraver.cc not to set the
>> 'which-bar-property (i.e. the opening repeat-sign, taken from the
>> relevant context-property), if the user sets an own 'which-bar, i.e.
>> in this case: \bar "||"
>>
>> So it's by design prefering the users choice ;)
>
> Das ist Quatsch!

I really hope you intended to express your feelings about current
LilyPond-behaviour (not that I'd agree) and not to comment my
analysis.


And current lily-behaviour is not nonsense!
If the user specifies what he wants, LilyPond should not reject it.
Ofcourse this will have the consequence that the user may use
inappropiate (or even wrong) code, which will not lead to the output
he may desire.

> The user simply wanted the section of music before the repeated section to 
> end with a double bar.  He didn't want the opening repeat-sign  to be 
> suppressed.  :(

So this is what he coded, \bar "||" will _not_ print a visible
bar-line at line-begin.
Although it is pretty obvious what was intended, the code was not
sufficient. Though the solution is predefined and documented:
NR:
"
Although the bar line types signifying repeats may be inserted
manually they do not in themselves cause LilyPond to recognize a
repeated section. Such repeated sections are better entered using the
various repeat commands (see Repeats), which automatically print the
appropriate bar lines.

In addition, you can specify ".|:-||", which is equivalent to ".|:"
except at line breaks, where it gives a double bar line at the end of
the line and a start repeat at the beginning of the next line.
"

>
>>
>>> \version "2.18.2"
>>
>>>
>>> \score {
>>>  \relative c'' {
>>>    %% When a double bar is added, the repeat is not correct.
>>>    \repeat unfold 3 {c d e f} \bar "||" \break
>>
>> use \bar ".|:-||" instead, see NR ;)
>
> Why shouldn't it be changed to work like the 99% would like?

I'm not sure about that 99%
Speaking only for me, sometimes I want a single bar-line, sometimes a
double-bar-line, sometimes a segno bar-line at the line end, before
next line starts with a repeat-section.

And the functionality to change the opening repeat-sign is in place already:
NR
"
startRepeatType (string)

Set the default bar line for the beginning of repeats.
"
And in IR:
"
2.1.25 Score
[...]
Set translator property startRepeatType to ".|:".
"

It would be a oneline patch to change LilyPond default to ".|:-||"
Though then users wanting a single bar-line at line-end would start to ask why
{
  %% fakes the patch:
  \set Score.startRepeatType = ".|:-||"
  R1
  \bar "|"
  \break
  \repeat volta 2 { R1}
}
prints a double-bar-line at line-end.
The explanation for it, as well as the workaround to make a single
bar-line at line-end possible, would be far more arcane.

> Let those who want the current behavior use, say, \bar "~://?" to indicate 
> that they don't want the usual opening repeat-sign to appear.

This is a misunderstanding of current behaviour.
The skipped opening repeat-sign is a consequence of the inapropiate
setting of \bar "||".

> The others don't want to delve into the arcana of the various bar signs.

Well, I really think the bar-lines a very well explained in the NR.
Can't see any issue here.

> They just want the section before a repeat section to end with a double-bar.

Then they should do as adviced in the NR.


The one and only issue I see here:
The problem of line-breaking bar-lines is ofcourse topic in the
section about BarLines, with a link to the section about repeats.
Maybe we should add a link to bar-lines in the repeat-section as well.


-Harm



reply via email to

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