2

In a piano score, is it possible to have grace notes not being 'synchronized' to the other staff?

I know there is \override Score.SpacingSpanner.strict-grace-spacing = ##t, but this applies to the whole score. I need it only for some parts. (Note: \override Score.SpacingSpanner.strict-grace-spacing = ##f seems to be ignored, once = ##t has been seen.)

\version "2.19.84"
\score {
  \new PianoStaff <<
    \new Staff \relative c'{
      \key e \major \time 4/4
      #(define afterGraceFraction (cons 8 9))
      \override Score.SpacingSpanner.strict-grace-spacing = ##t
      gis''2-2 \afterGrace ais\startTrillSpan {gis16( \stopTrillSpan ais)} |
      \afterGrace <bis,, bis'>4\startTrillSpan {ais'16(\stopTrillSpan bis)} <cis, cis'>2.\sf |
      \override Score.SpacingSpanner.strict-grace-spacing = ##f                     % = ##f ignored?
      \grace{b16 gis'} dis'2 \grace{cis,16 fisis} dis'2 |
    }
    \new Staff \relative c{
      \key e \major \time 4/4 \clef bass
      \repeat unfold 2 {dis16 b' gis b} \repeat unfold 2 {dis, cis' fisis, cis'} |
      fis,16 dis' gis, dis' \repeat unfold 3 {e, cis' gis cis} |
      \repeat unfold 2 {gis, gis' dis gis} \repeat unfold 2 {gis, ais' dis, ais'} |
    }
  >>
}

With strict-grace-spacing = ##t:

enter image description here

With strict-grace-spacing = ##f (or without strict-grace-spacing):

enter image description here

2
  • I'm not sure I completely understand your question, but have you tried adding \once before your override?
    – Richard
    Mar 14 '20 at 15:18
  • Yes, I have – it does not change a thing. I am trying to have the grace note in measure 1 and 2 as they are, and in measure 3, I want the extra space in the lower staff.
    – mr_georg
    Mar 14 '20 at 21:36
1

Use the \newSpacingSection command.

\score {
  \new PianoStaff <<
    \new Staff \relative c'{
      \key e \major \time 4/4
      #(define afterGraceFraction (cons 8 9))
      \override Score.SpacingSpanner.strict-grace-spacing = ##t
      gis''2-2 \afterGrace ais\startTrillSpan {gis16( \stopTrillSpan ais)} |
      \afterGrace <bis,, bis'>4\startTrillSpan {ais'16(\stopTrillSpan bis)} <cis, cis'>2.\sf |
      \newSpacingSection
      \override Score.SpacingSpanner.strict-grace-spacing = ##f
      \grace{b16 gis'} dis'2 \grace{cis,16 fisis} dis'2 |
    }
    \new Staff \relative c{
      \key e \major \time 4/4 \clef bass
      \repeat unfold 2 {dis16 b' gis b} \repeat unfold 2 {dis, cis' fisis, cis'} |
      fis,16 dis' gis, dis' \repeat unfold 3 {e, cis' gis cis} |
      \repeat unfold 2 {gis, gis' dis gis} \repeat unfold 2 {gis, ais' dis, ais'} |
    }
  >>
}

Check out here: http://lilypond.org/doc/v2.19/Documentation/notation/new-spacing-section

By the way, the new stable version 2.20 has just been released.

0

I removed the Scheme definition and the two overrides, I that produces what I think you want.

\version "2.19.84"
\score {
  \new PianoStaff <<
    \new Staff \relative c'{
      \key e \major \time 4/4
      gis''2-2 \afterGrace ais\startTrillSpan {gis16( \stopTrillSpan ais)} |
      \afterGrace <bis,, bis'>4\startTrillSpan {ais'16(\stopTrillSpan bis)} <cis, cis'>2.\sf |
      \grace{b16 gis'} dis'2 \grace{cis,16 fisis} dis'2 |
    }
    \new Staff \relative c{
      \key e \major \time 4/4 \clef bass
      \repeat unfold 2 {dis16 b' gis b} \repeat unfold 2 {dis, cis' fisis, cis'} |
      fis,16 dis' gis, dis' \repeat unfold 3 {e, cis' gis cis} |
      \repeat unfold 2 {gis,16 gis' dis gis} \repeat unfold 2 {gis, ais' dis, ais'}  
    }
  >>
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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