lilypond-user
[Top][All Lists]
Advanced

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

Re: need markup function for arrow at end of curve


From: Pierre Perol-Schneider
Subject: Re: need markup function for arrow at end of curve
Date: Tue, 7 Mar 2017 11:16:50 +0100

Hi Kieren,
As said,  I worked on it yesterday but the result is not good enough.
Nevertheless, here's a cleaner version :

\version "2.19"

 #(define-markup-command (curvedArrow layout props X-scale Y-scale) (number? number?)
  (interpret-markup layout props
   (markup
    (#:stencil
     (make-path-stencil
       '(M 12.0 4.0
         C 12.0 4.0 16.0 2.5 16 2.5
         C 16.0 2.5 12.0 1.0 12 1.0
         C 12.2 2.0 12.0 2.0 12 2.0
         C  8.0 2.2  2.0 1.2  0 0.0
         C  2.0 2.0  8.0 3.0 12 3.0
         C 12.0 3.0 12.2 3.0 12 4.0
         Z)
       .15 X-scale Y-scale #t)))))

 
 %% Test:
 {
   c' -\markup\curvedArrow #2 #-1.5
   c' ^\markup\curvedArrow #1 #.5
   c' -\markup\curvedArrow #-2 #-1.5
   c' ^\markup\curvedArrow #-1 #.5
 }

Cheers,
Pierre

2017-03-06 7:42 GMT+01:00 Pierre Perol-Schneider <address@hidden>:
Hi Kieren,

Here's a first quick draft:

\version "2.19"

 #(define-markup-command (curvedArrow layout props thk mlt) (number? number?)
  (interpret-markup layout props
   (markup
    (#:stencil
     (make-path-stencil
      '(M  3.01 -0.22
        C  6.17  1.59  9.88  1.09 13.35  1.05
        C 13.47  1.19 12.99  1.75 13.23  1.94
        C 14.66  1.15 16.91  0.92 16.93  0.71
        C 16.93  0.57 15.13  0.56 13.32 -0.37
        C 13.17 -0.09 13.48  0.31 13.35  0.50
        C 10.56  0.59  7.90  0.73  5.97  0.33
        C  4.04 -0.07 -0.16 -2.02  3.01 -0.22
        Z)
       thk mlt mlt #t)))))
 
 \markup \curvedArrow #.1 #1

Regarding the length and the height, would they affect the curve and the arrow or the curve only?

Cheers,
Pierre



2017-03-06 3:58 GMT+01:00 Kieren MacMillan <address@hidden>:
Hi all,

Anyone with reasonable \path chops out there? I need a function that outputs a markup like this:


In a perfect world, the length, height, Y-direction, X-direction, and line thickness would all be parameters… but even one sample would be enough for me to riff on.

Thanks!
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: address@hidden


_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user




reply via email to

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