On 09/09/2016 05:27 PM, Thomas Morley wrote:

Attached you'll find a different version.
It avoids creating all those grobs and killing most of them in the
end. Instead a preexisting RehearsalMark (or more of them) is taken
and 'text is reset.
Some other changes for better usability.

Hi Harm, Nice work! I'd say this is a good candidate for the LSR, particularly because it demonstrates listeners, acknowledgers, and finalize in one engraver.

One little thing I noticed is that

  (if duration-marks

should be something like

  (if (not (null? duration-marks))

Because:

  \version "2.19.42"
  #(define empty-list '())
  #(display (if empty-list #t #f))
  % --> #t
  #(display (if (not (null? empty-list)) #t #f))
  % --> #f

Also, I wonder, where you clear out these variables at the end of the finalize stage:

         (set! evts '())
         (set! last-evt #f)
         (set! tempo-change-evts '())
         (set! duration-marks '())

Of course, it doesn't hurt, but is it necessary? If so I need to do that in my code.

-Paul

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to