[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dot sizes
From: |
Lukas-Fabian Moser |
Subject: |
Re: Dot sizes |
Date: |
Mon, 27 Sep 2021 15:59:55 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 |
Hi Paul,
Am 27.09.21 um 15:45 schrieb Paul Hodges:
That's actually more like what I was expecting!
I will be having more (indirect) discussions. For instance, I'm
required to make bar numbers italic; and I've been asked to place all
tuplet brackets above regardless of stem directions - but doing this
leads to loads of clashes with slurs. Also, I've been asked to make all
tuplet brackets horizontal (beams already are). So I may well be
revisiting this more general form of expression (just need a little
while to get my head around it - I've never been into Lisp-type
syntax!).
But meanwhile, I'm puzzling over the error in your snippet: "Unbound
variable: ly:grob-properties"...
I refactored Kieren's function a bit (to make it work, but also maybe to
make it easier to read):
%%% SNIPPET BEGINS
#(define ((custom-script-tweaks ls) grob)
(let*
((grob-cause (ly:grob-property grob 'cause))
(type (ly:prob-property grob-cause 'articulation-type))
(tweaks (assoc-ref ls type)))
(if tweaks
(for-each
(lambda (x)
(ly:grob-set-property!
grob (car x) (cdr x)))
tweaks))))
#(define my-scripts
`(
("staccato" . ((font-size . -5)))
("fermata" . ((padding . 5)))
("accent" . ((color . ,red)))
))
\layout {
\context {
\Score
\override Script.before-line-breaking = #(custom-script-tweaks
my-scripts)
}
}
\score
{
{
c'4-. c2\fermata c4 \accent
}
}
%%% SNIPPET ENDS
All the requirements you describe sound absolutely possible with
LilyPond. Feel free to ask on-list. :-)
Lukas