From: fred Date: Mon, 2 Dec 1996 00:35:06 +0000 (+0000) Subject: lilypond-0.0.13 X-Git-Tag: release/1.5.59~6700 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=edde12e2f21ff9ffe44cbe354458ddc26023572b;p=lilypond.git lilypond-0.0.13 --- diff --git a/hdr/voice.hh b/hdr/voice.hh index db2e0872cf..c716c650dc 100644 --- a/hdr/voice.hh +++ b/hdr/voice.hh @@ -1,9 +1,8 @@ #ifndef VOICE_HH #define VOICE_HH - +#include "proto.hh" #include "plist.hh" -#include "request.hh" /// class for horizontal stuff. struct Voice { @@ -36,9 +35,6 @@ struct Voice_element { const Voice *voice_; IPointerList reqs; - PointerList granted_items; - PointerList granted_spanners; - /****************/ void add(Request*); diff --git a/src/rhythmstaff.cc b/src/rhythmstaff.cc index c9a7831c1b..6c986a62cc 100644 --- a/src/rhythmstaff.cc +++ b/src/rhythmstaff.cc @@ -1,4 +1,6 @@ #include "molecule.hh" +#include "score.hh" +#include "request.hh" #include "notehead.hh" #include "stem.hh" #include "linestaff.hh" @@ -17,7 +19,8 @@ Rhythmic_staff::set_output(PScore*ps) Item * Rhythmic_staff::get_TYPESET_item(Command *com) { - if (com->args[0] == "KEY" || com->args[0] == "CLEF") + if (com->args[0] == "KEY" || com->args[0] == "CLEF"|| + com->args[0] == "CURRENTCLEF") return 0; Item *i = Simple_staff::get_TYPESET_item(com); if (!i) return 0; diff --git a/src/simplestaff.cc b/src/simplestaff.cc index 1afe0eed08..6437b65c3a 100644 --- a/src/simplestaff.cc +++ b/src/simplestaff.cc @@ -1,4 +1,5 @@ #include "request.hh" +#include "voice.hh" #include "swalker.hh" #include "debug.hh" #include "clef.hh" diff --git a/src/simplewalker.cc b/src/simplewalker.cc index 4918b5e6fa..7705e045a9 100644 --- a/src/simplewalker.cc +++ b/src/simplewalker.cc @@ -1,4 +1,5 @@ #include "request.hh" +#include "voice.hh" #include "clef.hh" #include "beam.hh" #include "pscore.hh" @@ -35,7 +36,7 @@ Simple_walker::do_INTERPRET_command(Command*com) s.del(0); clef_.read(s); } else { - WARN << " ignoring INTERPRET command: " << com->args[0]; + WARN << " ignoring INTERPRET command: " << com->args[0]<< '\n'; } } @@ -50,11 +51,10 @@ Simple_walker::do_TYPESET_command(Command*com) else com->args[0] = "KEY"; - if (com->args[0] == "CURRENTCLEF") - if (processed_clef) { + if (com->args[0] == "CURRENTCLEF") { + if (processed_clef) return; - } else - com->args[0] = "CLEF"; + } Item* i = staff()->get_TYPESET_item(com); @@ -71,9 +71,11 @@ Simple_walker::do_TYPESET_command(Command*com) ((Keyitem*) i)->read(typesetkey); // ugh } - if (com->args[0] == "CLEF") { + if (com->args[0] == "CLEF"||com->args[0] == "CURRENTCLEF") { processed_clef =true; - ((Clef_item*)i)->read(clef_); + Clef_item*c=(Clef_item*)i; + c->read(clef_); + c->change = (break_status != BREAK_POST - BREAK_PRE); } col()->typeset_item_directional(i, 1, break_status); } @@ -84,6 +86,7 @@ Simple_walker::do_local_key(Note_req*n) if ( local_key_.oct(n->octave).acc(n->name) != n->accidental) { if (!local_key_item_) { local_key_item_ = staff()->get_local_key_item(); + local_key_item_->c0_position = clef_.c0_pos; } local_key_item_->add(n->octave, n->name, n->accidental); @@ -125,7 +128,8 @@ Simple_walker::process_requests() Simple_staff *s = staff(); if (c->beam_&& c->beam_->spantype == Span_req::START) { if (beam_) - error("Too many beams"); + error("Too many beams (t = " + +String(c->when())+")"); beam_ = new Beam; } for (int i=0; i < c->slurs.sz(); i++) { @@ -148,13 +152,17 @@ Simple_walker::process_requests() } if (beam_) { + if (!stem_) + error("beamed note should have a stem (t = " + +String(c->when())+")"); beam_->add(stem_); } if (stem_) { c->typeset_item(stem_); /* needed, otherwise placement of local_key fucks up */ - stem_->set_default_extents(); +// stem_->set_default_extents(); + // can somebody explain myself? } if (c->beam_&& c->beam_->spantype == Span_req::STOP) { pscore_->typeset_spanner(beam_, s->theline); diff --git a/src/template2.cc b/src/template2.cc index 23e6aae200..d2d42f954f 100644 --- a/src/template2.cc +++ b/src/template2.cc @@ -1,7 +1,7 @@ #include "symbol.hh" #include "voice.hh" - +#include "request.hh" #include "staff.hh" #include "sccol.hh" #include "stcol.hh" diff --git a/src/template3.cc b/src/template3.cc index a457b6afbb..80921422fa 100644 --- a/src/template3.cc +++ b/src/template3.cc @@ -1,4 +1,3 @@ -#include "request.hh" #include "command.hh" #include "molecule.hh" #include "plist.cc" @@ -6,5 +5,5 @@ IPL_instantiate(Atom); IPL_instantiate(Command); -IPL_instantiate(Request); + diff --git a/src/voice.cc b/src/voice.cc index fbdb207aab..8a1c136d04 100644 --- a/src/voice.cc +++ b/src/voice.cc @@ -1,5 +1,6 @@ #include "debug.hh" #include "voice.hh" +#include "request.hh" Voice::Voice(Voice const&src) { @@ -74,5 +75,5 @@ Voice_element::Voice_element(Voice_element const&src) voice_=src.voice_; IPointerList__copy(Request*, reqs, src.reqs, clone()); group=src.group; - assert(!granted_items.size() && !granted_spanners.size()); +// assert(!granted_items.size() && !granted_spanners.size()); }