lilypond-user
[Top][All Lists]
Advanced

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

Re: Moving fingering, spacing between staves


From: Jean Abou Samra
Subject: Re: Moving fingering, spacing between staves
Date: Fri, 9 Sep 2022 10:38:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0

Hi,

Le 07/09/2022 à 01:00, Knute Snortum a écrit :
In order to avoid the AB problem,


What do you call by "AB problem"?


what I'm trying to do is move some
fingering down in the system, but the problem I run into is I get too
much space between staves.

Here is a MWE:

[...]

I've attached a screenshot of what that looks like.  The problem is
there is too much space between the fingering and the markup, and this
may be because I'm not moving the fingering in the correct way.  The
X-offset works fine, but I couldn't get negative numbers to work with
Y-offset, so I tried Y-extent.  Unfortunately, I don't exactly
understand what the pair of numbers means.  It has something to do
with size, but it appears to act chaotically sometimes.  The manual
only says, "Extent (size) in the Y direction, measured in staff-space
units, relative to object’s reference point" but this doesn't tell me
what the two numbers stand for.

I'm hoping someone can explain the "extent" properties to me and help
me move the fingering without the extra space between staves.




To visualize what Y-extent does, you can compile this:


\version "2.23.13"

moveFingerB = {
  \override Fingering.X-offset = -0.5
  \override Fingering.Y-extent = #'(2 . 3)
  \override Fingering.stencil =
    #(grob-transformer
      'stencil
      (lambda (grob orig)
        (ly:stencil-add
         orig
         (stencil-with-color
          (make-filled-box-stencil
           (ly:stencil-extent orig X)
           (ly:grob-extent grob grob Y))
          "red"))))
  % \override Fingering.Y-offset = -1
}
revertFinger = {
  \revert Fingering.X-offset
  \revert Fingering.Y-extent
  \revert Fingering.stencil
  % \revert Fingering.Y-offset
}

rightHand = \relative {
  \oneVoice
  c''4 c c c |
}

leftHand = \relative {
  \clef bass
  \voiceThree
  \moveFingerB a8-3-1 \revertFinger f-2 a4 a a |
}

dynamics = {
  s1-\markup \large \italic "leggiero" |
}

\score {
  \new PianoStaff <<
    \new Staff \rightHand
    \new Dynamics \dynamics
    \new Staff \leftHand
  >>
}




An object is placed at the point defined by its Y-offset, and its
Y-extent represents the object's dimensions relative to Y-extent.
You are telling LilyPond that the objects are in different places
than where they actually are, which is why you get space between
the staves. You can also see in Frescobaldi that when you modify
Y-extent this way point-and-click is triggered by clicking on the
fake location of the object. So, Y-extent is not the right way
to move things around.

You could use \tweak Y-offset (\override does not work for technical
reasons, and you need different values for the Y-offsets of the two
fingerings anyway).

\version "2.23.12"

moveFinger = {
  \temporary \override Fingering.X-offset = -0.5
}

revertFinger = \undo \moveFinger

rightHand = \relative {
  \oneVoice
  c''4 c c c |
}

leftHand = \relative {
  \clef bass
  \voiceThree
  \moveFinger a8\tweak Y-offset 3 -3 \tweak Y-offset 4.5 -1 \revertFinger f-2 a4 a a |
}

dynamics = {
  s1-\markup \large \italic "leggiero" |
}

\score {
  \new PianoStaff <<
    \new Staff \rightHand
    \new Dynamics \dynamics
    \new Staff \leftHand
  >>
}


Or you could do something much simpler, since LilyPond already has a setting
for what you seem to want to achieve:


\version "2.23.12"

moveFinger = {
  \temporary \override Fingering.X-offset = -0.5
  \temporary \override Fingering.add-stem-support = ##f
}

revertFinger = \undo \moveFinger

rightHand = \relative {
  \oneVoice
  c''4 c c c |
}

leftHand = \relative {
  \clef bass
  \voiceThree
  \moveFinger a8-3-1 \revertFinger f-2 a4 a a |
}

dynamics = {
  s1-\markup \large \italic "leggiero" |
}

\score {
  \new PianoStaff <<
    \new Staff \rightHand
    \new Dynamics \dynamics
    \new Staff \leftHand
  >>
}



Best,
Jean




reply via email to

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