1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.di.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
6 %% This file is in the public domain.
13 Easy notation note heads use the @code{note-names} property of the
14 @code{NoteHead} object to determine what appears inside the note head.
15 By overriding this property, it is possible to print numbers
16 representing the scale-degree.
18 A simple engraver can be created to do this for every note head object
22 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