From: fred Date: Tue, 26 Mar 2002 22:31:26 +0000 (+0000) Subject: lilypond-1.1.66 X-Git-Tag: release/1.5.59~2068 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ca4cb6bab6ca9a32050c8b3b5545515400b4fbd1;p=lilypond.git lilypond-1.1.66 --- diff --git a/input/test/abbreviation-beam.sly b/input/test/abbreviation-beam.sly deleted file mode 100644 index 88cc140de0..0000000000 --- a/input/test/abbreviation-beam.sly +++ /dev/null @@ -1,6 +0,0 @@ -[:16 c'1 d] -[:8 c2 d] -[:16 c4 d] -[:32 c16 d] -[:32 c16 d] -[:16 c8 d] diff --git a/lily/abbreviation-beam-engraver.cc b/lily/abbreviation-beam-engraver.cc deleted file mode 100644 index d264169f9f..0000000000 --- a/lily/abbreviation-beam-engraver.cc +++ /dev/null @@ -1,164 +0,0 @@ -/* - abbreviation-beam-engraver.cc -- implement Abbreviation_beam_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1997--1999 Han-Wen Nienhuys - Jan Nieuwenhuizen -*/ - -#include "duration-convert.hh" -#include "time-description.hh" -#include "abbreviation-beam-engraver.hh" -#include "stem.hh" -#include "abbreviation-beam.hh" -#include "musical-request.hh" -#include "misc.hh" -#include "warn.hh" -#include "score-engraver.hh" - -ADD_THIS_TRANSLATOR (Abbreviation_beam_engraver); - -Abbreviation_beam_engraver::Abbreviation_beam_engraver () -{ - reqs_drul_[LEFT] = reqs_drul_[RIGHT] = 0; - abeam_p_ = 0; - finished_abeam_p_ = 0; - prev_start_req_ = 0; -} - -bool -Abbreviation_beam_engraver::do_try_music (Music* m) -{ - if (Abbreviation_beam_req* b = dynamic_cast (m)) - { - Direction d = b->span_dir_; - if (reqs_drul_[d] && !reqs_drul_[d]->equal_b (b)) - return false; - - if ((d == STOP) && !abeam_p_) - { - m->warning (_ ("No abbreviation beam to end")); - return false; - } - - reqs_drul_[d] = b; - return true; - } - - return false; -} - -void -Abbreviation_beam_engraver::do_process_requests () -{ - if (reqs_drul_[STOP]) - { - if (!abeam_p_) - reqs_drul_[STOP]->warning (_("No abbreviation beam to end")); - prev_start_req_ = 0; - finished_abeam_p_ = abeam_p_; - abeam_p_ = 0; - } - - if (abeam_p_) - { - Score_engraver * e = 0; - Translator * t = daddy_grav_l (); - for (; !e && t; t = t->daddy_trans_l_) - { - e = dynamic_cast (t); - } - - if (!e) - programming_error ("No score engraver!"); - else - e->forbid_breaks (); - } - - if (reqs_drul_[START]) - { - if (abeam_p_) - { - reqs_drul_[START]->warning (_ ("Already have an abbreviation beam")); - return; - } - - prev_start_req_ = reqs_drul_[START]; - - abeam_p_ = new Abbreviation_beam; - announce_element (Score_element_info (abeam_p_, reqs_drul_[LEFT])); - } -} - -void -Abbreviation_beam_engraver::do_post_move_processing () -{ - reqs_drul_ [START] = 0; -} - -void -Abbreviation_beam_engraver::do_pre_move_processing () -{ - typeset_beam (); -} - -void -Abbreviation_beam_engraver::typeset_beam () -{ - if (finished_abeam_p_) - { - typeset_element (finished_abeam_p_); - finished_abeam_p_ = 0; - - reqs_drul_[STOP] = 0; - } -} - -void -Abbreviation_beam_engraver::do_removal_processing () -{ - typeset_beam (); - if (abeam_p_) - { - prev_start_req_->warning (_ ("Unfinished abbreviation beam")); - finished_abeam_p_ = abeam_p_; - typeset_beam (); - } -} - -void -Abbreviation_beam_engraver::acknowledge_element (Score_element_info i) -{ - if (abeam_p_) - { - if (Stem* s = dynamic_cast (i.elem_l_)) - { - int type_i = prev_start_req_->type_i_; - s->flag_i_ = intlog2 (type_i) - 2; - - s->beams_i_drul_[LEFT] = s->flag_i_; - s->beams_i_drul_[RIGHT] = s->flag_i_; - - abeam_p_->multiple_i_ = s->flag_i_; - /* - abbrev gaps on all but half note - */ -#if 0 - if (s->type_i () != 1) - { - int gap_i =s->flag_i_ - ((s->type_i () >? 2) - 2); - s->set_elt_property (beam_gap_scm_sym, gh_int2scm(gap_i)); - } -#else - if (s->type_i () != 1) - { - int gap_i =s->flag_i_ - ((s->type_i () >? 2) - 2); - abeam_p_->set_elt_property (beam_gap_scm_sym, gh_int2scm(gap_i)); - } -#endif - - abeam_p_->add_stem (s); - } - } -} diff --git a/lily/abbreviation-beam.cc b/lily/abbreviation-beam.cc deleted file mode 100644 index b0307f2e6f..0000000000 --- a/lily/abbreviation-beam.cc +++ /dev/null @@ -1,60 +0,0 @@ -/* - abbreviation-beam.cc -- implement Abbreviation_beam - - source file of the GNU LilyPond music typesetter - - (c) 1997--1999 Han-Wen Nienhuys - Jan Nieuwenhuizen -*/ - -#include "paper-column.hh" -#include "array.hh" -#include "proto.hh" -#include "abbreviation-beam.hh" -#include "misc.hh" -#include "debug.hh" - -#include "molecule.hh" -#include "leastsquares.hh" -#include "stem.hh" -#include "paper-def.hh" -#include "lookup.hh" -#include "stem-info.hh" - - - - -Abbreviation_beam::Abbreviation_beam () - : Beam () -{ -} - -Molecule* -Abbreviation_beam::do_brew_molecule_p () const -{ - return Beam::do_brew_molecule_p (); -} - -void -Abbreviation_beam::do_print () const -{ -#ifndef NPRINT - Beam::do_print (); - Spanner::do_print (); -#endif -} - -/* - beams to go with one stem. - */ -Molecule -Abbreviation_beam::stem_beams (Stem *here, Stem *next, Stem *prev) const -{ - /* - todo - - shorter beams (not reaching outer "stems") - for [:16 c4 c4] and [:16 c1 c1] - - centered beam on [:16 c1 c1] heads, rather than "stems" - */ - return Beam::stem_beams (here, next, prev); -} diff --git a/lily/colhpos.cc b/lily/colhpos.cc deleted file mode 100644 index f23646cb01..0000000000 --- a/lily/colhpos.cc +++ /dev/null @@ -1,78 +0,0 @@ -/* - colhpos.cc -- implement Column_x_positions - - source file of the GNU LilyPond music typesetter - - (c) 1997--1999 Han-Wen Nienhuys -*/ - -#include "colhpos.hh" -#include "real.hh" -#include "debug.hh" -#include "vector.hh" -#include "line-spacer.hh" - -Column_x_positions::Column_x_positions() -{ - energy_f_ = infinity_f; - satisfies_constraints_b_ = false; - spacer_l_ =0; -} - -Column_x_positions::~Column_x_positions() -{ - -} - -void -Column_x_positions::add_paper_column (Paper_column*c) -{ - cols_.push (c); -} - -void -Column_x_positions::print() const -{ -#ifndef NPRINT - DOUT << "energy : " << energy_f_ << '\n'; - DOUT << "line of " << config_.size() << " cols\n"; - Vector v (config_); - DOUT << v; -#endif -} - -void -Column_x_positions::OK() const -{ -#ifndef NDEBUG - assert (config_.size() == cols_.size ()); -#endif -} - -void -Column_x_positions::set_stupid_solution(Vector v) -{ - energy_f_ = infinity_f; - config_ = v; -} - -void -Column_x_positions::stupid_solution() -{ - set_stupid_solution (spacer_l_->default_solution()); -} - -void -Column_x_positions::solve_line() -{ - spacer_l_->solve (this); -} - - -void -Column_x_positions::approximate_solve_line() -{ - spacer_l_->lower_bound_solution (this); -} - - diff --git a/lily/include/abbreviation-beam-engraver.hh b/lily/include/abbreviation-beam-engraver.hh deleted file mode 100644 index d3610592be..0000000000 --- a/lily/include/abbreviation-beam-engraver.hh +++ /dev/null @@ -1,44 +0,0 @@ -/* - abbreviation-beam-engraver.hh -- declare Abbreviation_beam_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1997--1999 Han-Wen Nienhuys - Jan Nieuwenhuizen -*/ - - -#ifndef ABBREVIATION_BEAM_ENGRAVER_HH -#define ABBREVIATION_BEAM_ENGRAVER_HH - -#include "engraver.hh" -#include "drul-array.hh" - -/** - Generate an abbreviation beam. Eat stems. - */ -class Abbreviation_beam_engraver : public Engraver -{ -public: - VIRTUAL_COPY_CONS(Translator); - - - Abbreviation_beam_engraver(); - -protected: - virtual void do_removal_processing(); - virtual void do_process_requests(); - virtual bool do_try_music (Music*); - virtual void acknowledge_element (Score_element_info); - virtual void do_pre_move_processing(); - virtual void do_post_move_processing(); - -private: - void typeset_beam (); - Drul_array reqs_drul_; - Abbreviation_beam_req* prev_start_req_; - Abbreviation_beam* abeam_p_; - Abbreviation_beam* finished_abeam_p_; -}; - -#endif // ABBREVIATION_BEAM_ENGRAVER_HH diff --git a/lily/include/abbreviation-beam.hh b/lily/include/abbreviation-beam.hh deleted file mode 100644 index 3d1b45a728..0000000000 --- a/lily/include/abbreviation-beam.hh +++ /dev/null @@ -1,33 +0,0 @@ -/* - abbreviation-beam-engraver.hh -- declare Abbreviation_beam_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1997--1999 Han-Wen Nienhuys - Jan Nieuwenhuizen -*/ - -#ifndef ABBREVIATION_BEAM_HH -#define ABBREVIATION_BEAM_HH - -#include "beam.hh" - -/** a beam connects multiple stems Beam adjusts the stems its owns to - make sure that they reach the beam and that point in the correct - direction */ -class Abbreviation_beam : public Beam { -public: - - - Abbreviation_beam(); - - VIRTUAL_COPY_CONS(Score_element); - -protected: - virtual void do_print() const; - virtual Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const; - virtual Molecule* do_brew_molecule_p() const; -}; - -#endif // ABBREVIATION_BEAM_HH - diff --git a/lily/include/colhpos.hh b/lily/include/colhpos.hh deleted file mode 100644 index 98b808a5bb..0000000000 --- a/lily/include/colhpos.hh +++ /dev/null @@ -1,38 +0,0 @@ -/* - colhpos.hh -- part of GNU LilyPond - - (c) 1997--1999 Han-Wen Nienhuys -*/ - -#ifndef COLHPOS_HH -#define COLHPOS_HH - -#include "parray.hh" -#include "lily-proto.hh" - -typedef Link_array Line_of_cols; - -struct Column_x_positions { - Line_spacer * spacer_l_; - Line_of_cols cols_; - Array config_; - - Real energy_f_; - bool satisfies_constraints_b_; - - void OK() const; - ~Column_x_positions(); - void solve_line(); - void approximate_solve_line(); - /** generate a solution with no regard to idealspacings or - constraints. should always work */ - void stupid_solution(); - void set_stupid_solution (Vector); - Column_x_positions(); - void add_paper_column (Paper_column*c); - void print() const; -}; - - -#endif // COLHPOS_HH -