1 % DO NOT EDIT this file manually; it is automatically
2 % generated from Documentation/snippets/new
3 % Make any changes in Documentation/snippets/new/
4 % and then run scripts/auxiliar/makelsr.py
6 % This file is in the public domain.
7 %% Note: this file works from version 2.15.31
13 Easy notation note heads use the @code{note-names} property
14 of the @code{NoteHead} object to determine what appears inside
15 the note head. By overriding this property, it is possible
16 to print numbers representing the scale-degree.
18 A simple engraver can be created to do this for every note head
21 doctitle = "Numbers as easy note heads"
25 #(define Ez_numbers_engraver
28 ((note-head-interface engraver grob source-engraver)
29 (let* ((context (ly:translator-context engraver))
30 (tonic-pitch (ly:context-property context 'tonic))
31 (tonic-name (ly:pitch-notename tonic-pitch))
33 (ly:event-property (event-cause grob) 'pitch))
34 (grob-name (ly:pitch-notename grob-pitch))
35 (delta (modulo (- grob-name tonic-name) 7))
37 (make-vector 7 (number->string (1+ delta)))))
38 (ly:grob-set-property! grob 'note-names note-names))))))
40 #(set-global-staff-size 26)
46 \consists \Ez_numbers_engraver