On Mon, Jan 19, 2015 at 2:59 PM, Graham King <lilyp...@tremagi.org.uk> wrote: > Here's a little thing that has got me stumped. > > Is it possible to add three dots to a note glyph, thus: > > O:. > > to signify that the duration of the note is to be multiplied by 9/4 ? > And can this be done in such a way > (i) that the dots avoid clashing with staff lines, and > (ii) that the note glyph changes correctly under \shiftDurations ? i.e. so > that, say: > > c1\wierdDots % displays the note above, > > \shiftDurations #1 #0 { c1\wierdDots } % displays a 3-dotted minim, and > > \shiftDurations #-1 #0 { c1\wierdDots } % displays a 3-dotted breve. > > (For "simplicity" it is safe to assume that the second argument to > \shiftDurations will always be zero). > > Grateful, as always, for any insight, even if on this occasion it is just > expert advice to give up! > > -- Graham
Don't know if you still want to do this, but it's pretty easily achieved by modifying the earlier code that Mark posted (itself adapted from my SMuFL implementation): %%% \version "2.19.8" #(define (draw-l-dots grob) (let* ((count (ly:grob-property grob 'dot-count)) (dot (grob-interpret-markup grob (markup #:musicglyph "dots.dot"))) (dot-width ((lambda (ext) (- (cdr ext) (car ext))) (ly:stencil-extent dot X)))) (ly:stencil-translate (ly:stencil-combine-at-edge (ly:stencil-combine-at-edge (ly:stencil-combine-at-edge '() X RIGHT dot) X RIGHT dot dot-width) Y UP dot (- 1 dot-width)) (cons dot-width 0)))) lDots = #(define-music-function (parser location music) (ly:music?) #{ \temporary \override Staff.Dots.stencil = #draw-l-dots % we use shiftDurations to "add a dot" to the note % 2/3 * 9/4 = 3/2 \scaleDurations #'(3 . 2) \shiftDurations #0 #1 $music \revert Staff.Dots.stencil #}) \new Staff { \time 2/2 \lDots c'4 d'4.. \time 4/2 \shiftDurations #-1 #0 { \lDots c'4 d'4.. } } %%% Regards, Nathan _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user