]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/chord.hh
patch::: 1.3.141.hwn3: Re: Sugar
[lilypond.git] / lily / include / chord.hh
index ce85501bf87b073e1768abf4972af4f9a3a673b8..e60fe80483420efb404d6f5808a535ea15e2ea94 100644 (file)
@@ -3,51 +3,37 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1999--2000 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 1999--2001 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #ifndef CHORD_HH
 #define CHORD_HH
 
-#include "array.hh"
-#include "musical-pitch.hh"
-#include "lily-proto.hh"
-
-
+#include "pitch.hh"
 
 /*
-  Slightly on the hairy side? In any case COMMENTME.
- */
+  This is not an Item, just a collection of Chord manipulation helper
+  functions
+  
+  ``chord'' is encoded:
+ (PITCHES . (INVERSION . BASS))
+
+  Chord:: namespace...  */
 class Chord
 {
 public:
-  static Array<Musical_pitch> base_arr (Musical_pitch p);
-  static int find_tonic_i (Array<Musical_pitch> const*);
-  static int find_pitch_i (Array<Musical_pitch> const*, Musical_pitch p);
-  static int find_notename_i (Array<Musical_pitch> const*, Musical_pitch p);
-  static Array<Musical_pitch> missing_thirds_pitch_arr (Array<Musical_pitch> const* pitch_arr_p);
-  static void rebuild_from_base (Array<Musical_pitch>*, int base_i);
-  static void rebuild_insert_inversion (Array<Musical_pitch>*, int tonic_i);
-  static void rebuild_transpose (Array<Musical_pitch>*, Musical_pitch tonic, bool fix7_b);
-  static void rebuild_with_bass (Array<Musical_pitch>*, int bass_i);
-  static int step_i (Musical_pitch tonic, Musical_pitch p);
-
-
-  Chord ();
-  Chord (Array<Musical_pitch> pitch_arr, Musical_pitch* inversion_p, Musical_pitch* bass_p);
-  Chord (Chord const&);
-
-  Array<Musical_pitch> to_pitch_arr () const;
-
-  Array<Musical_pitch> pitch_arr_;
-  bool inversion_b_;
-  Musical_pitch inversion_pitch_;
-  bool bass_b_;
-  Musical_pitch bass_pitch_;
+  static SCM base_pitches (SCM tonic);
+  static SCM transpose_pitches (SCM tonic, SCM pitches);
+  static SCM lower_step (SCM tonic, SCM pitches, SCM step);
+  static SCM member_notename (SCM p, SCM pitches);
+  static SCM member_pitch (SCM p, SCM pitches);
+  static SCM step_scm (SCM tonic, SCM p);
+  static SCM missing_thirds (SCM pitches);
+  static SCM to_pitches (SCM chord);
+  static SCM add_above_tonic (SCM pitch, SCM pitches);
+  static SCM add_below_tonic (SCM pitch, SCM pitches);
+  static SCM tonic_add_sub_to_pitches (SCM tonic, SCM add, SCM sub);
+  static Simultaneous_music *get_chord (SCM tonic, SCM add, SCM sub, SCM inversion, SCM bass, SCM dur);
 };
 
-Chord to_chord (Musical_pitch tonic, Array<Musical_pitch>* add_arr_p, Array<Musical_pitch>* sub_arr_p, Musical_pitch* inversion_p, Musical_pitch* bass_p);
-
-Chord to_chord (Array<Musical_pitch> pitch_arr, Tonic_req* tonic_req, Inversion_req* inversion_req, Bass_req* bass_req, bool find_inversion_b);
-
-#endif // CHORD_HH
+#endif /* CHORD_HH */