]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/musical-pitch.hh
patch::: 1.3.33.jcn3
[lilypond.git] / lily / include / musical-pitch.hh
index ed3e8ed015bf89904c9723a602d5d93efb1c9e12..7bc94b499f17562670dd47232c3d7c0f1f04cec1 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1998--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
 
 #include "lily-proto.hh"
 #include "input.hh"
+#include "lily-guile.hh" // we need SCM
 
-/** The pitch as it figures in diatonal western music (12 semitones in
-   an octave).
+/** A "tonal" pitch. This is a pitch as it figures in diatonal western
+   music (12 semitones in an octave), as opposed to a frequence in Hz
+   or a integer number of semitones.
 
-   It is not Music because, it has to duration associated
+   It is not Music because, it has no duration associated.
 */
 struct Musical_pitch : public Input
 {
-  Musical_pitch ();
+  Musical_pitch (int notename=0, int accidental=0, int octave=0);
 
   /// 0 is c, 6 is b
   int notename_i_;
-  /// 0 is central c
-  int octave_i_;
   /// 0 natural, 1 sharp, etc
   int accidental_i_;
+  /// 0 is central c
+  int octave_i_;
 
-  void init () ;
   Musical_pitch to_relative_octave (Musical_pitch);
   void transpose (Musical_pitch);
   static int compare (Musical_pitch const&,Musical_pitch const&);
@@ -43,6 +44,9 @@ struct Musical_pitch : public Input
   void print () const;
 };
 
+SCM to_scm (Musical_pitch p);
+Musical_pitch scm_to (SCM s, Musical_pitch* p);
+
 #include "compare.hh"
 INSTANTIATE_COMPARE(Musical_pitch, Musical_pitch::compare);