Hi Jan-Peter,

On Fri, Jan 4, 2013 at 8:37 AM, Jan-Peter Voigt <[email protected]> wrote:

> Hi David,
>
> yes, stop-translation-timestep is called and so is process-music, but if I
> want to change properties, like in an override, it has to happen in
> start-translation-timestep, or am I missing something?
>
>
I did get results with the following code, which applies an override within
process-music, but the override takes effect in the next timestep.
 Furthermore, since the context numbered 2 doesn't exist yet at #<Mom 1/4>
in the first measure, no change happens at #<Mom 1/2>...

Sorry I can't help more.

-David

\version "2.16.0"

#(define (ly:moment=? a b)
 (and (not (ly:moment<? a b))
      (not (ly:moment<? b a))))

\layout {
  \context {
  \Voice
  \consists #(let ((ccid 1))
    (lambda (context)
      (let ((id ccid))
        (set! ccid (+ 1 ccid))
        `((process-music .
            ,(lambda (trans)
              (let ((pos (ly:context-property context 'measurePosition)))
                (if (and (ly:moment=? pos (ly:make-moment 1 4))
                         (= id 2))
                    (ly:context-pushpop-property context 'NoteHead 'color
red)
                    (ly:context-pushpop-property context 'NoteHead
'color)))))))))
  }
}

\score {
  \relative c'' {
    c d << { e f e f e f } \\ { c d c d c d } >>
  }
}
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to