Hello,
I'm trying to define a new articulation, based on two stencils (above and
below the staff), that I wrote.
I succeeded in making two distinct articulations. However, the attempt to
create a single articulation, which chooses the stencil based on the
direction specified in the post-event, failed.
Does anyone have any advice for me?
I attach the file I'm working on.
Thank you!
Rip_mus
\version "2.24.0"
lAccUpStencil = #(ly:stencil-rotate-absolute
(make-path-stencil
'(
moveto 0 0
curveto -0.25 1 -0.5 4 -0.5 5
rcurveto 0.25 0.1 0.75 0.1 1 0
curveto 0.5 4 0.25 1 0 0
closepath
)
0.01
0.3
0.3
#t
)
-45
0
0
)
lAccDownStencil = #(ly:stencil-rotate-absolute
(make-path-stencil
'(
moveto 0 0
curveto -0.25 1 -0.5 4 -0.5 5
rcurveto 0.25 0.1 0.75 0.1 1 0
curveto 0.5 4 0.25 1 0 0
closepath
)
0.01
0.3
0.3
#t
)
-135
0
0
)
#(append! default-script-alist
(list
`(little-accent-up
. (
(stencil . ,lAccUpStencil)
(toward-stem-shift-in-column . 0.0)
(padding . 0.20)
(avoid-slur . around)
(direction . ,UP)))
`(little-accent-down
. (
(stencil . ,lAccDownStencil)
(toward-stem-shift-in-column . 0.0)
(padding . 0.20)
(avoid-slur . around)
(direction . ,DOWN)))
`(little-accent
. (
(stencil . (lAccUpStencil . lAccDownStencil))
(toward-stem-shift-in-column . 0.0)
(padding . 0.20)
(avoid-slur . around)
(direction . ,UP)))
)
)
\layout {
\context {
\Score
scriptDefinitions = #default-script-alist
}
}
lAccUp = #(make-articulation 'little-accent-up)
lAccDown = #(make-articulation 'little-accent-down)
lAcc = #(make-articulation 'little-accent)
{
a''4\lAccUp c'\lAccDown c'\lAcc
}