lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Change color after a line break


From: David Kastrup
Subject: Re: Change color after a line break
Date: Sun, 19 Jul 2015 10:57:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Marc Hohl <address@hidden> writes:

> Thanks a lot! Just to check that I have understood the underlying
> mechanism, I rewrote that according to
>
> overrideColorForAll =
> #(define-music-function (color) (color?)
> #{ #@(map (lambda (dsc)
>             (propertyOverride (list 'Score (car dsc) 'color) color))
>      all-grob-descriptions)
> #})
>
> which seems to do the trick as well without switching between Scheme
> and LilyPond whithin overrideColorForAll.

If you want to avoid switching to LilyPond, you can of course replace
#{ address@hidden #} with (make-simultaneous-music ...).

Or to be completely nitpicky, (make-simultaneous-music (set-origin!...))
so that point-and-click/error information of the overrides will be
correct.  Which is sort of pointless for this particular application
since overrides are no clickable entities and the only conceivable error
is when `color' is not a color and then the music function would not
have accepted it in the first place.

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]