The problem (shown in the third example) is that it doesn’t stretch to match
the chord height, like a normal arpeggio does. I don’t have time — and maybe
not even the skill — to do this The Right Way™ right now, but hopefully Someone
Else™ will take it to the goal line.
One could the default arpeggio stencil machinery do its job twice:
\version "2.22"
arpeggioUpDown = {
\override Arpeggio.stencil =
#(lambda (grob)
(let ((one '())
(two '()))
(ly:grob-set-property! grob 'arpeggio-direction UP)
(set! one (ly:arpeggio::print grob))
(ly:grob-set-property! grob 'arpeggio-direction DOWN)
(set! two (ly:arpeggio::print grob))
(ly:stencil-add
one
(ly:stencil-translate-axis two 1.2 X))))
\override Arpeggio.direction = #RIGHT
}
{
\once \arpeggioUpDown
<c' e' g' c''>\arpeggio
}
The problem is that this arpeggio is not taken into account for spacing:
The next note will be too close. I'm not yet sure what would be The
Right Way to change this, as neither X-extent nor extra-spacing-width of
the arpeggio seem to have an effect for spacing to the right. You can
tweak (for instance) NoteHead's extra-spacing-width, but that is far
from elegant.
Lukas