+++ /dev/null
-#ifndef MTIME_HH
-#define MTIME_HH
-
-#include "real.hh"
-
-typedef Real Mtime;
-
-#endif
staff_ = rs;
}
-
+Rhythmic_staff::Rhythmic_staff()
+{
+ theline = new Linestaff(1);
+}
void
Rhythmic_staff::set_output(PScore* ps )
{
- theline = new Linestaff(1);
pscore_ = ps;
pscore_->add(theline);
}
void
Rhythmic_column::process_commands( )
{
- int breakstat = BREAK_END;
+ int breakstat = BREAK_END - BREAK_PRE;
for (int i = 0 ; i < s_commands.sz(); i++) {
Command *com = s_commands[i];
switch (com->code){
case BREAK_POST:
case BREAK_END:
score_column->set_breakable();
- breakstat = com->code;
+ breakstat = com->code- BREAK_PRE;
break;
case TYPESET:
the_note = rq;
}
break;
-
}
}
m->add_right(dm);
}
i->output=m;
- staff_->pscore_->typeset_item(i, score_column->pcol, staff_->theline,0 );
+ staff_->pscore_->typeset_item(i, score_column->pcol, staff_->theline );
}
void
struct Rhythmic_staff : Staff {
/// indirection to the PStaff.
PStaff *theline;
+
+ /****************/
void set_output(PScore *);
void process_commands( PCursor<Command*> &where);
void grant_requests();
Staff_column * create_col(Score_column*);
+ Rhythmic_staff();
};
}
Staff_column *
-Staff::get_col(Mtime w, bool mus)
+Staff::get_col(Real w, bool mus)
{
Score_column* sc = score_->find_col(w,mus);
assert(sc->when == w);
for (PCursor<Voice*> vc(voices); vc.ok(); vc++) {
- Mtime now = vc->start;
+ Real now = vc->start;
for (PCursor<Voice_element *> ve(vc->elts); ve.ok(); ve++) {
Staff_column *sc=get_col(now,true);
}
-Mtime
+Real
Staff::last() const {
- Mtime l = 0.0;
+ Real l = 0.0;
for (PCursor<Voice*> vc(voices); vc.ok(); vc++) {
l = MAX(l, vc->last());
}
#endif
}
+Staff::Staff()
+{
+ score_ =0;
+ pscore_=0;
+
+}
Score *score_;
PScore *pscore_;
+ /****************************************************************/
+
void add_voice(Voice *v);
void add_staff_column(Staff_column *sp);
/**
This routines calls virtual functions from Staff, to delegate the
interpretation of requests to a derived class of Staff */
-
-
- /****************************************************************
- VIRTUALS
- ****************************************************************/
-
void setup_staffcols();
- virtual void set_output(PScore * destination)=0;
- virtual void grant_requests()=0;
-
- Staff_column * get_col(Mtime,bool);
+ void OK() const;
+ void print() const;
+ Real last() const;
+ void clean_cols() ;
+ Staff_column * get_col(Real,bool);
void add_commands(PointerList<Command* >const & sv);
/**
PRE
sv is time-ordered.
*/
+
+ Staff();
+ /**
+ Should construct with Score as arg, but this isn't known during parsing.
+ */
+ /****************************************************************
+ VIRTUALS
+ ****************************************************************/
+
+ virtual void set_output(PScore * destination)=0;
+ virtual void grant_requests()=0;
virtual Staff_column * create_col(Score_column * )=0;
+ virtual ~Staff() { }
- void OK() const;
- void print() const;
- Mtime last() const;
- void clean_cols() ;
- virtual ~Staff() { }
};
#endif
+
+