On 2023-03-25 7:58 am, Mark Mathias wrote:
Oops... Except it doesn't. The accent remains black when I run it in
2.24.0. (I'm only beginning to get a glimmer of how to use Scheme with
LilyPond.)
Hmm... I currently run 2.22 for my scores, and the snippet from the
email thread does appear to work. Perhaps something changed in 2.24
that breaks the snippet's usage of a before-line-breaking procedure.
Here is something I threw together that utilizes a custom music function
to do something similar, albeit with a local effect rather than global:
%%%%
\version "2.22.0"
tweakArticulations =
#(define-music-function
(articulation property value music)
(string? key-list? scheme? ly:music?)
(define (process-articulation art)
(let ((type (ly:music-property art 'articulation-type)))
(if (string=? articulation type)
#{ \tweak $property $value $art #}
art)))
(define (process-music mus)
(let ((arts (ly:music-property mus 'articulations #f)))
(if (list? arts)
(ly:music-set-property! mus 'articulations
(map process-articulation arts)))
mus))
(music-map process-music (ly:music-deep-copy music)))
asdf = { b'4 -. -+ 2 -\tweak font-size 3 -> -. 4 -+ -> }
{
%% Example of applying one tweak:
\tweakArticulations accent color #red \asdf
%% Example of chaining multiple tweaks:
\tweakArticulations stopped color #green
\tweakArticulations stopped padding 2 \asdf
}
%%%%
-- Aaron Hill