[Top][All Lists]

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

Re: use Pitch::negated for readability (issue 33350004

From: dak
Subject: Re: use Pitch::negated for readability (issue 333500043 by address@hidden)
Date: Wed, 17 Jan 2018 00:41:46 -0800

Reviewers: Dan Eble,

On 2018/01/17 00:18:54, Dan Eble wrote:
File lily/ (right):
lily/ key_do.negated ().smobbed_copy ());
LGTM, but ...

I also have a hard time understanding the existing code in this

Isn't it sufficient to check whether the interval between
pitch-alist[0] and
pitch-alist[2] is a minor third, i.e. 3 half-steps?  I don't see why
the key
signature would need to be transposed to C for that.  Maybe there's a
music-theoretical concern I'm overlooking.

Microtonality?  User-specified signatures/scales?  I am not going to
upset stuff here without good reason.

Description: use Pitch::negated for readability

This one had been irritating my comprehension, partly because the
argument order for pitch_interval in this use case is not readily

Please review this at

Affected files (+1, -3 lines):
  M lily/

Index: lily/
diff --git a/lily/ b/lily/
index 5de378eda49832c11a8366d155044b23373912ac..f14e29e505f563ddaa7151a0fc8a9b3aa1c71dd7 100644
--- a/lily/
+++ b/lily/
@@ -66,11 +66,9 @@ Key_performer::process_music ()
                     scm_to_int (scm_caar (pitchlist)),
                     ly_scm2rational (scm_cdar (pitchlist)));

-      Pitch c_do;
       SCM c_pitchlist
         = ly_transpose_key_alist (pitchlist,
- pitch_interval (key_do, c_do).smobbed_copy ());
+                                  key_do.negated ().smobbed_copy ());

       /* MIDI keys are too limited for lilypond scales.
          We check for minor scale and assume major otherwise.  */

reply via email to

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