Am 27.02.2013 12:45, schrieb David Kastrup:
Jan-Peter Voigt <jp.vo...@gmx.de> writes:
Hi Kieren, hi David K.,
applyContext is good for doing somethind conditionally anywhere in the
music stream:
cond = ##t
mod = \with { \override NoteHead #'color = #red }
\relative c' {
c4 e g b \applyContext #(lambda (context) (if cond
(ly:context-mod-apply! context mod))) c a f d c1
}
I think, for your idea of automatically changing properties in a
context, you will need an engraver.
\applyContext is not run "in the music stream" but during iteration, so
it _is_ automatically changing properties in a context.
Yes, OK, my wording is unprecise/incorrect.
The thread started with the question of changing the barline on every
time signature change. The apply context function is executed only once
on the iteration step, it is inserted.
The intended engraver shall watch a context-property on each iteration
step and then do something.
I have done some things like that, which are a bit too hackish to
publish now - but I will probably do sometime.
Cheers, Jan-Peter
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user