[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dal niente hairpin - customize size
From: |
Tiresia GIUNO |
Subject: |
Re: dal niente hairpin - customize size |
Date: |
Sun, 19 Feb 2012 12:47:47 +0100 |
On Sat, 18 Feb 2012 18:54:15 -0600
David Nalesnik <address@hidden> wrote:
> Hi Tiresia,
>
> On Sat, Feb 18, 2012 at 3:53 PM, Tiresia GIUNO
> <address@hidden>wrote:
>
> >
> > \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.
>
> \version "2.15.16"
>
> #(define (circ-tip radius thickness)
> (lambda (grob)
> (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)) (set! stencil
> (ly:stencil-combine-at-edge
> stencil
> X (* -1 grow-direction)
> (make-circle-stencil radius thickness #f)
> (- thickness)))
> (if (= 1 grow-direction)
> (set! stencil (ly:stencil-translate-axis stencil diameter
> X))) ;; is there a way around this?
>
> stencil)))
>
> {
> \once \override Hairpin #'stencil = #(circ-tip 0.4 0.1)
> %\override Hairpin #'circled-tip = ##t
> c'1\f\> ~
> c' ~
> c'8
> r\!
> }
>
> Hope this helps,
> David
Hi David,
thanks a lot for your help. I don't understand anything of Scheme. I
can't get your code working. Do I need 2.15.16? I'm working with 2.14
Here the error message:
GNU LilyPond 2.14.2
Processing `dalNiente.ly'
Parsing...
/usr/share/lilypond/2.14.2/ly/init.ly:73:66: error: syntax error,
unexpected $end (ly:parser-error parser (_ "expected error, but none
found"))))
error: failed files: "dalNiente.ly"
Thank you again,
TG
- dal niente hairpin - customize size, Tiresia GIUNO, 2012/02/18
- Re: dal niente hairpin - customize size, David Nalesnik, 2012/02/18
- Re: dal niente hairpin - customize size,
Tiresia GIUNO <=
- Re: dal niente hairpin - customize size, David Nalesnik, 2012/02/19
- Re: dal niente hairpin - customize size, Tiresia GIUNO, 2012/02/20
- Re: dal niente hairpin - customize size, David Nalesnik, 2012/02/20
- Re: dal niente hairpin - customize size, David Nalesnik, 2012/02/20
- Re: dal niente hairpin - customize size, Tiresia GIUNO, 2012/02/20