Hi Orm,
for flute pizzicato in contemporary music, it is quite common to use
a ">" as a notehead. With a stem down, the ">" should be changed to a
"<" as visible in the attached png.
I know how to change the notehead by overriding the NoteHead stencil
with an eps file, but can't find any information about automatically
changing the glyph depending on stem direction. Is that possible in
lilypond and does anybody have advice?
It's cumbersome to do this by hand each time stem direction is
changed.
Unfortunately you didn't provide a working example, hence my cumbersome
and ugly choice of > or < for "note-heads".
\version "2.22.0"
\relative
{
\override NoteHead.stencil = #ly:text-interface::print
\override NoteHead.text =
#(lambda (grob)
(let*
((notecolumn (ly:grob-parent grob X))
(stem (ly:grob-object notecolumn 'stem))
(direction (ly:grob-property stem 'direction)))
(markup #:general-align
Y CENTER
(if (positive? direction) ">" "<"))))
c'4 d e f g a b c d e f
}
Of course, one might adapt the general logic to either use glyphs better
suited than ">"/"<", or even conditionally rotate/mirror _any_ note-head
depending on the direction. (One might use grob-transformer for that.)
Lukas