lilypond-user
[Top][All Lists]
Advanced

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

Re: How to tweak X-Y-offset of left Fingerings in a chord


From: Jean Abou Samra
Subject: Re: How to tweak X-Y-offset of left Fingerings in a chord
Date: Wed, 14 Apr 2021 10:30:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1


Le 13/04/2021 à 23:18, Thomas Morley a écrit :
Hi,

let's say I've a chord with Fingerings left.
Now I want to tweak a certain Fingering a little bit up/down and left/right.

How to do so?

Here a minimal to play with:

{
  \set fingeringOrientations = #'(left)
  <c'-3 e'-2>

  %% below does not work
  \once \override Fingering.Y-offset = 10
  \once \override Fingering.X-offset = 10
  <c'-3 e'-2>

  <c'-\tweak Y-offset #-10 -3 e'-\tweak Y-offset #10 -2>
}

Changing fingeringOrientations is not an option.
Using extra-offset neither, because the Fingering will be the right
bound of the FigerGlideSpanner, which would look misplaced then.


Any hints?


Thanks,
  Harm


Hi,

Something very weird seems to be going
on. Try:

{
  \set fingeringOrientations = #'(left)
  \once \override Staff.FingeringColumn.positioning-done =
    #(lambda (grob)
       (let* ((fingering-array (ly:grob-object grob 'fingerings))
              (fingerings (ly:grob-array->list fingering-array)))
         (for-each
           (lambda (fingering x)
             (ly:message "Before: ~s" (ly:grob-property-data fingering 'X-offset))
             (ly:grob-set-property! fingering 'X-offset x)
             (ly:message "After: ~s" (ly:grob-property-data fingering 'X-offset)))
           fingerings
           '(0 -10))
         #t))
  <c'\tweak X-offset -4 -3 e'-2>
}

This displays

Before: ()

After: 0

Before: ()

After: -10

No X-offset before seems somewhat odd, but why
not. Maybe something that I haven't yet understood
is setting it.

However, the values 0 and -10 have no effect.
Instead, the \tweak takes effect (try changing
the -4), even though the value it gives to the
property is supposed to be overwritten.

This very much reminds me of
https://lists.gnu.org/archive/html/bug-lilypond/2021-01/msg00014.html ...

For X-offset, the following seems to do the trick
as long as the values are negative:

{
  \set fingeringOrientations = #'(left)
  \once \override Staff.FingeringColumn.positioning-done = ##t
  <c'\tweak X-offset -4 -3 e'\tweak X-offset -2 -2>
}

For Y-offset, I haven't found a workaround yet.


Cheers,
Jean


reply via email to

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