2 years ago I was provided with the following code. The idea was to change de colour when having an accidental. This in the new version is not working.
Can anybody help? Thanks ________________________________________ \version "2.16.0" \include "color.ly" staffViolin = \new Staff { \coloraccidentals ..... } \score{ << \staffViolin >> } _______________________ color.ly \version "2.16.0" #(define (accidentals? note symbol) (let ((p (ly:music-property note 'pitch))) (and (ly:pitch? p) (equal? (ly:pitch-alteration p) symbol)))) coloraccidentals = #(define-music-function (parser location music) (ly:music?) (music-map (lambda (event) (if (eq? 'EventChord (ly:music-property event 'name)) (map (lambda (note) (if (accidentals? note SHARP) (ly:music-set-property! note 'tweaks (list (cons 'color red))) note) (if (accidentals? note FLAT) (ly:music-set-property! note 'tweaks (list (cons 'color cyan))) note)) (ly:music-property event 'elements))) event) music)) _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel