[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems defining markup function to draw lines.
From: |
Reggie |
Subject: |
Re: Problems defining markup function to draw lines. |
Date: |
Sat, 22 Dec 2018 05:45:14 -0700 (MST) |
Michael Stickles wrote
> Our choir has developed some "in-house" markings which I'm trying to
> replicate in LilyPond. One is the use of a double slash to visually
> indicate the last section of a piece when the musical pattern changes
> for that last part.
>
> I can replicate that by using a markup like the following:
>
> a2^\markup { \with-dimensions #'(0 . 0) #'(0 . 0) \path #0.3 #'((moveto
> 5 -2) (lineto 7 2) (moveto 6 -2) (lineto 8 2)) }
>
> However, when the note I'm using is above the staff, I need to move the
> Y-coordinates down, and sometimes there's a need to shift the slashes
> closer to or further away from the note. So I'm trying to set up a
> markup function to handle this, so I can just annotate the note as:
>
> a2^\markup \double-slash #5 #-2
>
> But I can't seem to get the syntax correct. If I leave the arguments as
> dummy args, this works:
>
> #(define-markup-command (double-box layout props xoff yoff) (number?
> number?)
> (interpret-markup layout props
> #{
> \markup {
> \with-dimensions #'(0 . 0) #'(0 . 0)
> \path #0.3 #'((moveto 5 -2) (lineto 7 2) (moveto 6 -2)
> (lineto 8 2))
> }
> #}
> ))
>
> But when I try to implement the numbers, I get errors no matter what I
> do. This (while it doesn't work) shows what I'm trying to get to:
>
> #(define-markup-command (double-box layout props xoff yoff) (number?
> number?)
> (interpret-markup layout props
> #{
> \markup {
> \with-dimensions #'(0 . 0) #'(0 . 0)
> \path #0.3 #'((moveto xoff yoff) (lineto (+ xoff 2) (+ yoff
> 4)) (moveto (+ xoff 1) yoff) (lineto (+ xoff 3) (+ yoff 4)))
> }
> #}
> ))
>
>
> Any ideas on what I'm doing wrong?
>
>
> - Mike
>
> _______________________________________________
> lilypond-user mailing list
> lilypond-user@
> https://lists.gnu.org/mailman/listinfo/lilypond-user
Featherbeamingthread on Nabble.coms?
--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
- Re: synchronization of feathered beams, (continued)
- Re: synchronization of feathered beams, Reggie, 2018/12/21
- Re: synchronization of feathered beams, Carl Sorensen, 2018/12/21
- Re: synchronization of feathered beams, Thomas Morley, 2018/12/21
- Re: synchronization of feathered beams, Reggie, 2018/12/21
- Re: synchronization of feathered beams, Thomas Morley, 2018/12/21
- Problems defining markup function to draw lines., Mike Stickles, 2018/12/21
- Re: Problems defining markup function to draw lines., Aaron Hill, 2018/12/22
- Re: Problems defining markup function to draw lines., Pierre Perol-Schneider, 2018/12/22
- Re: Problems defining markup function to draw lines., Mike Stickles, 2018/12/22
- Re: Problems defining markup function to draw lines., Trevor, 2018/12/22
- Re: Problems defining markup function to draw lines.,
Reggie <=
- Re: synchronization of feathered beams, Reggie, 2018/12/24
- Re: synchronization of feathered beams, Kieren MacMillan, 2018/12/24
- Re: synchronization of feathered beams, Reggie, 2018/12/24
- Re: synchronization of feathered beams, Reggie, 2018/12/24
- Re: synchronization of feathered beams, Kieren MacMillan, 2018/12/24
- Re: synchronization of feathered beams, Kieren MacMillan, 2018/12/24
Re: synchronization of feathered beams, Reggie, 2018/12/21