On 24 January 2011 17:30, James Lowe <[email protected]> wrote:
> So I wondered if it is possible to save some lines of code/simplify
> overrides for the same context/Grob such that I can write 'something like'
>
> \override context.GrobName ( ( #'property1 = #value1) (#'property2 =
> #value2) (#'property3 = #value3) )
Here's an idea:
overrideGrobProps =
#(define-music-function (parser location grob-name prop-list) (symbol?
cheap-list?)
(make-sequential-music
(map (lambda (entry)
(make-grob-property-override grob-name (car entry) (cadr entry)))
prop-list)))
\relative c' {
c4 cis d des
% apply \override to list of properties + values (not \once)
\overrideGrobProps #'Accidental #`((color ,red) (font-size 4)
(extra-offset (1.5 . 3)))
\overrideGrobProps #'NoteHead #'((style mensural) (duration-log 0))
c4 cis d des
}
Cheers,
Neil
_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel