]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/pitch.cc
Fix 442.
[lilypond.git] / lily / pitch.cc
index 7b3eb02d232bed422ff2df3bd322342bf99f6e1a..e9872fdf8eb09ba8e9bb534b52644583b7ef2744 100644 (file)
@@ -156,7 +156,7 @@ Pitch::to_string () const
   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)
     {
@@ -288,6 +288,14 @@ Pitch::transposed (Pitch d) const
   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);