[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What is it with \bar "||"?
From: |
Thomas Morley |
Subject: |
Re: What is it with \bar "||"? |
Date: |
Sun, 29 Jun 2014 22:04:05 +0200 |
2014-06-29 20:52 GMT+02:00 Thomas Morley <address@hidden>:
> 2014-06-29 20:08 GMT+02:00 Patrick or Cynthia Karl <address@hidden>:
>> I recently had a problem with a \bar "||" at the end of a line suppressing
>> the initial repeat sign in the following repeat volta section. The answer
>> was to use some magical \bar instead which cured the problem. It was not
>> clear to me then why the \bar "||" seemed to cause the following section to
>> be treated as a new piece.
>>
>> I am now having a similar problem with the following code:
>>
>> \version "2.18.2"
>>
>> A = \relative b' {
>> f4 g g a % 16
>> \bar "||"
>> (f4) f f f % 17
>> }
>>
>> which throws an error: syntax error, unexpected EVENT_IDENTIFIER
>> for the attempted slur across the double bar line.
>>
>> Is there a workaround for this? If so, should I be able to figure it out?
>
> This has nothing to do with the double barline, same would happen with
> every other barline.
>
> The Slur has to be started before \bar "whatever" is called.
>
> \relative b' {
> f4 g g a( % 16
> \bar "||"
> f4) f f f % 17
> }
>
>> I still think the documentation about repeat signs only being suppressed at
>> the beginning of a piece is wrong and should be fixed. It might also be
>> nice to have a better explanation why the \bar "||" has the effects it does.
>
>
> Again, it has nothing to do with \bar "||", see:
>
> \relative b' {
> c1
> \bar ""
> \break
> \repeat volta 2 { d }
> }
>
> The point is that \bar is a music-function setting 'whichBar and
> \repeat does as well.
>
> Now I have to guess, because lack of cc-knowledge:
> \repeat is defined in cc, \bar in scheme. I guess \repeat is called
> first and \bar second.
> I.e. two commands at the same musical moment one overriding the other.
>
> Cheers,
> Harm
Actually it is a little more complicated.
The Repeat_acknowledge_engraver reads "defaultBarType" and takes it
into account.
Therefore the following works, although \bar "|" outputs _no_ barline
at line-begin:
\relative b' {
c1
c
\bar "|"
\break
\repeat volta 2 { d d }
}
Setting a different defaultBarType will work, too:
\relative b' {
\set Score.defaultBarType = #"||"
c1
c
\bar "||"
\break
\repeat volta 2 { d d }
}
In both examples the defaultBarType is recognized and the \repeat
command is not overridden.
And prints his own repeat-sign, taken from:
startRepeatType = #".|:"
which prints a _single_ barline at line end.
To get a double barline at line-end and a repeat-barline at line-start
you can let \bar ".|:-||" override the startRepeatType:
\relative b' {
c1
c
\bar ".|:-||"
\break
\repeat volta 2 { d d }
}
Or you can set this barline-type as the startRepeatType
\relative b' {
c1
c
\once \set Score.startRepeatType = ".|:-||"
\break
\repeat volta 2 { d d }
}
HTH,
Harm