lilypond-user
[Top][All Lists]
Advanced

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

Re: Selectively override padding of glissando lines in chords?


From: Dominic
Subject: Re: Selectively override padding of glissando lines in chords?
Date: Mon, 27 Oct 2014 10:50:36 -0700 (PDT)

I am a little closer to my goal. I have come up with the following music
function:

/glissIndexPadHack =
        #(define-music-function
                (parser location index additionalpad normalpad)
                (number? number? number?)
                #{
                \once \override Glissando.bound-details = 
                #(lambda (grob) (if (eq? (ly:grob-property grob
'glissando-index) #'index)
                                        '(
                                                (right  (attach-dir . -1)
                                                                
(end-on-accidental . #t)
                                                                (padding . 0.5))
                                                (left   (attach-dir . 1)
                                                                (padding . 
*#'additionalpad*))
                                        )
                                        '(
                                                (right  (attach-dir . -1)
                                                                
(end-on-accidental . #t)
                                                                (padding . 0.5))
                                                (left   (attach-dir . 1)
                                                                (padding . 
*#'normalpad*))
                                        )
                                ))
                #})/

Just one snag! If I replace the variables in bold (above) with literal
values, e.g. 3 and 2, the code compiles and functions perfectly. But if I
compile it as shown above, it seems like my variables are not being
interpreted correctly. So I guess I must have made a syntactical error -
wrong combination of # ' $ characters, perhaps? I tried various combinations
of these characters, and some of them cause the compile to fail, some allow
it to compile, but none allows it to function.

What is the proper way to achieve this? Basically, I want to have individual
control over the bound-details.left.padding values of glissando lines within
a single chord.

Thanks for any help!

(I am using Lilypond 2.19.15)



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Selectively-override-padding-of-glissando-lines-in-chords-tp167966p167997.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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