Hi everyone,

I’ve been wanting to rewrite a piece using alternative dotted notes worth 5/4 the undotted notation. These cross-shaped “dots” however shouldn’t be offset vertically from their noteheads, unlike normal augmentation dots.

So I’d like to set the staff-position of the Dots grob to be just equal to that of its NoteHead, but my Lily extending skills are very rusty and I’m having trouble retrieving that NoteHead and its properties. The following ly:grob-object use doesn’t seem to work…

%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.23.2"

#(define (retrieve-parent-notehead-position grob)
   (let* ((nh (ly:grob-object grob 'note-head #f))
          (nh-staff-pos (ly:grob-property nh 'staff-position 0)))
     (format #t "NH: ~a\n" nh)
     nh-staff-pos))

dotToCross =
#(define-music-function (music) (ly:music?)
   #{
     \once \override Dots.glyph-name = "noteheads.s2cross"
     \once \override Dots.font-size = #-4
     \once \override Dots.staff-position = #retrieve-parent-notehead-position
     %\once \override Dots.extra-offset = #'(0.1 . -0.5)
     $music
   #}
   )
fivy = \scaleDurations 5/6 \dotToCross \etc

<<
  \time 5/8
  \dotToCross 2.*5/6
  \\
  \fivy a2.
>>
%%%%%%%%%%%%%%%%%%%

Thanks in advance,
Simon

Reply via email to