lilypond-devel
[Top][All Lists]
Advanced

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

Re: Let \autochange accept optional arguments for the turning-point and


From: thomasmorley65
Subject: Re: Let \autochange accept optional arguments for the turning-point and clefs (issue 259080043 by address@hidden)
Date: Fri, 31 Jul 2015 11:16:28 +0000

On 2015/07/31 10:57:07, dak wrote:
https://codereview.appspot.com/259080043/diff/20001/scm/autochange.scm
File scm/autochange.scm (right):


https://codereview.appspot.com/259080043/diff/20001/scm/autochange.scm#newcode36
scm/autochange.scm:36: (cond ((ly:pitch<? ref-pitch pitch)
On 2015/07/31 10:42:38, thomasmorley651 wrote:
> On 2015/07/31 00:01:20, Dan Eble wrote:
> > would ly:pitch-diff simplify this?
>
> I was not happy with this nested if/cond either, but I don't see how
> ly:pitch-diff would help.
>
> At least I managed to shorten it a bit in the newest patch-set

Well, it does not appear to make sense to even look at the alteration
here.  And
the original code doesn't do it either.  You could just use
(dir (if pitch (sign (- (ly:pitch-steps pitch) (ly:pitch-steps
ref-pitch))) 0))
which is actually pretty close to the original.

Much better, thanks.
Done.

https://codereview.appspot.com/259080043/



reply via email to

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