/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1998--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 1998--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
if (n)
return n;
if (a)
- return a;
+ return a > (Rational)0;
return 0;
}
string s = ::to_string (char (n + 'a'));
Rational qtones = alteration_ * Rational (4,1);
int qt = int (rint (Real (qtones)));
-
+
s += string (accname[qt + 4]);
if (octave_ >= 0)
{
return p;
}
+Pitch
+Pitch::normalized () const
+{
+ Pitch p = *this;
+ p.normalize ();
+ return p;
+}
+
Rational NATURAL_ALTERATION (0);
Rational FLAT_ALTERATION (-1, 2);
Rational DOUBLE_FLAT_ALTERATION (-1);