On 2019-01-06 9:54 pm, Kyle Wightman Baldwin wrote:
I'm trying to create a handout where the note heads are actually
letters.
I'm sure I'm not the first one to do this, but I'm having a hard time
finding it. I came across the "Easy play" note heads, but they are
too small and I would prefer it without the actual note heads.
Just a friendly reminder that providing a "tiny example"[1] is very
helpful to give us an idea of how far you have managed to get on your
own.
But to address your question, you can customize any stencil as you see
fit. The documentation[2] provides one method of using arbitrary markup
in place of a stencil, which would seem suitable for your needs.
However, that specific example uses a fixed value rather than one based
on the pitch of the note. Here is a variation on that theme that looks
up a string in a list to achieve what you are after:
%%%%
\version "2.19.82"
\relative c' {
\override NoteHead.stencil = #(lambda (grob)
(let* ((cause (ly:grob-property grob 'cause))
(pitch (ly:event-property cause 'pitch))
(notenames '("C" "D" "E" "F" "G" "A" "B"))
(notename (list-ref notenames (ly:pitch-notename pitch))))
(grob-interpret-markup grob #{ \markup
\halign #0 \vcenter \fontsize #-2 \sans \bold $notename #})))
\hide Stem
c4 d e fis g a bes c
}
%%%%
[1]: http://lilypond.org/tiny-examples.html
[2]:
http://lilypond.org/doc/v2.19/Documentation/notation/modifying-stencils
-- Aaron Hill
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user