Hi Simon,

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.

Maybe something like this?

The idea is that any note with a duration compressed by factor 5/6 should be regarded as a cross-for-dot note.

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

#(define Cross_dots_engraver
   (lambda (ctx)
     (make-engraver
      (acknowledgers
       ((dots-interface engraver grob source-engraver)
        (let*
         ((cause (event-cause grob))
          (duration (ly:event-property cause 'duration))
          (factor (ly:duration-factor duration)))

         (when (equal? factor '(5 . 6))
           (ly:grob-set-property! grob 'glyph-name "noteheads.s2cross")
           (ly:grob-set-property! grob 'font-size -4)
           ;; a hack: In Dot_column::calc_positioning_done,
           ;; the shifting of dots away from staff line is avoided for Kievan-style dots.
           ;; cf. https://gitlab.com/lilypond/lilypond/-/issues/2857
           ;; and commit ef2f119f919ce.
           (ly:grob-set-property! grob 'style 'kievan))))))))

\layout {
  \context {
    \Voice
    \consists #Cross_dots_engraver
  }
}

fivy = \scaleDurations 5/6 \etc

{
  <<
    \time 5/8
    c'2.*5/6
    \\
    \fivy a2.
  >>
  c'4. d'4
  e'2.*5/6
}
%%%%%%%%%%%%%%%%%%%

Lukas

Reply via email to