[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing every grob's color in a staff
From: |
Maurizio Tomasi |
Subject: |
Re: Changing every grob's color in a staff |
Date: |
Mon, 14 Nov 2005 10:56:56 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Thanks a lot for your suggestions, Han-Wen. I finally managed to get what I
wanted. I post my solution here:
--------------------------------------------------------------------
\version "2.6.4"
#(define (override-color-for-all-grobs color)
(lambda (context)
(let loop ((x all-grob-descriptions))
(if (not (null? x))
(let ((grob-name (car (car x))))
(ly:context-pushpop-property context grob-name 'color color)
(loop (cdr x)))))))
\new Staff \relative c' {
\applycontext #(override-color-for-all-grobs (x11-color 'gray))
c4-\pp-\< d e f | \grace { g16[( a g fis]) } g1-\ff-\!
}
--------------------------------------------------------------------
I am quite proud of this: it's my first try using Scheme functions in a Lilypond
file!
Maurizio.