[Top][All Lists]

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

Re: Create engravers for merging rests (issue 321930043 by address@hidde

From: horndude77
Subject: Re: Create engravers for merging rests (issue 321930043 by address@hidden)
Date: Sat, 20 May 2017 21:27:33 -0700
File scm/scheme-engravers.scm (right):
scm/scheme-engravers.scm:151: (define (rest-eqv rest-len-prop)
On 2017/05/20 12:18:33, thomasmorley651 wrote:
The current patch-set fails with:
"Variable used before given a value: rest-eqv"
because subsequent usage of 'define ...' is equivalent to let not let*

Moving (define (rest-eqv rest-len-prop) before the engraver-definiton
will work or something at the lines of

   (let* ((rest-eqv
            (lambda (rest-len-prop)
              (define (rest-len rest) (ly:grob-property rest
              (lambda (rest-a rest-b)
                (eqv? (rest-len rest-a) (rest-len rest-b)))))
          (mmrest-same-length (rest-eqv 'measure-count))
          (rest-same-length (rest-eqv 'duration-log)))

   (define (merge-mmrests rests)

Interesting. I didn't run into that error. I'm using the latest lilydev
which is using guile 2. That could be the difference. In any case I've
removed the methods so this shouldn't happen.
scm/scheme-engravers.scm:167: (lambda (rest) (ly:grob-set-property! rest
'Y-offset (rest-offset rest)))
On 2017/05/20 14:33:15, david.nalesnik wrote:
Just moving one rest on top of the other might cause offsets with some
  This happened at one time with flags on chords: see

Would it work to set 'stencil of all of the cdr to point-stencil?

Using point-stencil causes odd alignment issues with text connected to
multimeasure rests. Making them invisible doesn't have this issue. Would
that solve the above potential problem?

Related to this, is there a way to re-parent grobs onto the surviving
rest? If so we could then use point-stencil (or possibly fully destroy)
the other rests.
scm/scheme-engravers.scm:193: ((eq? 'MultiMeasureRest (grob::name grob))
On 2017/05/20 14:33:15, david.nalesnik wrote:
The only two grobs you could get are Rest and MultiMeasureRest, so you
just write

   (set! [...]

[I think looking at the grob name is fine.]

It was simple enough to switch over and use (else ...) as well.

reply via email to

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