Thank you David!
Yes, this solved my problem, and I am satisfied. It works fine also with four staves Choir staff which I will use it for.
/Kaj

Den 2015-02-04 02:50, skrev David Nalesnik:
Hi,

On Tue, Feb 3, 2015 at 4:35 PM, David Nalesnik <david.nales...@gmail.com <mailto:david.nales...@gmail.com>> wrote:

    Hi Kaj,

    On Tue, Feb 3, 2015 at 1:37 PM, Kaj Persson <kape_...@algonet.se
    <mailto:kape_...@algonet.se>> wrote:

        In the snippet collection, the "Repeats" section, there is one
        named "Shortening volta brackets". I have use for just this,
        since in a piece of music I need some extra space in order to
        put a mark immediately after the volta alternative bracket. So
        I tested it, and, yes, the example promised well. The method
        is to work with the variable voltaSpannerDuration via the the
        statement:
            "\set Score.voltaSpannerDuration = #(ly:make-moment 2 4)"
        This way you can shorten the bracket even down to one single
        strike:


        But when I expand the system to this, hence two staves instead
        of one, this happens:



I'll have to look at this some more, but it seems there is a bug. Even in the single staff example, there is a warning: "cannot end
    volta spanner".  I get this with the snippet you reference as
    well.   Possibly there is a flaw in lily/volta-engraver.cc.  And
    another "possibly": this might be related to what happens in your
    multi-staff example.

Yes, there is a problem in the file that defines the engraver. Unfortunately, there would need to be a fix to this file to enable you to use the property voltaSpannerDuration to give you what you want (and this wouldn't be available until the next release).

Fortunately, there is a workaround, though you will need to "eyeball" it to get a good result. Try this:

 \version "2.18.2"

StaffA = \relative c' {
  c4 c c c
  \repeat volta 2 { d4 d d d }
  \alternative {
    {
      e4 e e e
    }
    {
      % Shorten the volta bracket
      \override Score.VoltaBracket.shorten-pair = #'(0.5 . 5)
     % OR:
    % \offset shorten-pair #'(0 . 5) Score.VoltaBracket
      f4 r4 r4 r4
    }
  }
  \repeat volta 2 {g4 g g g}
}

StaffB = \relative c'{
  c4 c c c
  \repeat volta 2 { d4 d d d }
  \alternative {
    {
      e4 e e e
    }
    {
      % Shorten the volta bracket
      %\override Score.VoltaBracket.shorten-pair = #'(0.5 . 5)
      f4 r4 r4 r4
    }
  }
  \repeat volta 2 {g4 g g g}
}

\score {
  <<
    \StaffA
    % Remove the comment sign (%) on next line to get two staves.
    \StaffB
  >>
  \layout {
  }
}

%%%%%
Hope this helps,
David

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to