#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();
};
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( );
/*
- 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 //
#ifndef SCCOL_HH
#define SCCOL_HH
-#include "pcol.hh"
+#include "proto.hh"
#include "vray.hh"
+#include "moment.hh"
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;
};