From 10181fa860e82a0df06c5e45124ab5aa960ee427 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:41:45 +0000 Subject: [PATCH] lilypond-0.0.56 --- bin/release | 20 +++++++--- lily/include/note-column-reg.hh | 9 ++++- lily/include/rest-column.hh | 28 ++++++++++++++ lily/include/stem.hh | 66 ++++++++++++++++++++------------- lily/rest-collision.cc | 58 +++++++++++++++++++++++++++++ lily/rest-column.cc | 27 ++++++++++++++ 6 files changed, 175 insertions(+), 33 deletions(-) create mode 100644 lily/include/rest-column.hh create mode 100644 lily/rest-collision.cc create mode 100644 lily/rest-column.cc diff --git a/bin/release b/bin/release index a9a70bbe73..4f38a8883e 100755 --- a/bin/release +++ b/bin/release @@ -32,12 +32,16 @@ heredir=`pwd` make dist; setversion LILYVER=$NEWVER -mv lilypond-$LILYVER.tar.gz ../releases + +tarball=lilypond-$LILYVER.tar.gz +patch=patch-$LILYVER.gz + +mv $tarball ../releases cd ../test $heredir/bin/make_patch $LASTVER $NEWVER lilypond gzip -f9 patch-$NEWVER -mv patch-$NEWVER.gz ../patches/ +mv $patch ../patches/ RPMS=`find ~/rpms/ -name lilypond-$NEWVER'*'rpm` rm *.rpm {lilypond,patch}-*.gz @@ -45,10 +49,14 @@ rm *.rpm {lilypond,patch}-*.gz if [ ! -z $RPMS ]; then ln $RPMS . fi -ln ../releases/lilypond-$NEWVER.tar.gz . -ln ../patches/patch-$NEWVER.gz . + +ln ../releases/$tarball . +ln ../patches/$patch . + -RPMS=`echo *.rpm` -tar cf updeet {lily,patch-}*.gz $RPMS +if [ ! -z $RPMS ]; then + RPMS=lilypond-$LILYVER-1.i386.rpm lilypond-$LILYVER-1.src.rpm +fi +tar cf updeet $tarball $patch $RPMS tar tfv updeet diff --git a/lily/include/note-column-reg.hh b/lily/include/note-column-reg.hh index ddcbdae2f5..d052d04983 100644 --- a/lily/include/note-column-reg.hh +++ b/lily/include/note-column-reg.hh @@ -13,16 +13,23 @@ #include "register.hh" class Note_column_register :public Request_register { + Rest_column * rest_col_l(); + Note_column * note_col_l(); + + Array< Script * > script_l_arr_; + Stem * stem_l_; Note_column *ncol_p_; + Rest_column *restcol_p_; bool h_shift_b_; int dir_i_; + /* *************** */ bool acceptable_elem_b(Staff_elem const*)const; protected: virtual void set_feature(Feature); virtual void acknowledge_element(Staff_elem_info); virtual void pre_move_processing(); - + virtual void post_move_processing(); public: Note_column_register(); NAME_MEMBERS(Note_column_register); diff --git a/lily/include/rest-column.hh b/lily/include/rest-column.hh new file mode 100644 index 0000000000..04e86e581a --- /dev/null +++ b/lily/include/rest-column.hh @@ -0,0 +1,28 @@ +/* + rest-column.hh -- declare Rest_column + + source file of the LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + + +#ifndef REST_COLUMN_HH +#define REST_COLUMN_HH + +#include "script-column.hh" + +/** + struct to treat a set of rests as union (one voicegroup should + only produce one rest. + */ +class Rest_column : public Script_column { + Array head_l_arr_; +public: + int dir_i_; + void add(Notehead *); + NAME_MEMBERS(Rest_column); + void translate_y(Real dy); +}; + +#endif // REST_COLUMN_HH diff --git a/lily/include/stem.hh b/lily/include/stem.hh index e64aafdd69..9cabdcd2a0 100644 --- a/lily/include/stem.hh +++ b/lily/include/stem.hh @@ -19,52 +19,57 @@ \item the flag \item up/down position. \end{itemize} - */ - -struct Stem : Item { - /// heads that the stem encompasses (positions) - int minnote, maxnote; - /// false if in beam - bool print_flag; + should move beam_{left, right} into Beam + */ +class Stem : public Item { + + Real stem_bottom_f_, stem_top_f_; - int beams_left; - int beams_right; /// needed for determining direction/length - int staff_center; - + int staff_size_i_; /**extent of the stem (positions). fractional, since Beam has to adapt them. */ - Real bot, top; - Real stemlen; - - /// flagtype? 4 none, 8 8th flag, 0 = beam. - int flag; - /** geen gedonder, jij gaat onder. - -1 stem points down, +1: stem points up - */ + -1 stem points down, +1: stem points up + */ + Real stem_xoffset_f_; + /** + store the wholes (for vapourware tremolo) + */ + Array whole_l_arr_; + Array head_l_arr_; + Array rest_l_arr_; + +public: + /// flagtype? 4 none, 8 8th flag, 0 = beam. + int flag_i_; - int dir_i_; - Real stem_xoffset; + int beams_left_i_; + int beams_right_i_; + + /// false if in beam + bool print_flag_b_; - Array heads; + int dir_i_; + /* *************** */ - Stem(int center); //, Moment duration); + Stem(int staff_size_i); /// ensure that this Stem also encompasses the Notehead #n# void add(Notehead*n); NAME_MEMBERS(Stem); - Real hindex()const; + Real hpos_f()const; + void do_print() const; void set_stemend(Real); int get_default_dir(); @@ -72,10 +77,19 @@ struct Stem : Item { void set_default_stemlen(); void set_default_extents(); void set_noteheads(); - void do_pre_processing(); - virtual Interval do_width() const; + Real stem_length_f()const; + Real stem_end_f()const; + Real stem_start_f() const; + bool invisible_b()const; + + /// heads that the stem encompasses (positions) + int max_head_i() const; + int min_head_i() const; +protected: + void do_pre_processing(); + virtual Interval do_width() const; Molecule* brew_molecule_p() const; }; #endif diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc new file mode 100644 index 0000000000..2a6e1e755f --- /dev/null +++ b/lily/rest-collision.cc @@ -0,0 +1,58 @@ +/* + rest-collision.cc -- implement Rest_collision + + source file of the LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + +#include "rest-collision.hh" +#include "rest-column.hh" +#include "collision.hh" + +void +Rest_collision::add(Rest_column *rc_l) +{ + rest_l_arr_.push(rc_l); + add_dependency(rc_l); +} +void +Rest_collision::add(Collision * c_l) +{ + add_dependency(c_l); + for (int i=0; i < c_l->clash_l_arr_.size(); i ++) + ncol_l_arr_.push(c_l->clash_l_arr_[i]); +} + + +void +Rest_collision::do_post_processing() +{ + #if 0 + bool rest_b_a[4]; + rest_b_a[j] = (col_l_a[j]) ? col_l_a[j]->rest_b_ : false; + do { + int i1 = idx(d, false); + int i2 = idx(d,true); + if (!intersection(y_extent[i1] , + y_extent[i2]).empty_b()) { + if (rest_b_a[i1]) { + y_off[i1] = -y_extent[i1][-d] + y_extent[1][d] + d*4; // ugh + y_extent[i1] += y_off[i1]; + } + } + } while ((d *= -1) != 1); + + do { + int i1 = idx(d, false); + int i2 = idx(-d,false); + + if (d*(y_extent[i1][-d] - y_extent[i2][d] )< 0&& rest_b_a[i1]) { + y_off[i1] = -y_extent[i1][-d] + y_extent[i2][d] +d* 4; // ugh + y_extent[i1] += y_off[i1]; + } + } while ((d *= -1) != 1); + +#endif +} +IMPLEMENT_STATIC_NAME(Rest_collision); diff --git a/lily/rest-column.cc b/lily/rest-column.cc new file mode 100644 index 0000000000..5ab8b164da --- /dev/null +++ b/lily/rest-column.cc @@ -0,0 +1,27 @@ +/* + rest-column.cc -- implement Rest_column + + source file of the LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + +#include "rest-column.hh" +#include "notehead.hh" +#include "rest-column.hh" + +void +Rest_column::add(Notehead *n_l) +{ + add_support(n_l); + head_l_arr_.push(n_l); +} + +void +Rest_column::translate_y(Real dy_f) +{ + for (int i=0; i < head_l_arr_.size(); i++) + head_l_arr_[i]->translate(Offset(0,dy_f)); +} + +IMPLEMENT_STATIC_NAME(Rest_column); -- 2.39.5