1

I'm working on a transcription/editing project. At one point, the piano part has some grace-note arpeggios while the bass plays a melodic line. I am trying to make this "look nice" in the full score, and I'm having trouble figuring out how to do it.

If I compile the code below, I get the following (in the third system):

enter image description here

This introduces additional space at the start of the bar (underlined in green), which is OK — but also in the middle of the bar, which makes it harder for the conductor to interpret the rhythmic line.

If I uncomment the line \override SpacingSpanner.strict-grace-spacing = ##t, I get the following:

enter image description here

The rhythmic line in the bass is much easier to read, but the gracenote arpeggios are far too compressed, colliding with both the barlines and their own accidentals.

What I would like is some way to get the arpeggios having something like the width they have in the first example, but without inserting extra space in the middle of a bar. Extra space at the start of a bar is fine. Basically, I want to follow Gould's advice on grace note alignment in scores:

Grace notes written after the bar line displace the first beat to the right. All other parts align with the measured value, and not with the grace notes.

In a score, when grace-note groups come after the beginning of the bar, note spacing in one part need not necessarily be expanded to accommodate grace notes in another part, even though the grace notes start later in the bar than the rhythmic alignment suggests. This facilitates score reading, as it prevents distorted note spacing of a single beat.

How can I accomplish this?


Code:

(Apologies for the length, this really was about as minimal as I could make it)

\version "2.24.0"

RHpianonotes = {

% Right hand

\time 2/2
\clef bass

\relative c {
 \transposition c'
 
R1

\override Score.GraceSpacing.spacing-increment = #1.0
%<<
% {\grace{ s8.^\markup{\italic "very dry, with quick and vigorous arpeggio"}} s8}
%\\
{ \stemUp \change Staff = "lower" \grace { d32( a' bes \change Staff = "upper" \stemDown e f fis} a8) \stemNeutral }% >>
 r8 r4 
r4 \stemUp \change Staff = "lower" \grace { d,,32( a' bes \change Staff = "upper" \stemDown e f fis} a8) \stemNeutral r8 

r2 \stemUp \change Staff = "lower" \grace { d,,32( a' bes \change Staff = "upper" \stemDown e f fis} a8) \stemNeutral r8 r4

r4 \stemUp \change Staff = "lower" \grace { d,,32( a' bes \change Staff = "upper" \stemDown e f fis} a8) \stemNeutral  r8 r2

\stemUp \change Staff = "lower" \grace { d,,32( a' bes \change Staff = "upper" \stemDown e f fis} a8) \stemNeutral r8 r4 r2

\stemUp \change Staff = "lower" \grace { d,,32( a' bes \change Staff = "upper" \stemDown e f fis} a8) \stemNeutral r8 r4 
r4 \stemUp \change Staff = "lower" \grace { d,,32( a' bes \change Staff = "upper" \stemDown e f fis} a8) \stemNeutral r8 

r2 \stemUp \change Staff = "lower" \grace { d,,32( a' bes \change Staff = "upper" \stemDown e f fis} a8) \stemNeutral r8 r4
}
}

LHpianonotes = {

\time 2/2

\clef bass

\relative c { 

%\override Staff.GraceSpacing.spacing-increment = #5.0

R1

%\grace{s8.}
s1*6

}
}

bassnotes = {

\relative c {

\clef bass
\time 2/2
\transposition c

R1

\grace {s8.}
R1*2
%\noPageTurn
%\tag #'partOnly {\pageTurn}

d'4_\p r4 r8 d e d
f4->( d8) r8 r8 d e d
fis8->( f) d4 r8 \clef tenor a'8 b a
\tuplet 3/2 {c->( b) a} eis8. fis16 d4 r8 cis8~

}

}

\score{

\layout {
    \context {
      \Score
      \override SpacingSpanner.base-shortest-duration = #(ly:make-moment 1/16)
%     \override SpacingSpanner.uniform-stretching = ##t
%     \override SpacingSpanner.strict-grace-spacing = ##t
    }
  }

<<
\accidentalStyle Score.modern


\new PianoStaff 
<<
    \new Staff = "upper" {\RHpianonotes}
  \new Staff = "lower" {\LHpianonotes}
>>


\new Staff="Staff_bass"
{

<< \bassnotes  >>

}


>>


}

1 Answer 1

1

Hm, maybe something like this would work for you?

\version "2.24.0"

RHpianonotes = \relative c {
  \time 2/2
  \clef bass

  a''8 \stemNeutral r8 r4 
  << 
    r4
    {
      s16 \tiny {
        \stemUp \change Staff = "lower" { d,,32( a' bes \change Staff = "upper" \stemDown e f fis \normalsize }
      }
    }
  >>
  a8) \stemNeutral r8 
}

LHpianonotes = {
  \time 2/2
  \clef bass
  s1
}

bassnotes = \relative c {
  \clef bass
  \time 2/2
  fis'8->( f) d4 r8 \clef tenor a'8 b a
}

\score {
  <<
    \accidentalStyle Score.modern
    \new PianoStaff 
    <<
      \new Staff = "upper" \RHpianonotes
      \new Staff = "lower" \LHpianonotes
    >>
    \new Staff="Staff_bass" \bassnotes
  >>
}
4
  • I'm not at a computer with Lilypond right now, so I can't try it out immediately. But looking at the code: how would this idea work for an arpeggio at the start of the bar? In that case, the arpeggio has to fall between the barline and the first beat; and the first beat in the piano should be aligned with the first beat in the bass. Jun 13, 2023 at 14:12
  • @MichaelSeifert Doesn’t regular grace behaviour do that already? My suggestion is way you might "fake" this behaviour, as grace columns currently do not really work like this, that is, to get this to work with grace notes would require some significant change in how Lilypond handles these columns.
    – Lazy
    Jun 13, 2023 at 14:17
  • Ah, I misunderstood what you were suggesting. I'll try it out this evening and see how it works in the MWE and in the full score. Jun 13, 2023 at 14:20
  • Having tried this out, it might work if I used \teeny instead of \tiny, so that the note heads were close to the same size as the "proper" grace notes. It's not perfect, though; there's still a noticeable difference in the weights of the beams between the "fake" grace notes and the "real" grace notes, and there's also still some additional space inserted in the bass line (though less than in my original version.) Jun 14, 2023 at 2:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.