6 Easy notation note heads use the @code{note-names} property
7 of the @code{NoteHead} object to determine what appears inside
8 the note head. By overriding this property, it is possible
9 to print numbers representing the scale-degree.
11 A simple engraver can be created to do this for every note head
14 doctitle = "Numbers as easy note heads"
17 #(define Ez_numbers_engraver (list
20 (cons 'note-head-interface
21 (lambda (engraver grob source-engraver)
23 (context (ly:translator-context engraver))
24 (tonic-pitch (ly:context-property context 'tonic))
25 (tonic-name (ly:pitch-notename tonic-pitch))
26 (grob-pitch (ly:event-property (event-cause grob) 'pitch))
27 (grob-name (ly:pitch-notename grob-pitch))
28 (delta (modulo (- grob-name tonic-name) 7))
29 (note-names (make-vector 7 (number->string (+ 1 delta)))))
30 (ly:grob-set-property! grob 'note-names note-names))))))))
32 #(set-global-staff-size 26)
38 \consists \Ez_numbers_engraver