]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/lsr/coloring-notes-depending-on-their-pitch.ly
lilypond-book robustness: ensure EOL at the end of @verbatim
[lilypond.git] / input / lsr / coloring-notes-depending-on-their-pitch.ly
index 9b8d773b7d126450d2f6df6e9366f6652e6dffbb..cab9e244899b1d53bf30bba7610f20172ea8bb61 100644 (file)
@@ -1,11 +1,15 @@
-%% Do not edit this file; it is auto-generated from input/new
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
 %% This file is in the public domain.
-\version "2.11.64"
+\version "2.13.1"
+
 \header {
-  lsrtags = "pitches,editorial-annotations,really-cool"
+  lsrtags = "pitches, editorial-annotations"
+
   texidoc = "
-It is possible to color note heads depending on their pitch and/or their names:
-the function used in this example even makes it possible to distinguish enharmonics.
+It is possible to color note heads depending on their pitch and/or
+their names: the function used in this example even makes it possible
+to distinguish enharmonics. 
+
 "
   doctitle = "Coloring notes depending on their pitch"
 } % begin verbatim
@@ -28,8 +32,7 @@ the function used in this example even makes it possible to distinguish enharmon
     (cons (ly:make-pitch 0 3 1/2) (x11-color 'blue))
     (cons (ly:make-pitch 0 4 -1/2) (x11-color 'blue))
     (cons (ly:make-pitch 0 5 1/2) (x11-color 'blue))
-    (cons (ly:make-pitch 0 6 -1/2) (x11-color 'blue))
-    ))
+    (cons (ly:make-pitch 0 6 -1/2) (x11-color 'blue))))
 
 %Compare pitch and alteration (not octave).
 #(define (pitch-equals? p1 p2)
@@ -44,7 +47,7 @@ the function used in this example even makes it possible to distinguish enharmon
 
 #(define (color-notehead grob)
   (pitch-to-color
-    (ly:event-property (ly:grob-property grob 'cause) 'pitch)))
+    (ly:event-property (event-cause grob) 'pitch)))
 
 \score {
   \new Staff \relative c' {