From: fred Date: Sun, 22 Dec 1996 15:45:29 +0000 (+0000) Subject: lilypond-0.0.20 X-Git-Tag: release/1.5.59~6509 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c3e81e0ed6e0f28717c38ec9cffd690d6f12fdc2;p=lilypond.git lilypond-0.0.20 --- diff --git a/hdr/inputcommand.hh b/hdr/inputcommand.hh index fff2f1a1f3..639b6542e1 100644 --- a/hdr/inputcommand.hh +++ b/hdr/inputcommand.hh @@ -9,13 +9,14 @@ #include "proto.hh" #include "scalar.hh" #include "vray.hh" +#include "moment.hh" struct Input_command { /// analogous to argv[] svec 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); 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); +Input_command *get_partial_command(Moment u); +Input_command *get_skip_command(int,Moment); Input_command *get_grouping_command(svec); Input_command *get_bar_command( ); diff --git a/hdr/moment.hh b/hdr/moment.hh index 83910b1a31..3327741384 100644 --- a/hdr/moment.hh +++ b/hdr/moment.hh @@ -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 // diff --git a/hdr/sccol.hh b/hdr/sccol.hh index b61a02682f..8c1d82b3ae 100644 --- a/hdr/sccol.hh +++ b/hdr/sccol.hh @@ -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 durations; + svec 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; };