lilypond-user
[Top][All Lists]
Advanced

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

Re: Vertical Spacing with Tuplets and Lyrics


From: Jean Abou Samra
Subject: Re: Vertical Spacing with Tuplets and Lyrics
Date: Tue, 20 Jun 2023 23:33:02 +0200
User-agent: Evolution 3.48.3 (3.48.3-1.fc38)

Le mardi 20 juin 2023 à 23:44 +0300, Lib Lists a écrit :

I think the problem is caused by Lilypond putting too many systems on the page (have no idea why).

The precise positioning of grobs such as tuplet brackets depends on the horizontal spacing, which is not known yet during page breaking, so LilyPond uses estimates at this stage. For tuplet brackets specifically, no such estimates are currently implemented, so their height is not taken into account, which is the reason why LilyPond ends up placing more systems on the page than is reasonable in this code. This usually isn't a problem since scores are usually not made of continuous tuplets (if there are tuplets across all the score, you would customarily omit them after writing out the first few).

Like most things, you can always customize those estimates:

\version "2.24.1"

CyBars = \drummode {
  \override TupletBracket.Y-extent =
    #(ly:make-unpure-pure-container
      ly:grob::stencil-height
      '(0  . 7)) % adjust
  \repeat unfold 15 { \repeat unfold 4 { \tuplet 3/2 { hh4 hh8 } } \break }
}
DrBars = \drummode {
  \override TupletBracket.Y-extent =
    #(ly:make-unpure-pure-container
      ly:grob::stencil-height
      '(-7 . 0))
 \repeat unfold 15 { bd4 \tuplet 3/2 { sn4 bd8 } bd4 sn \break }
}
PrOne = \lyricmode {
 \override LyricText.self-alignment-X = #LEFT
 \skip 4 "Lyrics for introduction"2.
}

\score {
  <<
  \new DrumStaff
  <<
    \new DrumVoice { \voiceOne \CyBars }
    \new DrumVoice { \voiceTwo \DrBars }

        \new Lyrics { \PrOne }
  >>
  >>
}

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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