]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.8
authorfred <fred>
Sun, 24 Mar 2002 19:53:58 +0000 (19:53 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:53:58 +0000 (19:53 +0000)
Documentation/mudela-man.doc
lily/VERSION
lily/collision.cc
lily/include/rest-collision-grav.hh
lily/include/rest-collision.hh
lily/rest-collision-grav.cc
lily/rest-collision.cc
make/lilypond.lsm
make/lilypond.spec

index a4cb803430e493cfe63604425691312e113c79de..7c28d71e341eb9be39168b14f3746a5777c9d36f 100644 (file)
@@ -123,9 +123,15 @@ When assigning identifiers you use
 
 \begin{verbatim}
 string = ...
-\oldidentifier = ..
 \end{verbatim}
 
+If you reuse identifiers, then the previous contents will be thrown
+away after the right hand is evaluated, eg
+\begin{verbatim}
+bla = \melodic { \bla }
+\end{verbatim}
+is legal
+
 When using identifiers they have to be escaped:
 
 \begin{verbatim}
index c04453cdaa59eb20b92f1fb6684db8da8a604e2f..d87385f58721cfef70a17ef7c2138703479fc7dd 100644 (file)
@@ -1,6 +1,6 @@
 MAJOR_VERSION = 0
 MINOR_VERSION = 1
-PATCH_LEVEL = 7
+PATCH_LEVEL = 8
 # use to send patches, always empty for released version:
 # include separator: ".postfix", "-pl" makes rpm barf
 
index 0af68c462e2e3efc6fe9ca1a61cd264d31997416..798c74be456131b13f0ccce229078b192759d6d2 100644 (file)
 
 Collision::Collision()
 {
-    empty_b_ = transparent_b_ =true;
 }
 
 void
-Collision::add(Note_column* ncol_l)
+Collision::add (Note_column* ncol_l)
 {
-    clash_l_arr_.push(ncol_l);
-    add_element( ncol_l );
-    add_dependency(ncol_l);
+    clash_l_arr_.push (ncol_l);
+    add_element (ncol_l);
+    add_dependency (ncol_l);
 }
 /**
   should derive of Array.
  */
 static 
-int idx(int dir, bool h_shift_b)
+int idx (int dir, bool h_shift_b)
 {
-    assert(abs (dir) == 1);
+    assert (abs (dir) == 1);
     int j = dir > 0 ? 0 : 3;
-    if ( h_shift_b 
+    if ( h_shift_b) 
        j += dir;
     return j;
 }
@@ -63,21 +62,21 @@ Collision::do_pre_processing()
        }
        int d = (c_l->dir_i_);
        
-       clash_group_arr_a[idx(d, c_l->h_shift_b_)].push(c_l);
+       clash_group_arr_a[idx (d, c_l->h_shift_b_)].push (c_l);
     }
     
     
     for (int j=0; j < 4; j++) {
        if (clash_group_arr_a[j].size() > 1) {
-           warning("Too many clashing notecolumns. Ignoring them.");
+           warning ("Too many clashing notecolumns. Ignoring them.");
            return;
        }
     }
     int d = 1;
     do {
-       if (!clash_group_arr_a[idx(d, false)].size()){
-           clash_group_arr_a[idx(d,  false)] = clash_group_arr_a[idx(d, true)];
-           clash_group_arr_a[idx(d, true)].clear();
+       if (!clash_group_arr_a[idx (d, false)].size()){
+           clash_group_arr_a[idx (d,  false)] = clash_group_arr_a[idx (d, true)];
+           clash_group_arr_a[idx (d, true)].clear();
        }
     } while ((d *= -1) != 1);
                                  
@@ -103,44 +102,44 @@ Collision::do_pre_processing()
     }
     
     do {
-       x_off[idx(d, true)] = d*0.5;
+       x_off[idx (d, true)] = d*0.5;
     } while ((d *= -1) != 1);
 
   
     // y_extent: smallest y-pos noteball interval containing all balls
     // 4 (0..3) groups: stem up/down; shift on/off; 
-    Interval_t<int> middle( y_extent[idx(-1,0)].max(),
-                           y_extent[idx(1,0)].min() );
-    Interval_t<int> open_middle( y_extent[idx(-1,0)].max()+1, y_extent[idx(1,0)].min()-1);
+    Interval_t<int> middle (y_extent[idx (-1,0)].max(),
+                           y_extent[idx (1,0)].min());
+    Interval_t<int> open_middle (y_extent[idx (-1,0)].max()+1, y_extent[idx (1,0)].min ()-1);
     do{
-       if (!open_middle.contains_b(y_extent[idx(d,true)]))
-           x_off[idx(d, true)] = d *1.0 ;
+       if (!open_middle.contains_b (y_extent[idx (d,true)]))
+           x_off[idx (d, true)] = d *1.0 ;
     } while ((d *= -1) != 1);
    
     if (!middle.empty_b() 
-       && middle.length() < 2 && col_l_a[idx(1,0)] && col_l_a[idx(-1,0)]) {    
+       && middle.length() < 2 && col_l_a[idx (1,0)] && col_l_a[idx (-1,0)]) {  
 // reproduction of bugfix at 3am ?
-       Note_head * nu_l= col_l_a[idx(1,0)]->head_l_arr_[0];
-       Note_head * nd_l = col_l_a[idx(-1,0)]->head_l_arr_.top();
+       Note_head * nu_l= col_l_a[idx (1,0)]->head_l_arr_[0];
+       Note_head * nd_l = col_l_a[idx (-1,0)]->head_l_arr_.top();
        if (! (nu_l->balltype_i_ == nd_l->balltype_i_ 
-              && nu_l->dots_i_ == nd_l->dots_i_  && middle.length() == 0 )) {
-           x_off[idx(1,0)] -= 0.5;
-           x_off[idx(1,1)] -= 0.5;
-           x_off[idx(-1,1)] += 0.5;
-           x_off[idx(-1,0)] += 0.5;
+              && nu_l->dots_i_ == nd_l->dots_i_  && middle.length() == 0)) {
+           x_off[idx (1,0)] -= 0.5;
+           x_off[idx (1,1)] -= 0.5;
+           x_off[idx (-1,1)] += 0.5;
+           x_off[idx (-1,0)] += 0.5;
        }
        
     }    
-    Real inter_f = paper()->internote_f();
-    Real wid_f = paper()->note_width();
+    Real inter_f = paper()->internote_f ();
+    Real wid_f = paper()->note_width ();
     for (int j=0; j < 4; j++) {
        if (col_l_a[j]) {
            /* collision.cc:138: request for method `translate' is ambiguous 
               
               (shaddup)
             */
-           Offset o(x_off[j] * wid_f, y_off[j] * inter_f);
-           ((Score_elem*)col_l_a[j])->translate(o);
+           Offset o (x_off[j] * wid_f, y_off[j] * inter_f);
+           ((Score_elem*)col_l_a[j])->translate (o);
        }
     }
 }
@@ -149,8 +148,8 @@ Collision::do_pre_processing()
 IMPLEMENT_IS_TYPE_B1(Collision, Item);
 
 void
-Collision::do_substitute_dependency(Score_elem*o_l,Score_elem*n_l)
+Collision::do_substitute_dependency (Score_elem*o_l,Score_elem*n_l)
 {
-    clash_l_arr_.substitute((Note_column*)o_l->item(), 
+    clash_l_arr_.substitute ((Note_column*)o_l->item(), 
                            (Note_column*)(n_l?n_l->item():0));
 }
index 7a9eea404265229d6b1a4a09d431aece96d81376..e5ea98432496e9cbf022832f9f2a2c189beca5a9 100644 (file)
 
 class Rest_collision_engraver : public Engraver {
     Rest_collision* rest_collision_p_;
-    Array< Collision *> collision_l_arr_;
+
+    void make_collision();
 protected:
-    virtual void acknowledge_element(Score_elem_info);
+    virtual void acknowledge_element (Score_elem_info);
     virtual void do_print() const;
     virtual void do_pre_move_processing();
 public:
index 56589fe14fe1fd94749feac969ccebbea0535793..84fe927e5bec6d2c9c92bff11d3265c0e846dc84 100644 (file)
@@ -17,15 +17,14 @@ class Rest_collision : public Item {
     Link_array<Rest_column> rest_l_arr_;
     Link_array<Note_column> ncol_l_arr_;
 public:
-    void add(Note_column*);
-    void add(Rest_column*);
-    void add(Collision*);
+    void add (Note_column*);
+    void add (Rest_column*);
     DECLARE_MY_RUNTIME_TYPEINFO;
     Rest_collision();
 protected:
     virtual void do_post_processing();
     virtual void do_pre_processing();
     virtual void do_print() const;
-    virtual void do_substitute_dependency(Score_elem*,Score_elem*);
+    virtual void do_substitute_dependency (Score_elem*,Score_elem*);
 };
 #endif // REST_COLLISION_HH
index bf18c12e1ad3a2c5f344c1060b4aad33e711cc4e..7f3dc025072fb0034f2872a15e3611b92cf3b6c8 100644 (file)
@@ -23,24 +23,24 @@ Rest_collision_engraver::Rest_collision_engraver()
 }
 
 void
-Rest_collision_engraver::acknowledge_element(Score_elem_info i)
+Rest_collision_engraver::make_collision()
 {
-    char const * nC = i.elem_l_->name();
-    if (nC == Collision::static_name()) {
-       collision_l_arr_.push((Collision*)i.elem_l_->item());
-    } 
-    else if (nC == Note_column::static_name()) {
-       // what should i do, what should _engraver do?
-       if (!rest_collision_p_) {
+    if (!rest_collision_p_) {
            rest_collision_p_ = new Rest_collision;
-           announce_element(Score_elem_info(rest_collision_p_, 0));
-       }
-       rest_collision_p_->add((Note_column*)i.elem_l_->item());
+           announce_element (Score_elem_info (rest_collision_p_, 0));
     }
-    else if (nC == Rest_column::static_name()) {
-       if (!rest_collision_p_)
-           rest_collision_p_ = new Rest_collision;
-       rest_collision_p_->add((Rest_column*)i.elem_l_->item());
+}
+void
+Rest_collision_engraver::acknowledge_element (Score_elem_info i)
+{
+    char const * nC = i.elem_l_->name();
+    if (nC == Note_column::static_name()) {
+       // what should i do, what should _engraver do?
+       make_collision();
+       rest_collision_p_->add ((Note_column*)i.elem_l_->item());
+    } else if (nC == Rest_column::static_name()) {
+       make_collision();
+       rest_collision_p_->add ((Rest_column*)i.elem_l_->item());
     }
 }
 
@@ -48,7 +48,7 @@ void
 Rest_collision_engraver::do_pre_move_processing()
 {
     if (rest_collision_p_) {
-       typeset_element(rest_collision_p_);
+       typeset_element (rest_collision_p_);
        rest_collision_p_ = 0;
     }
 }
@@ -57,7 +57,7 @@ void
 Rest_collision_engraver::do_print() const
 {
 #ifndef NPRINT
-    if ( rest_collision_p_ )
+    if ( rest_collision_p_)
        rest_collision_p_->print();
 #endif
 }
index 7b3da49d41f6ed2eb4c85a42a5a48c9ff7875ef8..10fb35ec70d05a4fdf020eaeeac0ee6d87360369 100644 (file)
 IMPLEMENT_IS_TYPE_B1(Rest_collision,Item);
 
 void
-Rest_collision::add(Note_column *nc_l)
+Rest_collision::add (Note_column *nc_l)
 {
-    add_dependency(nc_l);
-    ncol_l_arr_.push(nc_l);
+    add_dependency (nc_l);
+    ncol_l_arr_.push (nc_l);
 }
 
 void
-Rest_collision::add(Rest_column *rc_l)
+Rest_collision::add (Rest_column *rc_l)
 {
-    add_dependency(rc_l);
-    rest_l_arr_.push(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]);
+    add_dependency (rc_l);
+    rest_l_arr_.push (rc_l);
 }
 
 void
@@ -74,7 +66,7 @@ Rest_collision::do_post_processing()
 #else // nogo: stem_start not set for rests?
     int pos = (stem_l->stem_start_f() - midpos) + dir_i * 2;
 #endif
-    rest_l_arr_[0]->translate_heads(pos);      
+    rest_l_arr_[0]->translate_heads (pos);     
 }
 
 void
@@ -92,23 +84,23 @@ Rest_collision::do_pre_processing()
        return;
 
     // no partners to collide with
-    if (rest_l_arr_.size() + ncol_l_arr_.size() < 2 )
+    if (rest_l_arr_.size() + ncol_l_arr_.size () < 2)
        return;
 
     // meisjes met meisjes
     if (!ncol_l_arr_.size()) {
        int dy = rest_l_arr_.size() > 2 ? 6 : 4;
        
-       rest_l_arr_[0]->translate_heads(rest_l_arr_[0]->dir_i_ *dy);    
+       rest_l_arr_[0]->translate_heads (rest_l_arr_[0]->dir_i_ *dy);   
        // top is last element...
-       rest_l_arr_.top()->translate_heads(rest_l_arr_.top()->dir_i_* dy);      
+       rest_l_arr_.top()->translate_heads (rest_l_arr_.top ()->dir_i_* dy);    
     }
     // meisjes met jongetjes
     else {
 #if 0 // breendet: rests go always under
        // geen gemug, trug op je rug
        int dir_i = -1;
-       rest_l_arr_[0]->translate_heads(dir_i * 3 );    
+       rest_l_arr_[0]->translate_heads (dir_i * 3);    
 #else
        // int dir_i = - ncol_l_arr_[0]->dir_i_;
        int dir_i = rest_l_arr_[0]->dir_i_;
@@ -126,11 +118,11 @@ Rest_collision::do_pre_processing()
        for (int i = 0; i < ncol_l_arr_.size(); i++) {
            // how to know whether to sort?
            ncol_l_arr_[i]->sort();
-           for ( int j = 0; j < ncol_l_arr_[i]->head_l_arr_.size(); j++ )
+           for ( int j = 0; j < ncol_l_arr_[i]->head_l_arr_.size(); j++)
                minpos = minpos >? dir_i * 
-                   (ncol_l_arr_[i]->head_l_arr_[j]->position_i_ -midpos ) + sep_i;
+                   (ncol_l_arr_[i]->head_l_arr_[j]->position_i_ -midpos) + sep_i;
        }
-       rest_l_arr_[0]->translate_heads(dir_i * minpos );       
+       rest_l_arr_[0]->translate_heads (dir_i * minpos);       
 #endif
     }
 }
@@ -139,19 +131,19 @@ void
 Rest_collision::do_print() const
 {
 #ifndef NPRINT
-    mtor << "rests: " << rest_l_arr_.size() << ", ";
-    mtor << "cols: " << ncol_l_arr_.size();
+    DOUT << "rests: " << rest_l_arr_.size() << ", ";
+    DOUT << "cols: " << ncol_l_arr_.size();
 #endif
 }
 
 void
-Rest_collision::do_substitute_dependency(Score_elem*o,Score_elem*n)
+Rest_collision::do_substitute_dependency (Score_elem*o,Score_elem*n)
 {
     Item*o_l = o->item();
     Item*n_l = n?n->item():0;
     
-    rest_l_arr_.substitute((Rest_column*)o_l,(Rest_column*)n_l);
-    ncol_l_arr_.substitute((Note_column*)o_l,(Note_column*)n_l);
+    rest_l_arr_.substitute ((Rest_column*)o_l,(Rest_column*)n_l);
+    ncol_l_arr_.substitute ((Note_column*)o_l,(Note_column*)n_l);
 }
 
 Rest_collision::Rest_collision()
index 72d3c71938502fe02e8ce6b6d1b4dc01452693de..aa1d9c0ee0d7bcb39c88ee7df21ebc8762372752 100644 (file)
@@ -1,7 +1,7 @@
 Begin3
 Title: LilyPond
-Version: 0.1.7
-Entered-date: 14AUG97
+Version: 0.1.8
+Entered-date: 15AUG97
 Description:   GNU LilyPond is a program which converts music
                definition files into visual or auditive output: it can
                typeset formatted sheet music to a TeX file and and
@@ -14,8 +14,8 @@ Author: hanwen@stack.nl (Han-Wen Nienhuys)
        jan@digicash.com (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps
-       340k lilypond-0.1.7.tar.gz 
+       340k lilypond-0.1.8.tar.gz 
 Original-site: pcnov095.win.tue.nl /pub/lilypond/
-       340k lilypond-0.1.7.tar.gz 
+       340k lilypond-0.1.8.tar.gz 
 Copying-policy: GPL
 End
index 93d06809d7fadc4e9c646ecb5ddbedacd9bf31ca..d4b78128146c6741cbef57e8de92cdd7f66fcac2 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 0.1.7
+Version: 0.1.8
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.7.tar.gz
+Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.8.tar.gz
 Summary: A preprocessor to make TeX typeset music.
 URL: http://www.stack.nl/~hanwen/lilypond
 Packager: Han-Wen Nienhuys <hanwen@stack.nl>
@@ -28,7 +28,7 @@ strip lily/out/lilypond mi2mu/out/mi2mu
 make prefix="$RPM_BUILD_ROOT/usr" install
 %files
 %doc Documentation/out/AUTHORS.text Documentation/out/CodingStyle.text Documentation/out/INSTALL.text Documentation/out/MANIFESTO.text Documentation/out/convert-mudela.text Documentation/out/faq.text Documentation/out/gnu-music.text Documentation/out/index.text Documentation/out/internals.text Documentation/out/language.text Documentation/out/lilypond.text Documentation/out/links.text Documentation/out/literature.text Documentation/out/mi2mu.text Documentation/out/mudela-book.text Documentation/out/mutopia.text Documentation/out/other-packages.text BUGS TODO NEWS DEDICATION ANNOUNCE README 
-%doc input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/gallina.ly input/header.ly input/keys.ly input/kortjakje.ly input/multi.ly input/pedal.ly input/rhythm.ly input/scales.ly input/scripts.ly input/scsii-menuetto.ly input/scsii-menuetto.tex input/slurs.ly input/standchen.ly input/standchen.tex input/toccata-fuga-E.ly input/twinkle-pop.ly input/twinkle.ly input/wohltemperirt.ly Documentation/mudela-course.doc Documentation/mudela-man.doc 
+%doc input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/gallina.ly input/header.ly input/keys.ly input/kortjakje.ly input/multi.ly input/pedal.ly input/rhythm.ly input/s.ly input/scales.ly input/scripts.ly input/scsii-menuetto.ly input/scsii-menuetto.tex input/slurs.ly input/standchen.ly input/standchen.tex input/toccata-fuga-E.ly input/twinkle-pop.ly input/twinkle.ly input/wohltemperirt.ly Documentation/mudela-course.doc Documentation/mudela-man.doc 
 %doc Documentation/lelie_logo.gif
 /usr/bin/convert-mudela
 /usr/bin/mudela-book