]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.38
authorfred <fred>
Sun, 24 Mar 2002 19:33:59 +0000 (19:33 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:33:59 +0000 (19:33 +0000)
29 files changed:
NEWS
hdr/input-score.hh [new file with mode: 0644]
hdr/lookup.hh
hdr/paper-def.hh [new file with mode: 0644]
hdr/pscore.hh
hdr/score.hh
hdr/staff.hh
hdr/symbol.hh
hdr/symtable.hh
hdr/text-def.hh [new file with mode: 0644]
src/bar.cc
src/break.cc
src/calcideal.cc
src/clef-item.cc [new file with mode: 0644]
src/input-score.cc [new file with mode: 0644]
src/key-item.cc [new file with mode: 0644]
src/lookup.cc
src/meter.cc
src/notehead.cc
src/paper-def.cc [new file with mode: 0644]
src/pscore.cc
src/rest.cc
src/score.cc
src/scoreline.cc
src/scores.cc
src/staff.cc
src/staffline.cc
src/staffsym.cc
src/text-def.cc [new file with mode: 0644]

diff --git a/NEWS b/NEWS
index 6592108aece8f3a44cbaa994deec6275c1e18e01..130c3b96561aa337db163d28a7f46b53428c824f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,13 @@
+pl 38
+
+Internal
+       - great filename renaming operation with - convention.
+       - printing methods for paper_def/lookup/symtab(s)
+       - untied all registers from complexwalker. Now registers are
+intrinsically hierarchical. All walker communication is done via a
+"top level" register.
+
+******
 pl 37
 
 
@@ -5,23 +15,22 @@ Documentation
        - language.pod as starting point for mudela devel.
 
        - Jan's patches:
-(jan's pl 36-3)
-
+Features
+       - m2m patchy --no-triplet option;
+         lilypond accepts m2m's real midi output (hand-add red tape)
+       - m2m output only valid durations, resync option wip
        - m2m produces .ly output
 Internal
        - simpler and better naming for Duration*
        - the great String renaming / index to base=0 change
        - Track_column, Lily_stream
-Features
-       - m2m patchy --no-triplet option;
-         lilypond accepts m2m's real midi output (hand-add red tape)
-       - m2m output only valid durations, resync option wip
+       - Duration, Plet, Duration_convert taking load off duration calc.
 Bugfix
        - m2m duration calc
-Internal
-       - Duration, Plet, Duration_convert taking load off duration calc.
 
 
+
+******
 pl 36
        - Jan's patches:
        - do MIDI rests cleanly.
diff --git a/hdr/input-score.hh b/hdr/input-score.hh
new file mode 100644 (file)
index 0000000..4286f4b
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+  input-score.hh -- declare 
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef INPUTSCORE_HH
+#define INPUTSCORE_HH
+
+#include "varray.hh"
+#include "proto.hh"
+#include "plist.hh"
+#include "string.hh"
+
+
+/// the total music def of one movement
+struct Input_score {
+    /// defined where?    
+    const char* defined_ch_c_l_;
+    int errorlevel_i_;
+    
+    /// paper_, staffs_ and commands_ form the problem definition.
+    Paper_def *paper_p_;
+    Midi_def* midi_p_;
+    IPointerList<Input_staff*> staffs_;
+
+    Input_music * score_wide_music_p_;
+    
+    /* *************************************************************** */
+    Input_score();
+    Input_score(Input_score const&);
+
+    void add(Input_staff*);
+    ~Input_score();
+    /// construction
+    void set(Paper_def*);
+    void set(Midi_def* midi_p);
+    void print() const;
+    Score*parse();
+    void set(Input_music*);
+};
+
+#endif
index 28bd8677eac7df8026d1ffe57939d7844317f385..524cdf1958da47f06dbb23410a56e97012095af8 100644 (file)
@@ -14,7 +14,7 @@ struct Lookup {
     String texsetting;
     /* *************** */
     void add(String, Symtable*);
-
+    void print()const;
     Real internote();
 
     Symbol linestaff(int n, Real w);
diff --git a/hdr/paper-def.hh b/hdr/paper-def.hh
new file mode 100644 (file)
index 0000000..ae55725
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+  paper-def.hh -- declare 
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef Paper_def_HH
+#define Paper_def_HH
+#include "proto.hh"
+#include "real.hh"
+#include "string.hh"
+#include "moment.hh"
+
+
+/** symbols, dimensions and constants
+
+  This struct takes care of all kinds of symbols, dimensions and
+ constants. Most of them are related to the point-size of the fonts,
+ so therefore, the lookup table for symbols is also in here.
+
+ see TODO
+ */
+struct Paper_def {
+    Lookup *lookup_p_;
+    String outfile;
+
+    Real linewidth;
+
+    /// how much space does a whole note take (ideally?)
+    Real whole_width;
+
+    /// ideal = geometric_ ^ log2(duration)
+    Real geometric_;
+    
+    /* *************** */
+    void reinit();
+    Paper_def(Lookup*);
+    void set(Lookup*);
+    ~Paper_def();
+    Paper_def(Paper_def const&);
+    Real interline()const;
+    Real internote()const;
+    Real rule_thickness()const;
+    Real standard_height()const;
+    Real note_width() const;
+    void print() const;
+    Real duration_to_dist(Moment);
+};
+
+#endif // Paper_def_HH
+
index f1f8dbbc9694bc4dfe5eb82811b01d5904d081f4..b7ad49c0e12ea69eea8cd7d59386768010675196 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 struct PScore {
-    Paperdef *paper_l_;
+    Paper_def *paper_l_;
     
     /// the columns, ordered left to right
     IPointerList<PCol *> cols;
@@ -41,7 +41,7 @@ struct PScore {
     /* *************** */
     /* CONSTRUCTION */
     
-    PScore(Paperdef*);
+    PScore(Paper_def*);
     /// add a line to the broken stuff. Positions given in #config#
     void set_breaking(Array<Col_hpositions>);
 
index bab7020ccc66de659a7bfa354b229c2fb3fcc119..a865ed02f354f9022d973ec05d282593819ddcea 100644 (file)
@@ -20,7 +20,7 @@
 /// the total music def of one movement
 struct Score {
     /// paper_, staffs_ and commands_ form the problem definition.
-    Paperdef *paper_p_;
+    Paper_def *paper_p_;
     Midi_def *midi_p_;
     IPointerList<Staff*> staffs_;
     
@@ -48,7 +48,7 @@ struct Score {
     ///
     void set(Midi_def* midi_p);
     ///
-    void set(Paperdef* midi_p);
+    void set(Paper_def* midi_p);
 
     // standard
     void OK() const;
index e45398e7893bcbe4a6ba890ffa58b422c84ff2e2..959859b6e43593b083cbf47a08a4808f53541dd8 100644 (file)
@@ -35,7 +35,7 @@ public:
     void add(const PointerList<Voice*> &s);
 
     void add_voice(Voice *v);
-    Paperdef*paper()const;
+    Paper_def*paper()const;
 
     void setup_staffcols();
 
index 62de3be4960760a87138855ea0f1e65b17847810..c166fa5bcfd67576637f15c6cc8faeae7eef78e4 100644 (file)
@@ -11,6 +11,7 @@ struct Symbol {
 
     Symbol (String, Box);
     Symbol();
+    String str()const;         // for printing.
 };
 
 #endif
index 61dc38b42e68445ab10585575a84f8c2565fb8c3..f96d02c1ec2c18d3e19d63c77a537c6d0222f770 100644 (file)
@@ -9,7 +9,7 @@
 
 struct  Symtable : public Assoc<String, Symbol> {
     Symbol lookup(String)const;
-    
+    void print()const;
 };
 
 
@@ -20,6 +20,7 @@ struct Symtables : private Assoc<String, Symtable*> {
     Symtables();
     Symtables(Symtables const&);
     Assoc<String, Symtable*>::add;
+    void print()const;
 };
 
 
diff --git a/hdr/text-def.hh b/hdr/text-def.hh
new file mode 100644 (file)
index 0000000..cc9c3c9
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+  text-def.hh -- part of LilyPond
+
+  (c) 1996,97 Han-Wen Nienhuys
+*/
+
+#ifndef TEXTDEF_HH
+#define TEXTDEF_HH
+
+#include "string.hh"
+#include "proto.hh"
+
+struct Text_def  {
+    int align_i_;
+    String text_str_;
+    String style_str_;
+    char const* defined_ch_c_l_;
+  
+
+    /* ****************/
+    virtual ~Text_def() {};
+    bool compare(const Text_def&);
+    Text_def();
+    virtual void print() const;
+    virtual Atom create_atom(Paper_def*) const;
+};
+
+#endif // TEXTDEF_HH
+
index ad64e016a66db0d3c2ec1c5db20e2b1c33d52632..32a7cd5fe6aaf32605c1ea2224625e5058a84541 100644 (file)
@@ -1,11 +1,11 @@
 #include "bar.hh"
 #include "string.hh"
 #include "molecule.hh"
-#include "paperdef.hh"
+#include "paper-def.hh"
 #include "lookup.hh"
 #include "debug.hh"
 
-NAME_METHOD(Bar);
+
 
 Bar::Bar( String t)
 {
index 6128fdd097e38049b7cf9385ae72150b017845ea..7d219186372aa1ed179bea4fc310bc3e988c3c64 100644 (file)
@@ -2,7 +2,7 @@
     do calculations for breaking problem    
     */
 #include "break.hh"
-#include "paperdef.hh"
+#include "paper-def.hh"
 #include "linespace.hh"
 #include "debug.hh"
 #include "scoreline.hh"
index 1a96243426ee01cbddc793eeda8198ab729ee0fb..5ead08dd396ef25d556d1d8df92031a9bf952c28 100644 (file)
@@ -1,8 +1,8 @@
 #include "idealspacing.hh"
 #include "score.hh"
 #include "pscore.hh"
-#include "paperdef.hh"
-#include "scorecolumn.hh"
+#include "paper-def.hh"
+#include "score-column.hh"
 #include "dimen.hh"
 
 
diff --git a/src/clef-item.cc b/src/clef-item.cc
new file mode 100644 (file)
index 0000000..528623e
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+  clef-item.cc -- implement Clef_item
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "clef-item.hh"
+#include "string.hh"
+#include "molecule.hh"
+#include "paper-def.hh"
+#include "lookup.hh"
+#include "clef-reg.hh"
+
+
+
+Clef_item::Clef_item()
+{
+    change = true;
+    read("violin");
+}
+
+void
+Clef_item::read(String t)
+{
+    type = t;
+    if (type == "violin")
+       y_off = 2;
+    if (type == "alto")
+       y_off = 4;
+    if (type == "tenor")
+       y_off = 6;
+    if (type == "bass")
+       y_off = 6;
+}
+void
+Clef_item::read(Clef_register const &k)
+{
+    read(k.clef_type_str_);
+}
+
+Molecule*
+Clef_item::brew_molecule_p()const
+{
+    String t = type;
+    if  (change)
+       t += "_change";
+    Symbol s = paper()->lookup_p_->clef(t);
+    Molecule*output = new Molecule(Atom(s));
+    output->translate(Offset(0, paper()->internote() * y_off));
+    return output;
+}
+
diff --git a/src/input-score.cc b/src/input-score.cc
new file mode 100644 (file)
index 0000000..f39d47a
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+  input-score.cc -- implement Input_score
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "debug.hh"
+#include "input-score.hh"
+#include "input-staff.hh"
+#include "input-music.hh"
+#include "score.hh"
+#include "paper-def.hh"
+#include "midi-def.hh"
+#include "staff.hh"
+
+
+void
+Input_score::add(Input_staff*s)
+{
+    staffs_.bottom().add(s);
+}
+
+void
+Input_score::set(Paper_def*p)
+{
+    delete paper_p_;
+    paper_p_ = p;
+}
+
+void
+Input_score::set(Midi_def* midi_p)
+{
+    delete midi_p_;
+    midi_p_ = midi_p;
+}
+Input_score::Input_score(Input_score const&s)
+{
+    paper_p_ = (s.paper_p_)? new Paper_def(*s.paper_p_) :0;
+    midi_p_ = (s.midi_p_)? new Midi_def(*s.midi_p_) : 0;
+    defined_ch_c_l_ = s.defined_ch_c_l_;
+    errorlevel_i_ = s.errorlevel_i_;
+    score_wide_music_p_ = (s.score_wide_music_p_) ?
+       s.score_wide_music_p_->clone():0;
+}
+
+Score*
+Input_score::parse()
+{
+    Score *s_p = new Score;
+    s_p->defined_ch_c_l_= defined_ch_c_l_;
+    s_p->errorlevel_i_ = errorlevel_i_;
+    if (midi_p_)
+       s_p->set(new Midi_def(*midi_p_));
+    if (paper_p_)
+       s_p->set(    new Paper_def(*paper_p_));
+
+    for (iter_top(staffs_,i); i.ok(); i++) {
+       Staff* staf_p=i->parse(s_p, score_wide_music_p_);
+       s_p->add(staf_p);
+    }
+
+    return s_p;
+}
+
+void
+Input_score::set(Input_music *m_p)
+{
+    delete score_wide_music_p_;
+    score_wide_music_p_ =m_p;    
+}
+
+
+Input_score::~Input_score()
+{
+    delete paper_p_;
+    delete score_wide_music_p_;
+    delete midi_p_;
+}
+
+Input_score::Input_score()
+{
+    score_wide_music_p_ =0;
+    defined_ch_c_l_=0;
+    paper_p_= 0;
+    midi_p_ = 0;
+    errorlevel_i_ = 0;
+}
+
+void
+Input_score::print()const
+{
+#ifndef NPRINT
+    mtor << "Input_score {\n";
+    for (iter_top(staffs_,i); i.ok(); i++) {
+       i->print();
+    }
+    mtor << "}\n";
+#endif
+}
diff --git a/src/key-item.cc b/src/key-item.cc
new file mode 100644 (file)
index 0000000..963b1bc
--- /dev/null
@@ -0,0 +1,70 @@
+#include "key-item.hh"
+#include "key.hh"
+#include "debug.hh"
+#include "molecule.hh"
+#include "paper-def.hh"
+#include "lookup.hh"
+//#include "clef-reg.hh"
+#include "key-reg.hh"
+
+const int FLAT_TOP_PITCH=2; /* fes,ges,as and bes typeset in lower octave */
+const int SHARP_TOP_PITCH=4; /*  ais and bis typeset in lower octave */
+
+
+
+Key_item::Key_item(int c)
+{
+    set_c_position(c);
+}
+
+void
+Key_item::read(const Key_register& key_reg_r)
+{
+    const Array<int> &idx_arr =key_reg_r.accidental_idx_arr_; 
+    for (int i = 0 ; i< idx_arr.size(); i++) {
+       int note = idx_arr[i];
+       int acc = key_reg_r.key_.acc(note);
+
+       add(note, acc);
+    }
+}
+
+void 
+Key_item::set_c_position(int c0)
+{
+    int octaves =(abs(c0) / 7) +1 ;
+    c_position=(c0 + 7*octaves)%7;
+}
+
+
+void
+Key_item::add(int p, int a)
+{
+    if ((a<0 && p>FLAT_TOP_PITCH) ||
+        (a>0 && p>SHARP_TOP_PITCH)) {
+      p -= 7; /* Typeset below c_position */
+    }
+    pitch.push(p);
+    acc.push(a);
+}
+
+
+Molecule*
+Key_item::brew_molecule_p()const
+{
+    Molecule*output = new Molecule;
+    Real inter = paper()->internote();
+    
+    for (int i =0; i < pitch.size(); i++) {
+       Symbol s= paper()->lookup_p_->accidental(acc[i]);
+       Atom a(s);
+       a.translate(Offset(0,(c_position + pitch[i]) * inter));
+       Molecule m(a);
+       output->add_right(m);   
+    }
+    Molecule m(paper()->lookup_p_->fill(Box(
+       Interval(0, paper()->note_width()),
+       Interval(0,0))));
+    output->add_right(m);
+    return output;
+}
index a87454e2d15ad10c60e9fa4c06d6d9598e12bee0..ffd668e75d33e72e80f676ebd497bdb35313da24 100644 (file)
@@ -1,3 +1,11 @@
+/*
+  lookup.cc -- implement simple Lookup methods.
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
 #include "lookup.hh"
 #include "debug.hh"
 #include "symtable.hh"
@@ -27,6 +35,14 @@ Lookup::add(String s, Symtable*p)
     symtables_->add(s, p);
 }
 
+void
+Lookup::print()const
+{
+    mtor << "Lookup: " << texsetting << " {\n";
+    symtables_->print();
+    mtor << "}\n";
+}
+
 Symbol
 Lookup::text(String style, String text, int dir)
 {
@@ -42,7 +58,6 @@ Lookup::text(String style, String text, int dir)
     return s;
 }
 
-/* *************** */
 
 Real
 Lookup::internote()
index 4f06b6469ec50d48f25d9a1fe997056528009664..94f6b6c5e96ed756324998a9873d96b6945a5c09 100644 (file)
@@ -1,9 +1,9 @@
 #include "scalar.hh"
 #include "molecule.hh"
 #include "meter.hh"
-#include "paperdef.hh"
+#include "paper-def.hh"
 #include "lookup.hh"
-NAME_METHOD(Meter);
+
 Meter::Meter(Array<Scalar>a)
     :args(a)
 {
index a0c031c106699fb22084f7ddfbeaa8c5693bcd39..722b231e6837fa123c54f2a6383910cfac3401bb 100644 (file)
@@ -2,12 +2,12 @@
 #include "notehead.hh"
 #include "dimen.hh" 
 #include "debug.hh"
-#include "paperdef.hh"
+#include "paper-def.hh"
 #include "lookup.hh"
 #include "molecule.hh"
 #include "musicalrequest.hh"
 
-NAME_METHOD(Notehead);
+
 
 Notehead::Notehead(int ss)
 {
@@ -37,7 +37,7 @@ Notehead::do_print()const
 
 
 int
-Notehead::compare(Notehead*&a, Notehead*&b)
+Notehead::compare(Notehead *const  &a, Notehead * const &b)
 {
     return a->position - b->position;
 }
@@ -45,7 +45,7 @@ Notehead::compare(Notehead*&a, Notehead*&b)
 Molecule*
 Notehead::brew_molecule_p() const return out;
 {
-    Paperdef *p = paper();
+    Paper_def *p = paper();
 
     Real dy = p->internote();
     Symbol s = p->lookup_p_->ball(balltype);
diff --git a/src/paper-def.cc b/src/paper-def.cc
new file mode 100644 (file)
index 0000000..b49a53f
--- /dev/null
@@ -0,0 +1,91 @@
+#include <math.h>
+#include "misc.hh"
+#include "paper-def.hh"
+#include "debug.hh"
+#include "lookup.hh"
+#include "dimen.hh"
+
+
+
+// golden ratio
+const Real PHI = (1+sqrt(5))/2;
+
+// see  Roelofs, p. 57
+Real
+Paper_def::duration_to_dist(Moment d)
+{
+    if (!d)
+       return 0;
+    
+    return whole_width * pow(geometric_, log_2(d));
+}
+
+Real
+Paper_def::rule_thickness()const
+{
+    return 0.4 PT;
+}
+
+Paper_def::Paper_def(Lookup *l)
+{
+    lookup_p_ = l;
+    linewidth = 15 *CM_TO_PT;          // in cm for now
+    whole_width = 8 * note_width();
+    geometric_ = sqrt(2);
+    outfile = "lelie.out";
+}
+
+Paper_def::~Paper_def()
+{
+    delete lookup_p_;
+}
+Paper_def::Paper_def(Paper_def const&s)
+{
+    lookup_p_ = new Lookup(*s.lookup_p_);
+    geometric_ = s.geometric_;
+    whole_width = s.whole_width;
+    outfile = s.outfile;
+    linewidth = s.linewidth;
+}
+
+void
+Paper_def::set(Lookup*l)
+{
+    assert(l != lookup_p_);
+    delete lookup_p_;
+    lookup_p_ = l;
+}
+
+Real
+Paper_def::interline() const
+{
+    return lookup_p_->ball(4).dim.y.length();
+}
+
+Real
+Paper_def::internote() const
+{
+    return lookup_p_->internote();
+}
+Real
+Paper_def::note_width()const
+{
+    return lookup_p_->ball(4).dim.x.length( );
+}
+Real
+Paper_def::standard_height() const
+{
+    return 20 PT;
+}
+
+void
+Paper_def::print() const
+{
+#ifndef NPRINT
+    mtor << "Paper {width: " << print_dimen(linewidth);
+    mtor << "whole: " << print_dimen(whole_width);
+    mtor << "out: " <<outfile;
+    lookup_p_->print();
+    mtor << "}\n";
+#endif
+}
index cebeb86f4cd4a576a65e988c64c3d187153938ba..73e57ce6f2cb203b5348838da0c9d65e5e45fc32 100644 (file)
@@ -2,12 +2,12 @@
 #include "debug.hh"
 #include "lookup.hh"
 #include "spanner.hh"
-#include "paperdef.hh"
+#include "paper-def.hh"
 #include "molecule.hh"
 #include "dimen.hh"
 #include "scoreline.hh"
 #include "pscore.hh"
-#include "tstream.hh"
+#include "tex-stream.hh"
 #include "item.hh"
 #include "break.hh"
 
@@ -28,7 +28,7 @@ PScore::clean_cols()
 {
     for (iter_top(cols,c); c.ok(); )
        if (!c->used_b()) {
-           delete c.get();
+           delete c.get_p();
        } else
            c++;
 }
@@ -110,7 +110,7 @@ PScore::add(PCol *p)
     cols.bottom().add(p);
 }
 
-PScore::PScore( Paperdef*p)
+PScore::PScore( Paper_def*p)
 {
     paper_l_ = p;
 }
index e334d17bac332f03144588b45f5ac1bb6e3726d9..0e4394a3c6f5694fb7c5d3218e1cd2dd33e7c45c 100644 (file)
@@ -1,7 +1,7 @@
 #include "rest.hh"
 #include "dimen.hh" 
 #include "debug.hh"
-#include "paperdef.hh"
+#include "paper-def.hh"
 #include "lookup.hh"
 #include "molecule.hh"
 
@@ -11,7 +11,7 @@ Rest::Rest(int t, int d)
     balltype = t;
     dots = d;
 }
-NAME_METHOD(Rest);
+
 
 void
 Rest::do_print()const
@@ -25,7 +25,7 @@ Rest::do_print()const
 Molecule*
 Rest::brew_molecule_p()const
 {
-    Paperdef *p =paper();
+    Paper_def *p =paper();
 
     Symbol s;
     s = p->lookup_p_->rest(balltype);
index 4d8ac6329699020e557eaed645594e7bf62d55f6..0dd16ecbf729cb28f82a248b6d91e3141f245899 100644 (file)
@@ -5,19 +5,19 @@
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
-#include "tstream.hh"
+#include "tex-stream.hh"
 #include "score.hh"
-#include "scorecolumn.hh"
+#include "score-column.hh"
 #include "pscore.hh"
 #include "staff.hh"
 #include "debug.hh"
-#include "paperdef.hh"
+#include "paper-def.hh"
 #include "main.hh"
 #include "source.hh"
-#include "sourcefile.hh"
-#include "scorewalker.hh"
-#include "midioutput.hh"
-#include "mididef.hh"
+#include "source-file.hh"
+#include "score-walker.hh"
+#include "midi-output.hh"
+#include "midi-def.hh"
 
 extern String default_out_fn;
 
@@ -96,7 +96,7 @@ Score::clean_cols()
 
     for (iter_top(cols_,c); c.ok(); ) {
        if (!c->pcol_l_->used_b()) {
-           delete c.get();
+           delete c.get_p();
        } else {
            c->preprocess();
            c++;
@@ -178,7 +178,7 @@ Score::last() const
 }
 
 void
-Score::set(Paperdef *pap_p)
+Score::set(Paper_def *pap_p)
 {
     delete paper_p_;
     paper_p_ = pap_p;
index 505d7e79cf034c218731d5244c76aecc9b0f7380..2f8f0f3a4b398b81ad093aa3226650e8700134fc 100644 (file)
@@ -3,7 +3,7 @@
 #include "dimen.hh"
 #include "spanner.hh"
 #include "symbol.hh"
-#include "paperdef.hh"
+#include "paper-def.hh"
 #include "pcol.hh"
 #include "pscore.hh"
 
index b4019fd141bf99d6c62ad236ca4db086cc1dae8d..a6df7ead96730c30376bb83a255abe3b11f17daf 100644 (file)
@@ -1,8 +1,8 @@
 #include "main.hh"
-#include "inputscore.hh"
+#include "input-score.hh"
 #include "score.hh"
 #include "string.hh"
-#include "paperdef.hh"
+#include "paper-def.hh"
 #include "debug.hh"
 
 static Array<Input_score*> score_array_global;
index d5c08487abeea758e8bc8753377eff337df3e92c..4f72617f5e2bd8badb53ee49793e27e6548d126f 100644 (file)
@@ -1,14 +1,14 @@
 #include "staff.hh"
 #include "score.hh"
 #include "voice.hh"
-#include "staffwalker.hh"
-#include "staffcolumn.hh"
-#include "scorecolumn.hh"
-
+#include "staff-walker.hh"
+#include "staff-column.hh"
+#include "score-column.hh"
+#include "voice-element.hh"
 #include "debug.hh"
 #include "musicalrequest.hh"
 #include "commandrequest.hh" // todo
-#include "midistream.hh"
+#include "midi-stream.hh"
 
 void
 Staff::add(PointerList<Voice*> const &l)
@@ -17,7 +17,7 @@ Staff::add(PointerList<Voice*> const &l)
        voice_list_.bottom().add(i);
 }
 
-Paperdef *
+Paper_def *
 Staff::paper() const
 {
     return score_l_->paper_p_;
@@ -34,7 +34,7 @@ Staff::clean_cols()
            i->command_column_l_ =0;
        
        if (!i->command_column_l_&& !i->musical_column_l_)
-           delete i.get();
+           delete i.get_p();
        else
            i++;
     }
index 7b79f09212adfd93a9e18166c8977288a17b9b16..5d18b219e6c708e9e81edf20443cae0940a7f8f9 100644 (file)
@@ -3,7 +3,7 @@
 #include "dimen.hh"
 #include "spanner.hh"
 #include "symbol.hh"
-#include "paperdef.hh"
+#include "paper-def.hh"
 #include "molecule.hh"
 #include "pcol.hh"
 #include "pscore.hh"
index 49f559f2e8424f8f640858c5f7e23bd9c5a88414..631a5f3673e5c004733b6de54541ddde8c23b927 100644 (file)
@@ -7,10 +7,10 @@
 */
 #include "staffsym.hh"
 #include "lookup.hh"
-#include "paperdef.hh"
+#include "paper-def.hh"
 #include "debug.hh"
 
-NAME_METHOD(Staff_symbol);
+
 
 Staff_symbol::Staff_symbol(int l)
 {
diff --git a/src/text-def.cc b/src/text-def.cc
new file mode 100644 (file)
index 0000000..d67622e
--- /dev/null
@@ -0,0 +1,31 @@
+#include "debug.hh"
+#include "lookup.hh"
+#include "paper-def.hh"
+#include "molecule.hh"
+#include "text-def.hh"
+
+Text_def::Text_def()
+{   
+    align_i_ = 1;                      // right
+    style_str_ = "roman";
+    defined_ch_c_l_ = 0;
+}
+bool
+Text_def::compare(const Text_def&def)
+{
+    return align_i_ == def.align_i_ && text_str_ == def.text_str_
+       && style_str_ == def.style_str_;
+}
+
+Atom
+Text_def::create_atom(Paper_def*p) const
+{
+    return p->lookup_p_->text(style_str_, text_str_, -align_i_);
+}
+
+void
+Text_def::print() const
+{
+    mtor << "Text `" << text_str_ << "\', style " <<
+       style_str_ << "align " << align_i_ << '\n';
+}