lilypond-user
[Top][All Lists]
Advanced

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

Re: how to write a scheme function to override glissando properties


From: Marc Hohl
Subject: Re: how to write a scheme function to override glissando properties
Date: Mon, 20 Dec 2010 11:29:08 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7

Am 19.12.2010 21:26, schrieb jakob lund:
[...]
I think what happens is that the start note, passed to your function,
is already wrapped up in an object. \glissando is meant for use with a
single note, rather than with a music object.
Sounds reasonable.
You can use scheme to add the `start glissando' property to the object though:

\version "2.13.40"

slide = #(define-music-function (parser location length startnote)
                                (number? ly:music?)
                                #{
  \once\override Voice.Glissando #'minimum-length = $length
  \once\override Voice.Glissando #'springs-and-rods =
#ly:spanner::set-spacing-rods
      #(begin
            (set! (ly:music-property $startnote 'elements)
          (cons (make-music (quote GlissandoEvent))
                (ly:music-property $startnote 'elements)
                ))
       (ly:export     $startnote))
#})

{ \slide #7 a'' e'' }
Thanks for this example!

Regards,

Marc



reply via email to

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