As the docs say this is only really usable with really large staff sizes. This font size of the text is linked to the font size of the note head, so increasing the size of the heads also increases the size of the numbers. Also the numbers are in fact already boldface.
It would not be very hard to rewrite this function to use bigger letters, but the problem kind of lies in the design. You will probably not be very happy trying to get this into a readable form. Rather I’d suggest to do things differently like this one:
$(define notenames
#("C" "D" "E" "F" "G" "A" "B"))
#(define (notename_annotation_engraver context)
(make-engraver
(acknowledgers
((note-head-interface engraver grob source-engraver)
(let* ((cause (ly:grob-property grob 'cause))
(pitch (ly:event-property cause 'pitch))
(nn (ly:pitch-notename pitch))
(mup (vector-ref notenames nn))
(tgrob (ly:engraver-make-grob engraver 'TextScript cause)))
(ly:grob-set-property! tgrob 'text mup)
(ly:grob-set-parent! tgrob Y grob)
(ly:grob-set-property! tgrob 'whiteout 1)
(ly:grob-set-property! tgrob 'Y-offset 0.7)
(ly:grob-set-property! tgrob 'parent-alignment-X -0.4)
(ly:grob-set-property! tgrob 'self-alignment-X CENTER)
(ly:grob-set-property! tgrob 'parent-alignment-Y CENTER)
(ly:grob-set-property! tgrob 'self-alignment-X CENTER)
(ly:grob-set-property! tgrob 'font-size -2)
(ly:grob-set-property! tgrob 'outside-staff-priority '()))))))
\layout {
\context {
\Voice
\consists #notename_annotation_engraver
}
}
\relative c' {
\key g \major
\numericTimeSignature
\time 4/4
c d e fis g a b c
}
UPDATE: Similarly you can have the names go up or down like this
$(define notenames
#("C" "D" "E" "F" "G" "A" "B"))
#(define (notename_annotation_engraver context)
(make-engraver
(acknowledgers
((note-head-interface engraver grob source-engraver)
(let* ((cause (ly:grob-property grob 'cause))
(pitch (ly:event-property cause 'pitch))
(nn (ly:pitch-notename pitch))
(mup (vector-ref notenames nn))
(tgrob (ly:engraver-make-grob engraver 'TextScript cause)))
(ly:grob-set-property! tgrob 'text mup)
(ly:grob-set-property! tgrob 'direction UP)
(ly:grob-set-property! tgrob 'font-size -2)
(ly:grob-set-property! tgrob 'staff-padding 3)
(ly:grob-set-property! tgrob 'outside-staff-priority 10)
)))))
\layout {
\context {
\Voice
\consists #notename_annotation_engraver
}
}
\relative c' {
\key g \major
\numericTimeSignature
\time 4/4
\tempo "a tempo"
b4-1--\mp^\markup\box"*---" d8.-3( e16-1) g8.-3( a16-4) e16-2( g-4 d8-1) |
}
or maybe you might want to use something like this:
$(define notenames
#("C" "D" "E" "F" "G" "A" "B"))
#(define (note-head::note-name-stencil grob)
(let* ((cause (ly:grob-property grob 'cause))
(pitch (ly:event-property cause 'pitch))
(nn (ly:pitch-notename pitch))
(durlog (ly:duration-log (ly:event-property cause 'duration)))
(mupt (markup #:whiteout #:fontsize -3 #:bold
#:sans (vector-ref notenames nn)))
(mup (if (< durlog 0)
(markup #:box mupt)
(if (>= durlog 2)
mupt
(markup #:circle mupt))))
(stc (grob-interpret-markup grob mup)))
(ly:stencil-aligned-to stc Y CENTER)))
\layout {
\context {
\Voice
\override NoteHead.stencil = #note-head::note-name-stencil
}
}
\relative c' {
\key g \major
\numericTimeSignature
\time 4/4
\tempo "a tempo"
b4-1--\mp^\markup\box"*---" d8.-3( e16-1) g8.-3( a16-4) e16-2( g-4 d8-1) |
c16 d e fis g8 a b c d4 | e2 f | g1 | a\breve
}