Hi all,  I'm working on a work-around for a collision between ledger lines and articulations, for Clairnote an alternative notation system: http://clairnote.org/sn/  LilyPond does not currently take non-standard 'extra' ledger lines into account when positioning articulations.  Here's a minimal example with a proof of concept for a possible work-around:

%%%%%%%%%%

\version "2.19.63"

m = {
  c'''
  c'''\fermata
  c'''\trill
  c'''-^
  c'''-.
  c'''\segno
}

% collisions ahead!
{
  \override Staff.StaffSymbol.ledger-extra = 2
  \m
}

% wrap the usual Script.Y-offset procedure in another
% one to make an adjustment to what it returns, to
% avoid the collisions
{
  \override Staff.StaffSymbol.ledger-extra = 2
  \override Staff.Script.Y-offset =
  #(lambda (grob)
     (+ 1 (ly:side-position-interface::y-aligned-side grob)))
  \m
}

%%%%%%%%%%

Here's my specific question.  The docs say this for the Y-offset property of the Script object:

|Y-offset| (number):

   |#<unpure-pure-container #<primitive-procedure
   ly:side-position-interface::y-aligned-side> #<primitive-procedure
   ly:side-position-interface::pure-y-aligned-side> >|

   The vertical amount that this object is moved relative to its Y-parent.

http://lilypond.org/doc/v2.19/Documentation/internals/script

But in the source code, in 'scm/define-grobs.scm', for the Script grob I see no mention of unpure-pure-container:

(Y-offset . ,side-position-interface::y-aligned-side)

I see other grob properties in that file that do have the unpure-pure-container pattern, like Rest.Y-extent:

(Y-extent . ,(ly:make-unpure-pure-container ly:rest::height ly:rest::pure-height))

So am I missing something or are the docs off for Script.Y-offset? Is a call to "(ly:side-position-interface::y-aligned-side grob)" actually the default call to use?

(On the other hand, maybe it would work to change the Y-parent of Script grobs to be the ledger lines grob in cases where there are ledger lines that are further from the staff than the furthest note head?)

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

Reply via email to