|
From: | David Nalesnik |
Subject: | Re: Selectively override padding of glissando lines in chords? |
Date: | Mon, 27 Oct 2014 13:09:56 -0500 |
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)
[Prev in Thread] | Current Thread | [Next in Thread] |