]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/pitch.cc
release commit
[lilypond.git] / lily / pitch.cc
index 58e2b0baa48892191113b148dd2cf40db99ed474..5dc46f97e6770f3a68b687418dc08a0d88951656 100644 (file)
@@ -20,6 +20,7 @@ Pitch::Pitch (int o, int n, int a)
   normalise ();
 }
 
+/* FIXME: why is octave == 0 and default not middleC ? */
 Pitch::Pitch ()
 {
   notename_ = 0;
@@ -290,7 +291,7 @@ Pitch::less_p (SCM p1, SCM p2)
 }
 
 /* Should add optional args.  */
-LY_DEFINE (make_pitch, "ly:make-pitch",
+LY_DEFINE (ly_make_pitch, "ly:make-pitch",
           3, 0, 0, (SCM octave, SCM note, SCM alter),
           "@var{octave} is specified by an integer, "
           "zero for the octave containing middle C.  "
@@ -303,11 +304,11 @@ LY_DEFINE (make_pitch, "ly:make-pitch",
   SCM_ASSERT_TYPE (scm_integer_p (note)== SCM_BOOL_T, note, SCM_ARG2, __FUNCTION__, "integer");
   SCM_ASSERT_TYPE (scm_integer_p (alter)== SCM_BOOL_T, alter, SCM_ARG3, __FUNCTION__, "integer");
 
-  Pitch p (ly_scm2int (octave), ly_scm2int (note), ly_scm2int (alter));
+  Pitch p (scm_to_int (octave), scm_to_int (note), scm_to_int (alter));
   return p.smobbed_copy ();
 }
 
-LY_DEFINE (pitch_steps, "ly:pitch-steps", 1, 0, 0,
+LY_DEFINE (ly_pitch_steps, "ly:pitch-steps", 1, 0, 0,
           (SCM p),
           "Number of steps counted from middle C of the pitch @var{p}.")
 {
@@ -316,7 +317,7 @@ LY_DEFINE (pitch_steps, "ly:pitch-steps", 1, 0, 0,
   return scm_int2num (pp->steps ());
 }
 
-LY_DEFINE (pitch_octave, "ly:pitch-octave",
+LY_DEFINE (ly_pitch_octave, "ly:pitch-octave",
           1, 0, 0, (SCM pp),
           "Extract the octave from pitch @var{p}.")
 {
@@ -326,7 +327,7 @@ LY_DEFINE (pitch_octave, "ly:pitch-octave",
   return scm_int2num (q);
 }
 
-LY_DEFINE (pitch_alteration, "ly:pitch-alteration",
+LY_DEFINE (ly_pitch_alteration, "ly:pitch-alteration",
           1, 0, 0, (SCM pp),
           "Extract the alteration from pitch  @var{p}.")
 {
@@ -347,7 +348,7 @@ LY_DEFINE (pitch_notename, "ly:pitch-notename",
   return scm_int2num (q);
 }
 
-LY_DEFINE (ly_pitch_quartertones,  "ly:pitch-quartertones",
+LY_DEFINE (ly_pitch_quartertones, "ly:pitch-quartertones",
           1, 0, 0, (SCM pp),
           "Calculate the number of quarter tones of @var{p} from middle C.")
 {
@@ -357,7 +358,7 @@ LY_DEFINE (ly_pitch_quartertones,  "ly:pitch-quartertones",
   return scm_int2num (q);
 }
 
-LY_DEFINE (ly_pitch_semitones,  "ly:pitch-semitones",
+LY_DEFINE (ly_pitch_semitones, "ly:pitch-semitones",
           1, 0, 0, (SCM pp),
           "calculate the number of semitones of @var{p} from middle C.")
 {
@@ -367,7 +368,7 @@ LY_DEFINE (ly_pitch_semitones,  "ly:pitch-semitones",
   return scm_int2num (q);
 }
 
-LY_DEFINE (pitch_less, "ly:pitch<?",
+LY_DEFINE (ly_pitch_less_p, "ly:pitch<?",
           2, 0, 0, (SCM p1, SCM p2),
           "Is @var{p1} lexicographically smaller than @var{p2}?")
 {
@@ -396,9 +397,8 @@ LY_DEFINE (ly_pitch_diff, "ly:pitch-diff",
   return interval (*r, *p).smobbed_copy ();
 }
 
-
 int
-Pitch::get_octave ()const
+Pitch::get_octave () const
 {
   return octave_;
 }