- ;; If we have the first column, finish the previous
- ;; counter-spanner (if there is one).
- (if (ly:grob? count-spanner)
- (begin
- (ly:spanner-set-bound! count-spanner RIGHT col)
- (ly:pointer-group-interface::add-grob count-spanner 'columns col)
- (ly:engraver-announce-end-grob trans count-spanner col)
- (set! count-spanner '())))
- ;; if count is over, reset variables
- (if stop?
- (begin
- (set! elapsed 0)
- (set! stop? #f)))
- ;; if count is in progress, begin a counter object
- (if go?
- (let* ((c (ly:engraver-make-grob trans 'MeasureCounter col))
- (counter (ly:grob-property c 'count-from)))
- (ly:spanner-set-bound! c LEFT col)
- (ly:pointer-group-interface::add-grob c 'columns col)
- (set! (ly:grob-property c 'count-from) (+ counter elapsed))
- (set! count-spanner c)
- (set! elapsed (1+ elapsed))))
- (set! new-measure? #f)))))
+ (set! elapsed 0)
+ (set! stop? #f)))
+ ;; If count is in progress, begin a count-spanner.
+ (if go?
+ (let* ((c (ly:engraver-make-grob trans 'MeasureCounter col))
+ (counter (ly:grob-property c 'count-from)))
+ (ly:spanner-set-bound! c LEFT col)
+ (ly:pointer-group-interface::add-grob c 'columns col)
+ (set! (ly:grob-property c 'count-from) (+ counter elapsed))
+ (set! count-spanner c)
+ (set! elapsed (1+ elapsed))))))