lilypond-devel
[Top][All Lists]
Advanced

[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:

https://codereview.appspot.com/321930043/diff/100001/scm/scheme-engravers.scm
File scm/scheme-engravers.scm (right):


https://codereview.appspot.com/321930043/diff/100001/scm/scheme-engravers.scm#newcode151
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 starts
> will work or something at the lines of
>
> ...
>   (let* ((rest-eqv
>            (lambda (rest-len-prop)
>              (define (rest-len rest) (ly:grob-property rest
rest-len-prop))
>              (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.

Yep, I can confirm it worked with guilev2, and your recent code works
for guilev1 as well.



https://codereview.appspot.com/321930043/diff/100001/scm/scheme-engravers.scm#newcode167
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
printers.
>  This happened at one time with flags on chords: see
> http://lists.gnu.org/archive/html/bug-lilypond/2015-08/msg00080.html
>
> 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.
https://sourceforge.net/p/testlilyissues/issues/1228/?limit=25&page=1#d443
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...




https://codereview.appspot.com/321930043/



reply via email to

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