lilypond-user
[Top][All Lists]
Advanced

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

Re: arrow function


From: Thomas Morley
Subject: Re: arrow function
Date: Thu, 22 Nov 2012 02:48:40 +0100

2012/11/22 Kevin Patrick Barry <address@hidden>:
> Dear LilyPond users,
>
> I would like to create a function that will draw a glissando with an arrow
> between two notes.  I have the beginnings of a function but I don't know how
> to add properties like the arrowhead or change its size.  Also it only works
> when I call the function before the first pitch (instead of after, like a
> normal glissando). Any help would be appreciated.
>
> Here is my function so far:
>
> glissarrow = #(define-music-function (parser location glissando-event)
>
>                       (ly:music?)
>
>                       (set! (ly:music-property glissando-event
> 'articulations)
>
>                              (cons (make-music 'GlissandoEvent)
>
>                                       (ly:music-property glissando-event
> 'articulations)))
>
>                     glissando-event)
>
>
> I need to make it such that it contains the following properties/overrides:
>
> \override Glissando #'(bound-details right arrow) = ##t
>
> \override Glissando #'arrow-length = #0.6
>
> \override Glissando #'arrow-width = #0.25
>
>
> Thanks in advance,
>
>
> Kevin Barry
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>

Hi Kevin,

due to the latest changes (thanks to David Kastrup) it heavily depends
on the used version.

With 2.16 you can write:

\version "2.16.0"

gliss =
#(define-event-function (parser location)()
#{
        \tweak #'arrow-length #1.6
        \tweak #'arrow-width #1.25
        \glissando
#})

\relative c' {
        \override Glissando #'(bound-details right arrow) = ##t
        c2\gliss e'
}

Although I wasn't able to integrate the bound-details-override into
the event-function.

I wonder if it it's possible.


Regards,
  Harm



reply via email to

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