Hi Valentin,
The solutions you provided worked great, I just had to tweak the arpeggio's
spacing. The configured dashed bars are also working perfectly.
No. 3:
Apologies for not having provided the code in my first email. I have
attached code based on an excerpt from a 9-page score I am working on, and
minimized its contents as much as possible. Considering how seemingly
random its behavior is, I don't know how to simplify the ossia staves for
easier inspection. Code posted below, kindly check the "vOssiaLeft" staff
for some instructions.
Thanks in advance!
Hans
================================
\version "2.22.1"
\language "english"
treble = \clef treble
bass = \clef bass
vGlobal = {
\key a \minor
\time 2/4
}
vOssiaRight = \relative c''' {
\vGlobal
<< { \ottava #1 f8-! } \\ { a, } >> \ottava #0 a,32( g f e) d8-!\noBeam
\ottava #1 <f'' a f'>8-! |
<d b' d>-!\noBeam \ottava #0 d,,32( c b a) g8-! \ottava #1 << { g'''32( f
e d) } \\ { g,8 } >> |
<< { e'8-! } \\ { g, } >> \ottava #0 g,32( f e d) c8-!\noBeam \ottava #1
e''32( g c e) \ottava #0 | \break
}
% Problem here
vOssiaLeft = \relative c' {
\vGlobal
\treble <d f d'>8-!\noBeam \bass a32( g f e) \once \stemDown d8-!\noBeam
\treble <f' d'>16-. <e c'>-. |
<d b'>8-!\noBeam \bass \stemUp <d, f>16^. <c e>16^. \stemNeutral << { <b
d>8-! } \\ { g } >> \treble <g' d' b'>8-! | %\stopStaff
<c e c'>-!\noBeam \bass g32( f e d) \once \stemDown c8-!\noBeam \treble
<c' g' e'>8-! |
% first observe the |. barline after bar 6.
% remove bar 3 of this staff and uncomment 2nd bar \stopStaff.
% notice no difference.
% but then also entirely remove the 2nd bar,
% leaving only 1 bar in this staff.
% notice final barline is fixed.
}
\score {
\new StaffGroup \with {
\override SpanBar.glyph-name = #"!"
\remove System_start_delimiter_engraver } <<
\new PianoStaff \with {
\override SpanBar.glyph-name = #"|"
\override BarLine.staff-space = #1
} <<
\new Staff = "vOssiaRight" \with {
\consists "Span_arpeggio_engraver"
\RemoveAllEmptyStaves
fontSize = #-3
\override StaffSymbol.staff-space = #(magstep -3)
} \vOssiaRight
\new Staff = "vOssiaLeft" \with {
\consists "Span_arpeggio_engraver"
\RemoveAllEmptyStaves
fontSize = #-3
\override StaffSymbol.staff-space = #(magstep -3)
} { \bass \vOssiaLeft }
>>
\new PianoStaff \with {
\override SpanBar.glyph-name = #"|" } <<
\new Staff = "vRight" \relative c'' { \vGlobal c2 c c c c c \once
\override StaffGroup.SpanBar.glyph-name = #"|." \bar "|." }
\new Staff = "vLeft" \relative c' { \vGlobal \bass a a a a a a }
>>
>>
}
On Thu, Jan 20, 2022 at 5:15 AM Valentin Petzel <[email protected]> wrote:
> Hi Hans,
>
> About 1: The cross-staff Arpeggio appears to be handled as part of the
> Staff
> Group, not of the Staves. Thus add
> \override Arpeggio.font-size = #-3
> to the PianoStaff. As this will also affect the staves within you need to
> specify
> \override Arpeggio.font-size = #0
> for these.
>
> For the SpanBars: If you open scm/bar-line.scm you can find the function
> (define (make-dashed-bar-line grob extent) [etc]
>
> And replace the line
> (staff-space (ly:staff-symbol-staff-space grob))
>
> By
>
> (grob-staff-space (ly:grob-property grob 'staff-space))
> (staff-space
> (if (null? grob-staff-space) (ly:staff-symbol-staff-space grob)
> grob-staff-space))
>
> This would then allow you to do
> \override BarLine.staff-space = #1
>
> Of course it would be much better to revise the whole span bar routine to
> specify such values from the SpanBar grob instead (so we’d be able to do
> \override SpanBar.staff-space = #1
> instead).
>
> For 3) I think it would be good if you could provide some code.
>
> Cheers,
> Valentin
>
> Am Mittwoch, 19. Jänner 2022, 15:54:13 CET schrieb Hans Kenneth Cua:
> > Hi, I am having some problems with regards to using smaller/ossia staves.
> >
> > For the problems I am about to list, I will provide dummy code (this
> format
> > is exactly what I am using for my current score, plus a few unneeded
> > overrides that I have removed for convenience):
> >
> > \version "2.22.1"
> >
> > \new StaffGroup \with {
> > \override SpanBar.glyph-name = #"!"
> > \remove System_start_delimiter_engraver } <<
> > \new PianoStaff \with {
> > \override SpanBar.glyph-name = #"|"
> > connectArpeggios = ##t
> > } <<
> > \new Staff = "vOssiaRight" \with {
> > \RemoveAllEmptyStaves
> > fontSize = #-3
> > \override StaffSymbol.staff-space = #(magstep -3)
> > \consists "Span_arpeggio_engraver"
> > } \relative { c''1\arpeggio }
> > \new Staff = "vOssiaLeft" \with {
> > \RemoveAllEmptyStaves
> > fontSize = #-3
> > \override StaffSymbol.staff-space = #(magstep -3)
> > \consists "Span_arpeggio_engraver"
> > } \relative { c'1\arpeggio }
> >
> > \new PianoStaff \with {
> > \override SpanBar.glyph-name = #"|" } <<
> > \new Staff = "right" \relative { c'1 }
> > \new Staff = "left" \relative { \clef bass c1 }
> >
> >
> >
> > 1. Cross-staff arpeggios are normal size even when they are in smaller
> > staves. How can this be fixed?
> > 2. I wish to increase the gap between dashes of the SpanBar. My true
> > intention here is to match the dashed barline produced by a normally
> sized
> > staff, because when you have ossias below the staff and none above,
> > LilyPond will use the size of the topmost staff to determine the dashed
> > barline gap. If other parts of the score have below-staff ossias, this
> > becomes inconsistent.
> > 3. This is pretty weird, refer to the image. This is the final measure of
> > the piece. I have \bar "|." as well as the StaffGroup's SpanBar
> overridden
> > to #"|." and this is what it produces. No ossia staff above (removed by
> > \RemoveAllEmptyStaves). What's weird is that when I deleted all the left
> > hand ossias up to a certain point, it fixed by itself, but letting one
> more
> > measure stay would mess it up as in the image. No \key changes, no \time
> > changes, nothing whatsoever; just a random bar that is very much like its
> > previous and succeeding bars. What's causing this problem and how can I
> fix
> > this? (any workaround is welcome if the problem cannot be solved
> directly)