lilypond-devel
[Top][All Lists]
Advanced

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

Re: Piano pedalling patch


From: Han-Wen Nienhuys
Subject: Re: Piano pedalling patch
Date: Mon, 18 Mar 2002 16:43:32 +0100

address@hidden writes:
> On Fri, Mar 15, 2002 at 02:24:26PM +0100, Han-Wen Nienhuys wrote:
> 
> >      /* Hmm. TODO: This should be set in grob-description.scm, but
> >     side-positioning of consecutive brackets only seems to work if
> >       direction is +1 within the engraver */
> 
> I should explain my confusion about directions ... 
> 
> Problem: For 'mixed' style pedals, like Ped.______, the horizontal line
> should be shortened by the extent of the Ped. text.  To obtain this
> extent, I set the parent of the _____ spanner to be the Ped. text item.
> 
> The direction of _____| (PianoPedalBracket) grobs should be -1, as it is
> a text spanner (+1 produces an upside down bracket). However, if the
> direction of the ____ is set to -1 when it is created by the engraver,
> then the output becomes
> 
> Ped.
> . . . . . .        (<-  the imaginary line of the PianoPedalLineSpanner)
>     ______|        (<-  the actual pedal)
> 
> instead of 
> 
> Ped.______|
> . . . . . . 


> 
> Is this a consequence of the Ped. being the bracket's parent? Is there a
> better way to obtain the size of the text within the line's
> brew_molecule? 

I think that there might be some offset callback confusing
things. Side_position::aligned_on_self and
Side_position::aligned_on_parent both use 'direction to shift around
the grob.  I would suggest that you remove them both, and do the Y
aligning by hand (use Molecule::align_to), as it is less confusing and
more robust. For the X-alignment, make the bracket be bound on the
left side by the Ped sign.

> {left,right}-widen). The amount of stretching is controlled by
> edge-width, which is hardcoded at the moment to half staff space, but
> I'll work on getting this customisable.  

Ok.

(if you feel inclined, you could add support for left,right-widen to
the tuplet bracket as well. )

--
Han-Wen Nienhuys   |   address@hidden    | http://www.cs.uu.nl/~hanwen/




reply via email to

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