lilypond-devel
[Top][All Lists]
Advanced

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

Re: Cross-staff stem engraver (was: New frog in an empty pond?)


From: Joe Neeman
Subject: Re: Cross-staff stem engraver (was: New frog in an empty pond?)
Date: Sat, 25 Feb 2012 04:53:09 -0800

On Fri, Feb 24, 2012 at 3:04 PM, Pavel Roskin <address@hidden> wrote:
Hello!

I'm moving the thread to lilypond-devel and changing the subject.  I
hope it's OK.

On Thu, 23 Feb 2012 15:37:02 +0000
Neil Puttock <address@hidden> wrote:

> On 23 February 2012 15:18, Pavel Roskin <address@hidden> wrote:
>
> > I actually wanted to make a stopgap solution in Scheme.  I wrote
> > some code that looks for other stems and sets the stem length so it
> > would touch the stem above (attached).  But the code is unreliable.
> >  Some stems are not calculated yet.
>
> I'd love to be proven wrong, but I don't think you'll have much
> success with this approach.  At the very least, you'll need a Scheme
> engraver at the correct context level to collect the stems at the
> right time.  If a simple length override were possible with the
> current infrastructure, we wouldn't need a Span_arpeggio_engraver to
> typeset cross-staff arpeggios.

I tried writing an engraver that could be added to the StaffGroup
context.  Collecting stems is not a problem.  The problem is that even
the finalize handler is called to early.  I'm getting a warning:

programming error: vertical alignment called before line breaking
continuing, cross fingers

It's a little hard to guess what's going wrong without knowing exactly what you've tried. Are you trying to do layout logic in the engraver (ie. by collecting stems, reading their properties, doing calculations and then setting more properties)? If you are, the first step is to move the layout logic into grob callbacks.

Cheers,
Joe


reply via email to

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