From: fred Date: Sun, 24 Mar 2002 19:48:28 +0000 (+0000) Subject: lilypond-0.0.76 X-Git-Tag: release/1.5.59~4432 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=bb084690fd5aaa672c66d4886fd7b32c99710e5a;p=lilypond.git lilypond-0.0.76 --- diff --git a/lily/rest-collision-grav.cc b/lily/rest-collision-grav.cc index d5e42658e7..296f856a8a 100644 --- a/lily/rest-collision-grav.cc +++ b/lily/rest-collision-grav.cc @@ -55,7 +55,6 @@ void Rest_collision_engraver::do_print() const { #ifndef NPRINT - mtor << "collisions: " << collision_l_arr_.size(); if ( rest_collision_p_ ) rest_collision_p_->print(); #endif diff --git a/lily/score.cc b/lily/score.cc index 320c752caf..3164315981 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -24,6 +24,14 @@ extern String default_out_fn; +Score::Score() +{ + pscore_p_=0; + paper_p_ = 0; + midi_p_ = 0; + errorlevel_i_ = 0; +} + Score::Score(Score const &s) { assert(!pscore_p_); @@ -32,6 +40,14 @@ Score::Score(Score const &s) paper_p_ = new Paper_def(*s.paper_p_); } +Score::~Score() +{ + delete music_p_; + delete pscore_p_; + delete paper_p_; + delete midi_p_; +} + void Score::run_translator(Global_translator * trans_l) { @@ -40,6 +56,7 @@ Score::run_translator(Global_translator * trans_l) trans_l); iter->construct_children(); + trans_l->start(); while ( iter->ok() || trans_l->moments_left_i() ) { Moment w = INFTY; if (iter->ok() ) { @@ -48,6 +65,8 @@ Score::run_translator(Global_translator * trans_l) } trans_l->modify_next( w ); trans_l->prepare(w); + trans_l->print(); + iter->process_and_next( w ); trans_l->process(); } @@ -55,7 +74,6 @@ Score::run_translator(Global_translator * trans_l) trans_l->finish(); } - void Score::process() { @@ -66,11 +84,10 @@ Score::process() void Score::midi() { - if (!midi_p_) + if ( !midi_p_ ) return; - *mlog << "\nCreating elements ..." << endl; //flush; -// pscore_p_ = new PScore(paper_p_); + *mlog << "\nCreating MIDI elements ..." << flush; Global_translator* score_trans= midi_p_->get_global_translator_p(); run_translator( score_trans ); @@ -78,15 +95,11 @@ Score::midi() if( errorlevel_i_){ // should we? hampers debugging. - warning("Errors found, /*not processing score*/"); + warning( "Errors found, /*not processing score*/" ); // return; } print(); *mlog << endl; -// pscore_p_->process(); - - // output - midi_output(); } void @@ -107,14 +120,10 @@ Score::paper() warning("Errors found, /*not processing score*/"); // return; } - do_cols(); - clean_cols(); // can't move clean_cols() farther up. print(); - calc_idealspacing(); // debugging - OK(); *mlog << endl; pscore_p_->process(); @@ -122,45 +131,6 @@ Score::paper() paper_output(); } -/** - Remove empty cols, preprocess other columns. - */ -void -Score::clean_cols() -{ - for (iter_top(cols_,c); c.ok(); ) { - if (!c->pcol_l_->used_b()) { - delete c.remove_p(); - } else { - c->preprocess(); - c++; - } - } -} - -PCursor -Score::find_col(Moment w, bool mus) -{ - iter_top( cols_,i); - - for (; i.ok(); i++) { - if (i->when() == w && i->musical_b_ == mus) - return i; - if (i->when() > w) - break; - } - assert(false); - return i; -} - -void -Score::do_cols() -{ - iter_top(cols_,i); - for (; i.ok(); i++) { - pscore_p_->add(i->pcol_l_); - } -} void Score::set(Paper_def *pap_p) @@ -176,16 +146,6 @@ Score::set(Midi_def* midi_p) midi_p_ = midi_p; } -void -Score::OK() const -{ -#ifndef NDEBUG - cols_.OK(); - for (iter_top(cols_,cc); cc.ok() && (cc+1).ok(); cc++) { - assert(cc->when() <= (cc+1)->when()); - } -#endif -} void @@ -194,11 +154,6 @@ Score::print() const #ifndef NPRINT mtor << "score {\n"; music_p_->print(); - for (iter_top(cols_,i); i.ok(); i++) { - i->print(); - } - if (pscore_p_) - pscore_p_->print(); if (midi_p_) midi_p_->print(); @@ -206,22 +161,6 @@ Score::print() const #endif } -Score::Score() -{ - pscore_p_=0; - paper_p_ = 0; - midi_p_ = 0; - errorlevel_i_ = 0; -} - -Score::~Score() -{ - delete music_p_; - delete pscore_p_; - delete paper_p_; - delete midi_p_; -} - void Score::paper_output() {