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: Tue, 28 Feb 2012 15:14:29 -0800

On Tue, Feb 28, 2012 at 2:56 PM, Pavel Roskin <address@hidden> wrote:
Hello, Joe!

> In case it wasn't clear from what I said before, engravers in lilypond
> don't do the actual layout. Instead, they build the grobs and set up
> the connections between them. Most of the layout is done in callback
> functions.

Yes, I realize it now.  Your suggestion to create a new stem worked
fine.  I can get the relative coordinates of themes on different staves.

The attached file shows where I am now.  There are many minor issues,
and I hope I can solve most of them, but I'll certainly appreciate help.

I'm getting a message "Weird stem", and I don't see how to avoid it.
Perhaps I should create a totally new grob with a unique name, such as
StemSpan.  Is that possible?  What would be needed?

It would be nice to do this eventually, because having a different grob name would make it easier for the users to tweak it. I think it would involve editing scm/define-grobs.scm, but there may be a way to do it from an .ly file also


How do I make the new stem start at the same point as the original
one.  I tried this:

(set! (ly:grob-property stem 'axes) (list X))

I don't understand how it works.  Not setting axes leads to:

programming error: axes should be nonempty

Don't use ly:axis-group-interface::add-element, because stems don't implement the axis-group-interface. (Removing this will also remove the axes warning.) Instead, use ly:grob-set-parent!. You'll probably want to set both the X parent and the Y parent. Then the X and Y offsets of new-stem will be measured relative to stem (instead of relative to the whole system, which is the default).

Cheers,
Joe


reply via email to

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