]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.65
authorfred <fred>
Sun, 24 Mar 2002 19:44:26 +0000 (19:44 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:44:26 +0000 (19:44 +0000)
Documentation/lilygut.pod
lily/include/local-key-item.hh
lily/include/rest-column.hh
lily/local-key-item.cc

index 9bd3013c126428346217054cf333ae643cc45224..3278492c6b49d576ddd1b2abc5e058f2b1f72312 100644 (file)
@@ -62,11 +62,12 @@ natural form for processing music.
 =item Processing:
 
 Requests are processed and used to create elements (like balls, stems,
-slurs etc). This is done by a hierarchy of brokers, which swallow
-requests, broadcast them and couple different elements.
+slurs etc). This is done by a hierarchy of "brokers" (called
+Register), which swallow requests, broadcast them and couple different
+elements.
 
 In this step data-structures for the next steps are created and filled
-with data: PScore, PCol, PStaff
+with data: PScore, PCol.
 
 =item Preprocessing
 
@@ -75,8 +76,15 @@ Some dependencies are resolved, such as the direction of stems, beams,
 =item Calculation:
 
 This step uses structures which have names starting with 'P'.
-linebreaks and horizontal positions of PCols are determined. Line_of_*
-generated.
+linebreaks and horizontal positions of PCols are determined. 
+
+Through some magical interactions with Line_of_score and Super_elem
+(check out the source) the "lines" are produced. 
+
+All other spanners can figure across which lines they are spread. If
+applicable, they break themselves into pieces. After this, each piece
+works (or, if there are no pieces) the spanner throws out any
+dependencies which are in the wrong line.
 
 =item Postprocesing:
 
@@ -321,9 +329,9 @@ In music symbols depend on each other: the stems of a beam should
 point in the same direction as the beam itself, so the stems of a beam
 depend on the beam. In the same way do scripts depend on the direction
 of the stem. To reflect this, LilyPond has the notion of dependency. 
-It works in the same fashion that make uses to build programs: before
+It works in the same fashion that C<make> uses to build programs: before
 a stem is calculated, its dependencies (the beam) should be
-calculated. Before a slur is calculated, its dependencies (stems)
+calculated. Before a slur is calculated, its dependencies (stems, noteheads)
 should be calculated.
 
 =head1 BREAKING
index 2371277bb0fd9ff3300f6bb546c3f29c890d54f6..24f48e3115ccc3957e9f6646df219f2447d9fc50 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  local-key-item.hh -- part of LilyPond
+  local-key-item.hh -- part of GNU LilyPond
 
   (c) 1996,97 Han-Wen Nienhuys
 */
@@ -18,11 +18,14 @@ struct Local_acc {
 
 /**
   Accidentals which can be different for each octave.
+
+  TODO:
+  update item if Items are removed
  */
 struct Local_key_item : Item {
     NAME_MEMBERS(Local_key_item);
     Array<Local_acc> accs;
-    Array<Item*> support_items_;
+    Link_array<Item> support_items_;
     int c0_position;
 
     /* *************** */
@@ -31,8 +34,10 @@ struct Local_key_item : Item {
     void add(Item*);
     void add(int oct, int pitch, int acc);
     void add(Melodic_req*);
-    void do_pre_processing();    
-    Molecule* brew_molecule_p()const;
+public:
+    virtual void do_pre_processing();    
+    virtual void do_substitute_dependency(Score_elem*,Score_elem*);
+    virtual Molecule* brew_molecule_p()const;
 };
 #endif // LOCALKEYITEM_HH
 
index a753c61d937315affa61e9b3d4f519b32ff91e5c..803e00a294035a4d3b30b0db72298f47da2c4794 100644 (file)
@@ -1,7 +1,7 @@
 /*
   rest-column.hh -- declare Rest_column
 
-  source file of the LilyPond music typesetter
+  source file of the GNU LilyPond music typesetter
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
   only produce one rest.
   */
 class Rest_column : public Script_column {
-    Array<Notehead*> head_l_arr_;
+    Link_array<Note_head> head_l_arr_;
 public:
     int dir_i_;
-    void add(Notehead *);
+    void add(Note_head *);
     NAME_MEMBERS(Rest_column);
     void translate_y(Real dy);
     Rest_column();
+protected:
+    virtual void do_substitute_dependency(Score_elem*, Score_elem*);
 };
 
 #endif // REST_COLUMN_HH
index f6d8b9ba7f6a8101b2aa78288c74b1a93888547f..50aba0bf41c127ff8e21e424283ff0841e10b470 100644 (file)
@@ -1,7 +1,7 @@
 /*
   local-key-item.cc -- implement Local_key_item, Local_acc
 
-  source file of the LilyPond music typesetter
+  source file of the GNU LilyPond music typesetter
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
@@ -12,7 +12,7 @@
 #include "lookup.hh"
 #include "paper-def.hh"
 #include "musical-request.hh"
-#include "notehead.hh"
+#include "note-head.hh"
 #include "misc.hh"
 
 
@@ -65,7 +65,7 @@ Local_key_item::brew_molecule_p()const
        // do one octave
        if (accs[i].octave_i_ != lastoct) {
            if (octmol){
-               Real dy =lastoct*7*paper()->internote();
+               Real dy =lastoct*7*paper()->internote_f();
                octmol->translate(Offset(0, dy));
                output->add(*octmol);
                delete octmol;
@@ -75,14 +75,14 @@ Local_key_item::brew_molecule_p()const
        lastoct = accs[i].octave_i_;
        Symbol s =paper()->lookup_l()->accidental(accs[i].accidental_i_);   
        Atom a(s);
-       Real dy = (accs[i].name_i_ + c0_position) * paper()->internote();
+       Real dy = (accs[i].name_i_ + c0_position) * paper()->internote_f();
        a.translate(Offset(0,dy));
 
        octmol->add_right(a);
     }
 
     if (octmol){
-       Real dy =lastoct*7*paper()->internote();
+       Real dy =lastoct*7*paper()->internote_f();
        octmol->translate(Offset(0, dy));
        output->add(*octmol);
        delete octmol;
@@ -105,3 +105,12 @@ Local_acc::compare(Local_acc&a, Local_acc&b)
     return a.accidental_i_ - b.accidental_i_;
 };
 IMPLEMENT_STATIC_NAME(Local_key_item);
+
+void
+Local_key_item::do_substitute_dependency(Score_elem*o,Score_elem*n)
+{
+    Item* o_l = o->item();
+    Item* n_l = n?n->item():0;
+
+    support_items_.substitute(o_l, n_l);
+}