lilypond-devel
[Top][All Lists]
Advanced

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

Re: accidental changes: review


From: Han-Wen Nienhuys
Subject: Re: accidental changes: review
Date: Tue, 25 Sep 2007 23:38:54 -0300

2007/9/25, Rune Zedeler <address@hidden>:
> >> +  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++.

you might want to look into making octave optional for pitch; I'm not
sure if it is worth the trouble, but it would make key signatures more
logical to specify.

Otherwise, you could use an int*


> >> /* 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?

I think the fixme should just go away.

-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

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