On Sat, Feb 18, 2012 at 3:53 PM, Tiresia GIUNO <address@hidden>
\override Hairpin #'circled-tip = ##t
I find the circles a bit too small. Is there a way to customize the size
of the circles?
I can't find a convenient property to override the size of the circle, but you could fake it by adding a circle yourself to the hairpin.
I've come up with the following which might prove useful, though I haven't tested it extensively. The arguments that the override takes are the radius and thickness of the circle you'd like to add. The function would have to be expanded to deal with hairpins crossing a line break, but that's doable.
#(define (circ-tip radius thickness)
(let* ((stencil (ly:hairpin::print grob))
(grow-direction (ly:grob-property grob 'grow-direction))
(len (interval-length (ly:stencil-extent stencil X)))
(diameter (* 2 radius)))
(set! stencil (ly:stencil-scale stencil (/ (- len diameter) len) 1))
X (* -1 grow-direction)
(make-circle-stencil radius thickness #f)
(if (= 1 grow-direction)
(set! stencil (ly:stencil-translate-axis stencil diameter X))) ;; is there a way around this?
\once \override Hairpin #'stencil = #(circ-tip 0.4 0.1)
%\override Hairpin #'circled-tip = ##t
Hope this helps,