(let* ...
(scalestep (modulo
(- (ly:pitch-notename pitch) (...base of key
signature...)) 7))
(name (format #f "~a~a"
(string-ref "1234567" (scalestep))...
assuming someone can point out what to substitute for my unknown
quantity. The following is only work for C Major. It is not working for
other keys. I am no programer. I don't know how to code for blue text above.
the original code:
namer =
#(make-engraver
(acknowledgers
((note-head-interface engraver grob source)
(let* ((event (ly:grob-property grob 'cause))
(pitch (ly:event-property event 'pitch))
(newgrob (ly:engraver-make-grob engraver 'TextScript event))
(name (format #f "~a~a"
(string-ref "1234567" (ly:pitch-notename pitch))
(assoc-ref
'((-1/2 . "") (0 . "") (1/2 . ""))
(ly:pitch-alteration pitch)))))
(if (string= name "Hb")
(set! name "B"))
(set! (ly:grob-property newgrob 'text) name)))))
Blessing in+,
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user