8 PCursor<Staff_column *> stc(cols);
10 if (!stc->score_column->used())
18 maak een staff column, met specs in args.
20 (sorry wat is het vroeg vandaag..)
23 Staff::get_col(Mtime w, bool mus)
25 Score_column* sc = score_->find_col(w,mus);
26 assert(sc->when == w);
27 PCursor<Staff_column *> stc(cols);
28 for (; stc.ok(); stc++) {
29 if (*sc < *stc->score_column)
31 if (sc == stc->score_column)
34 Staff_column* newst = create_col(sc);
37 cols.bottom().add(newst);
46 if ((stc-1)->when() == newst->when()) {
57 Staff::add_voice(Voice *v)
59 voices.bottom().add(v);
63 put all stuff grouped vertically in the Staff_cols
66 Staff::setup_staffcols()
69 for (PCursor<Voice*> vc(voices); vc.ok(); vc++) {
71 Mtime now = vc->start;
72 for (PCursor<Voice_element *> ve(vc->elts); ve.ok(); ve++) {
74 Staff_column *sc=get_col(now,true);
80 for (PCursor<Command*> cc(commands); cc.ok(); cc++) {
81 Staff_column *sc=get_col(cc->when,false);
82 sc->s_commands.add(cc);
86 /// merge commands from score
88 Staff::add_commands(PointerList<Command*> const &cl)
90 PCursor<Command*> score_c(cl);
91 PCursor<Command*> cc(commands);
93 while (score_c.ok()) {
94 while (cc.ok() && cc->when <= score_c->when)
97 Command*nc = new Command (*(* score_c));
99 // cc->when > score_c->when
102 commands.bottom().add( nc);
103 cc = commands.bottom();
108 // now integrate break commands with other commands.
109 // may be do this in derived functions.
117 for (PCursor<Staff_column*> sc(cols); sc.ok(); sc++) {
118 sc->process_commands();
119 sc->process_requests();
137 Staff::last() const {
139 for (PCursor<Voice*> vc(voices); vc.ok(); vc++) {
140 l = MAX(l, vc->last());
150 for (PCursor<Voice*> vc(voices); vc.ok(); vc++) {
157 /****************************************************************/
160 Staff_column::mus() const
162 return score_column->musical;
166 Staff_column::when() const
168 return score_column->when;
172 Staff_column::add(Voice_element*ve)
174 Mtime d= ve->duration;
176 score_column->durations.add(d);
182 Staff_column::Staff_column(Score_column*s) {