« Return to Thread: Get the positions of a beam (or other grob with positions)

Re: Get the positions of a beam (or other grob with positions)

by David Nalesnik-2 :: Rate this Message:

| View in Thread

Hi Janek,

On Sat, May 19, 2012 at 8:03 AM, Janek Warchoł <janek.lilypond@...> wrote:
Hi David & all,

i want to make arpeggios longer (so that they overshoot the chords a
bit).  I've modified your offsetBeamPositions function to work on
Arpeggios instead of Beams (that was easy), but i'm quite surprised to
find that it doesn't work correctly with cross-staff arpeggios.  Do
you have any ideas why?  Maybe this is a bug in LilyPond?

This isn't a bug: cross-staff arpeggios belong to a different context.  In your case, they are a part of PianoStaff, so the override will have no impact.  If you do this, it will work:

  offsetCrossStaffArpeggioPositions =
 #(define-music-function (parser location offsets) (pair?)
   #{
      \override PianoStaff.Arpeggio #'positions = #(lambda (grob)
        (let* ((func (assoc-get 'positions (cdr (ly:grob-basic-properties grob))))
               (pos (func grob)))
           (coord-translate pos offsets)))
   #})

OK, that name is out of control :)

HTH,
David

_______________________________________________
lilypond-user mailing list
lilypond-user@...
https://lists.gnu.org/mailman/listinfo/lilypond-user

 « Return to Thread: Get the positions of a beam (or other grob with positions)