lilypond-user
[Top][All Lists]
Advanced

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

Re: Double thin bar lines and repeats?


From: Thomas Morley
Subject: Re: Double thin bar lines and repeats?
Date: Tue, 20 Jan 2015 01:40:11 +0100

2015-01-20 1:33 GMT+01:00 Thomas Morley <address@hidden>:
> 2015-01-20 0:43 GMT+01:00 Lars-Johan Liman <address@hidden>:
>> address@hidden:
>>> Try:
>>> \bar ".|:-||"
>>
>> Thanks a bunch! That does indeed work. If you ever need a trick or two
>> from the advanced DNS trick book, I'll be happy to repay you ... :-)
>>
>>> It's in the NR ;)
>>
>> I did find that part, but that is, however, not how I understood it. :-P
>>
>> Can you also explain why it's needed? Why doesn't the
>>
>> \bar "||" \break
>> \repeat 2 { ... }
>>
>> work? I _do_ realise that repeat marks at the beginning of the entire
>> piece aren't supposed to be printed, but this is not the case.
>>
>> Does the \bar "||" (or \break?) signal something to LilyPond (which \bar
>> "|" doesn't) like "end-of-phrase", that makes it treat the next line as
>> the beginning of a (sub?-)piece?  But that doesn't make sense either,
>> because another hint in the NR describes how to actually put repeat
>> marks at the very beginning, and that only works at the VERY beginning,
>> _not_ after the "||".
>>
>> Happier, but still confused, and only at a slightly higher level ... :-)
>>
>> But I need sleep. Badly ... :-)
>>
>>                                 Cheers,
>>                                   /Liman
>
> Well, _every_ BarLine has some settings in the definition how to
> behave mid-line, line-begin, line-end and for the span-bar-type.
>
> \bar "||" doesn't print a bar-line at line-begin (see bar-line.scm)
>
> The \repeat construct uses the value from 'startRepeatType' (see
> engraver-init.ly) as starting repeat-sign, default and fall-back is
> ".|:" (see repeat-acknowledge-engraver.cc and look up how ".|:" is
> defined in bar-line.scm)
>
> While inputting
> \bar "||" \break \repeat volta ...
> you have two _conflicting_ settings at the _same_ musical moment.
> One will override the other.
> Clean sollution is to define a BarLine which has the settings you
> prefer. This is done already with the predefined ".|:-||" (again, see
> bar-line-scm).
>
> Only thing I don't fully understand, why does "||" wins?
> I'd expect the ".|:" to be printed.

To answer my own question:
In repeat-acknowledge-engraver.cc is a comment and code:

  /*
    We only set the barline if we wouldn't overwrite a previously set
    barline.
  */
  SCM wb = get_property ("whichBar");
  SCM db = get_property ("defaultBarType");
  if (!scm_is_string (wb) || ly_is_equal (db, wb))
    {
      if (s != "" || (volta_found && !scm_is_string (wb)))
        context ()->set_property ("whichBar", ly_string2scm (s));
    }
}

Although I don't know C++, it seems to be pretty clear what happens

Cheers,
  Harm



reply via email to

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