lilypond-user
[Top][All Lists]
Advanced

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

Re: making a Tie more parabolic


From: Keith OHara
Subject: Re: making a Tie more parabolic
Date: Wed, 31 Dec 2014 21:05:15 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

tisimst <tisimst.lilypond <at> gmail.com> writes:
> 
> Kieren MacMillan wrote
> > Any hints, for example, on what ‘ratio' actually does, or
[..]
> effect of "ratio". Seems like a "bug" to me that increasing "ratio" > 
doesn't
> change the shape of the tie curve very much if the tie is at its
> "height-limit", but maybe it's my ignorance at play here.

I traced through the function calls to 'ly/bezier-bow.cc' where the
curve of the tie is formed.  This is old code and not the best among
LilyPonds code, with spaghetti-like paths of function calls.  I
decided not to trust the comments. From reading the code it looks like:

'ratio' is the aspect ratio, height to width, for short ties and slurs
but as ties get longer the aspect ratio is reduced so the height (of
the control points, a bit less than that of the curve) remains below 
'height-limit'.

These are bezier curves with four control points.  Short ties and slurs
have the four control points equally-spaced along their length.  As 
ties get longer the middle control points stay relatively closer to
the endpoints, never getting further than twice the 'height-limit'
from the end points.  The transitions from short-tie to long-tie
shape are smooth.

I'll try to test a bit to see if LilPond behaves as reading the code
makes me expect.

The other details seem to deal with placing ties relative to the
other music.

1) To make a tie more parabolic, I would want to move the control points
toward the center.  I don't see a parameter for that, but maybe
someone can see how to make a scheme hook for calc-control-points
that adjusts the horizontal spacing of these points.  I think that could
integrate well with the other placement code.  Slurs have a parameter
'eccentricity' that moves control points horizontally and might be a
good model.

2) The text in the docstrings could maybe be interpreted in a way 
consistent with behavior, but it seems they could be written much
more directly (if I got it right above).




reply via email to

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