[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: thomasmorley65
Subject: Re: Create engravers for merging rests (issue 321930043 by address@hidden)
Date: Sun, 21 May 2017 03:38:26 -0700

On 2017/05/21 04:27:33, horndude77 wrote:
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
> Moving (define (rest-eqv rest-len-prop) before the
engraver-definiton starts
> 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
methods so this shouldn't happen.

Yep, I can confirm it worked with guilev2, and your recent code works
for guilev1 as well.
scm/scheme-engravers.scm:167: (lambda (rest) (ly:grob-set-property!
'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
>  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.

We have ly:grob-set-parent!
My first attempts to use it were only partly successfull.
I'll attach my attempt at the issue tracker.
It's nothing more than a sketch and only tries to care about
MutiMeasureRestText, not MultiMeasureRestNumber.
Something weird happens at line-break.
Anyway, maybe of some use, though...

reply via email to

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