13 *mlog << "\nProcessing music ... ";
16 if (last() == Moment(0)) {
17 error("Need to have music in a score.");
19 // distribute commands to disciples
20 pscore_p_ = new PScore(paper_p_);
21 for (iter_top(staffs_,i); i.ok(); i++) {
22 i->truncate_cols(last());
23 i->set_output(pscore_p_);
27 // do this after processing, staffs first have to generate PCols.
28 find_col(last(), false)->set_breakable();
43 for (iter_top(staffs_,i); i.ok(); i++)
46 for (iter_top(cols_,c); c.ok(); ) {
47 if (!c->pcol_l_->used()) {
56 this sux. We should have Score_column create the appropriate PCol.
57 Unfortunately, PCols don't know about their position.
59 PCursor<Score_column*>
60 Score::create_cols(Moment w)
62 Score_column* c1 = new Score_column(w);
63 Score_column* c2 = new Score_column(w);
71 assert(i->when() != w);
77 cols_.bottom().add(c1);
78 cols_.bottom().add(c2);
89 PCursor<Score_column*>
90 Score::find_col(Moment w,bool mus)
94 if (i->when() == w && i->musical_ == mus)
109 for (; i.ok(); i++) {
110 pscore_p_->add(i->pcol_l_);
112 clean_cols(); // can't move clean_cols() farther up.
118 for (iter_top(staffs_,i); i.ok(); i++) {
128 for (iter_top(staffs_,i); i.ok(); i++) {
130 assert(i->score_l_ == this);
134 for (iter_top(cols_,cc); cc.ok() && (cc+1).ok(); cc++) {
135 assert(cc->when() <= (cc+1)->when());
146 for (iter_top(staffs_,i); i.ok(); i++) {
149 for (iter_top(cols_,i); i.ok(); i++) {
159 Score::Score(Paperdef*p)
162 paper_p_ = p; // ?? safe?
173 Score::output(String s)
176 if (paper_p_->outfile=="")
177 paper_p_->outfile = s;
179 if ( errorlevel_i_ ) {
180 *mlog << "lilypond: warning: no output to: " << paper_p_->outfile
181 << " (errorlevel=" << errorlevel_i_ << ")" << endl;
185 *mlog << "output to " << paper_p_->outfile << "...\n";
187 Tex_stream the_output(paper_p_->outfile);
188 the_output << "% outputting Score, defined at: " << define_spot_str_ << "\n";
189 pscore_p_->output(the_output);
198 staffs_.bottom().add(s);
202 Score::add_marks(Array<String> s_arr, Array<Moment> m_arr)
204 for (int i=0; i < s_arr.size(); i++) {
205 String mark_str (s_arr[i]);
206 if (markers_assoc_.elt_query(mark_str) &&
207 m_arr[i] != markers_assoc_[mark_str])
209 error("Conflicting marker: `" + s_arr[i]+ "\'");
211 markers_assoc_[s_arr[i]] = m_arr[i];