[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: accidental changes: review
From: |
Rune Zedeler |
Subject: |
Re: accidental changes: review |
Date: |
Wed, 26 Sep 2007 02:09:20 +0200 |
User-agent: |
Thunderbird 1.5.0.13 (X11/20070824) |
Thanks for comments.
Han-Wen Nienhuys skrev:
+ int octave_;
+ int notename_;
+ Rational alteration_;
Why don't you use a Pitch object for this combination? You would get
Scale* for free.
Primarily because the two values octave_ and has_octave_ are very
closely related.
They really /should/ be joined to an int option - if such a thing did
exist in c++.
Therefore I find it very errorprone to move the octave_ into another
object without has_octave_. The pitch object will not make sense if
has_octave_==false.
We have
LY_DEFINE (ly_make_keysig_entry, "ly:make-keysig-entry",
2, 3, 0, (SCM note, SCM alter,
SCM octave, SCM barnumber, SCM measurepos),
"An entry for key signature. Key signatures consists of lists of"
"these. The three last arguments are used for local key changes.")
It will not make sense to join the three first together, because the two
first are related, and the three last are related.
/* FIXME: why is octave == 0 and default not middleC ? */
+/* Because otherwise Pitch () would not be a "zero element" -
+ e.g. implementation of negated () would not work. -rz ! */
Huh? I recall that octave == 0 is actually middle C. The strange thing
is that c' (with one quote) is is encoded as octave 0.
Just to ensure I understand you correctly: The FIXME is wrong?
It /should/ say
FIXME: Why does octave == 0 refer to middleC-octave and not the octave
below?
-Rune