]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.20
authorfred <fred>
Sun, 22 Dec 1996 15:45:29 +0000 (15:45 +0000)
committerfred <fred>
Sun, 22 Dec 1996 15:45:29 +0000 (15:45 +0000)
hdr/inputcommand.hh
hdr/moment.hh
hdr/sccol.hh

index fff2f1a1f3e0714bd3bbb7091c6e259f019a7236..639b6542e1e6582e127905f84f152fa0b8102d52 100644 (file)
@@ -9,13 +9,14 @@
 #include "proto.hh"
 #include "scalar.hh"
 #include "vray.hh"
+#include "moment.hh"
 
 struct Input_command {
     /// analogous to argv[]
     svec<Scalar> args;
     void print()const;
     Input_command();
-    Input_command(Real);
+
     operator Command();
 };
 
@@ -23,9 +24,8 @@ Input_command* get_meterchange_command( int,int);
 Input_command* get_key_interpret_command(svec<int >);
 Input_command* get_clef_interpret_command(String w);
 Input_command *get_reset_command();
-Input_command *get_partial_command(Real u);
-Input_command *get_skip_command(int,Real);
-Input_command *get_grouping_command(Real,svec<int>);
+Input_command *get_partial_command(Moment u);
+Input_command *get_skip_command(int,Moment);
 Input_command *get_grouping_command(svec<int>);
 Input_command *get_bar_command( );
 
index 83910b1a3106a5e9ca84cbc1a5bb4835952a8aca..332774138486bc6fd3f6bd52e32716f3ebe90768 100644 (file)
@@ -1,36 +1,13 @@
 /*
-  moment.hh -- part of LilyPond
-
   (c) 1996 Han-Wen Nienhuys
 */
 
 #ifndef MOMENT_HH
 #define MOMENT_HH
 
-#include "real.hh"
-
-
-struct Moment {
-    Real when;
-    /// current measure info
-    Real whole_per_measure;
-
-    /// where am i 
-    Real whole_in_measure;
-
-    /// how long is one beat?
-    Real one_beat;
+#include "rational.hh"
 
-    /// idem
-    int bars;
-    /****************/
-    void OK() const;
-    Moment(Real, const Moment*);
-    void print() const;
-    void setpartial(Real p);
-    Real barleft();
-    void set_meter(int,int);
-};
+typedef Rational Moment;
 
-#endif // MOMENT_HH
+#endif // 
 
index b61a02682f10aefd1cc01f281ad02ab2763bad6f..8c1d82b3aede30e62d7dd7a39e4a46f833a5b6aa 100644 (file)
@@ -6,8 +6,9 @@
 
 #ifndef SCCOL_HH
 #define SCCOL_HH
-#include "pcol.hh"
+#include "proto.hh"
 #include "vray.hh"
+#include "moment.hh"
 
 
 struct Score_column {
@@ -16,24 +17,20 @@ struct Score_column {
     PCol * pcol_;
 
     /// length of notes/rests in this column
-    svec<Real> durations;
+    svec<Moment> durations;
     
-    Real when;
+    Moment when;
 
     /// 
     bool musical;
     
     /****************/
     
-    Score_column(Real when);       
-    static int compare(Score_column & c1, Score_column &c2) {
-       return sgn(c1.when - c2.when);
-    }
-    void add_duration(Real );
+    Score_column(Moment when);       
+    static int compare(Score_column & c1, Score_column &c2);
+    void add_duration(Moment );
     void preprocess();
-    void set_breakable() {
-        pcol_->set_breakable();
-    }
+    void set_breakable();
     bool used();
     void print() const;
 };