lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Augmentation Dot Appearance


From: Nathan Ho
Subject: Re: Augmentation Dot Appearance
Date: Thu, 12 Feb 2015 18:46:17 -0800

On Thu, Feb 12, 2015 at 6:16 PM, thepocketwade <address@hidden> wrote:
>
> Is it possible to change the appearance of augmentation dots?  I'd like to
> use an open dot (think a degree symbol), to indicate adding 1/4 of note
> value.  I've only seen this notation in Stuart Saunders Smith's pieces, but
> it seems useful.
>
> Thanks for your help.

Here ya go:

%%%

\version "2.19.8"

#(define (draw-semi-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)))
          (semi-dot (grob-interpret-markup grob (markup #:draw-circle
(* 0.5 dot-width) 0.1 #f)))
          (stil (make-transparent-box-stencil '(0 . 0) '(0 . 0))))
     (if (number? count)
       (let loop ((i count))
         (if (= i 0) stil
           (begin
             (set! stil (ly:stencil-combine-at-edge stil X RIGHT
semi-dot dot-width))
             (loop (- i 1))))))))

semiDot = #(define-music-function (parser location music) (ly:music?)
             #{
               \temporary \override Staff.Dots.stencil = #draw-semi-dots
               \scaleDurations #'(5 . 6) $music
               \revert Staff.Dots.stencil
             #})

\new Staff {
  \time 2/4
  \semiDot c'4. d'8. \semiDot e'4. f'8.
}

%%%

Regards,
Nathan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]