=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
=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:
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
/*
- local-key-item.hh -- part of LilyPond
+ local-key-item.hh -- part of GNU LilyPond
(c) 1996,97 Han-Wen Nienhuys
*/
/**
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;
/* *************** */
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
/*
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
/*
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>
*/
#include "lookup.hh"
#include "paper-def.hh"
#include "musical-request.hh"
-#include "notehead.hh"
+#include "note-head.hh"
#include "misc.hh"
// 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;
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;
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);
+}