lilypond-user
[Top][All Lists]
Advanced

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

Re: Slur with left and/or right arrow head


From: Aaron Hill
Subject: Re: Slur with left and/or right arrow head
Date: Wed, 17 Apr 2019 12:41:38 -0700
User-agent: Roundcube Webmail/1.3.8

On 2019-04-17 12:16 pm, Thomas Morley wrote:
One question I really couldn't answer is:
What kind of value is `t´ in (define (bezier-angle control-points t) ...) Seems not to be a x- or y-value, not an arc-length-value .., but what else?

"t" is the standard name for the control value of parametric equations. (I believe it comes from "time".) It ranges from zero to one, although technically it can extend beyond, since the math does not really care.

Now all those nice bezier-tools are done I made some performance tests.
Running my arrow-slur-03.ly gives
real 0m4,318s
user 0m4,000s
sys 0m0,272s

Your arrow-slur-03-patch.ly is a little slower
real 0m4,661s
user 0m4,075s
sys 0m0,562s

I posted the best values of multiple runs for both.

I then implemented a counter in your (bezier-curve control-points t).
It's called scaring 78368 times, which may explain it.

This is certainly expected due to the recursive approach. It may be possible to reduce the calls by adjusting the approximations a bit. For instance, I am computing the arc-length by simple subdivision into eleven pieces. It might be possible to get acceptable results with fewer segments, which would ease some of the computational overhead.

But actually I am pleasantly surprised my code is only slightly worse.

[ . . . ] why does Tie has a font-size property at all?

That I cannot speak to. I'd have to dig through the code to see where it is used.


-- Aaron Hill



reply via email to

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