]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/snippets/numbers-as-easy-note-heads.ly
use trap to remove tmp directory on failure to avoid hiding mpost
[lilypond.git] / Documentation / snippets / numbers-as-easy-note-heads.ly
index 7dd3cc616e3eaa9e7c35bdb9176ce5f4684c7b3e..34b7828ea7f6e0e1b04baaf2e3b7d58ffa19aa40 100644 (file)
@@ -4,11 +4,11 @@
 % and then run scripts/auxiliar/makelsr.py
 %
 % This file is in the public domain.
-%% Note: this file works from version 2.14.0
-\version "2.14.0"
+%% Note: this file works from version 2.15.31
+\version "2.15.31"
 
 \header {
-%% Translation of GIT committish: 6977ddc9a3b63ea810eaecb864269c7d847ccf98
+%% Translation of GIT committish: b482c3e5b56c3841a88d957e0ca12964bd3e64fa
   texidoces = "
 
 Las cabezas de nota de notación fácil utilizan la propiedad
@@ -62,21 +62,19 @@ object it sees.
 
 
 #(define Ez_numbers_engraver
-   (list
-    (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))))))))
+   (make-engraver
+    (acknowledgers
+     ((note-head-interface 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)