X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fsnippets%2Fnumbers-as-easy-note-heads.ly;h=4bdf474d57362ce91fd9335d3c109ce0afeb4f8e;hb=119e3affc66e887412f897f95f2f8cec292c2555;hp=7cd88fa11baabba886afe62b358ce847c124e5a5;hpb=d8b02eb476e895b98fd59f1c5d975221806181b1;p=lilypond.git diff --git a/Documentation/snippets/numbers-as-easy-note-heads.ly b/Documentation/snippets/numbers-as-easy-note-heads.ly index 7cd88fa11b..4bdf474d57 100644 --- a/Documentation/snippets/numbers-as-easy-note-heads.ly +++ b/Documentation/snippets/numbers-as-easy-note-heads.ly @@ -19,20 +19,22 @@ object it sees. } % begin verbatim -#(define Ez_numbers_engraver (list - (cons 'acknowledgers +#(define Ez_numbers_engraver (list - (cons 'note-head-interface - (lambda (engraver grob source-engraver) - (let* ( - (context (ly:translator-context engraver)) - (tonic-pitch (ly:context-property context 'tonic)) - (tonic-name (ly:pitch-notename tonic-pitch)) - (grob-pitch (ly:event-property (event-cause grob) 'pitch)) - (grob-name (ly:pitch-notename grob-pitch)) - (delta (modulo (- grob-name tonic-name) 7)) - (note-names (make-vector 7 (number->string (+ 1 delta))))) - (ly:grob-set-property! grob 'note-names note-names)))))))) + (cons 'acknowledgers + (list + (cons 'note-head-interface + (lambda (engraver grob source-engraver) + (let* ((context (ly:translator-context engraver)) + (tonic-pitch (ly:context-property context 'tonic)) + (tonic-name (ly:pitch-notename tonic-pitch)) + (grob-pitch + (ly:event-property (event-cause grob) 'pitch)) + (grob-name (ly:pitch-notename grob-pitch)) + (delta (modulo (- grob-name tonic-name) 7)) + (note-names + (make-vector 7 (number->string (1+ delta))))) + (ly:grob-set-property! grob 'note-names note-names)))))))) #(set-global-staff-size 26)