From 1971b47bf5b149f99696acb72f905057929279ae Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:33:59 +0000 Subject: [PATCH] lilypond-0.0.38 --- NEWS | 25 +++++++---- hdr/input-score.hh | 46 ++++++++++++++++++++ hdr/lookup.hh | 2 +- hdr/paper-def.hh | 54 ++++++++++++++++++++++++ hdr/pscore.hh | 4 +- hdr/score.hh | 4 +- hdr/staff.hh | 2 +- hdr/symbol.hh | 1 + hdr/symtable.hh | 3 +- hdr/text-def.hh | 29 +++++++++++++ src/bar.cc | 4 +- src/break.cc | 2 +- src/calcideal.cc | 4 +- src/clef-item.cc | 54 ++++++++++++++++++++++++ src/input-score.cc | 102 +++++++++++++++++++++++++++++++++++++++++++++ src/key-item.cc | 70 +++++++++++++++++++++++++++++++ src/lookup.cc | 17 +++++++- src/meter.cc | 4 +- src/notehead.cc | 8 ++-- src/paper-def.cc | 91 ++++++++++++++++++++++++++++++++++++++++ src/pscore.cc | 8 ++-- src/rest.cc | 6 +-- src/score.cc | 18 ++++---- src/scoreline.cc | 2 +- src/scores.cc | 4 +- src/staff.cc | 14 +++---- src/staffline.cc | 2 +- src/staffsym.cc | 4 +- src/text-def.cc | 31 ++++++++++++++ 29 files changed, 559 insertions(+), 56 deletions(-) create mode 100644 hdr/input-score.hh create mode 100644 hdr/paper-def.hh create mode 100644 hdr/text-def.hh create mode 100644 src/clef-item.cc create mode 100644 src/input-score.cc create mode 100644 src/key-item.cc create mode 100644 src/paper-def.cc create mode 100644 src/text-def.cc diff --git a/NEWS b/NEWS index 6592108aec..130c3b9656 100644 --- 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 index 0000000000..4286f4b60b --- /dev/null +++ b/hdr/input-score.hh @@ -0,0 +1,46 @@ +/* + input-score.hh -- declare + + source file of the LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + + +#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 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 diff --git a/hdr/lookup.hh b/hdr/lookup.hh index 28bd8677ea..524cdf1958 100644 --- a/hdr/lookup.hh +++ b/hdr/lookup.hh @@ -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 index 0000000000..ae557258b0 --- /dev/null +++ b/hdr/paper-def.hh @@ -0,0 +1,54 @@ +/* + paper-def.hh -- declare + + source file of the LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + + +#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 + diff --git a/hdr/pscore.hh b/hdr/pscore.hh index f1f8dbbc96..b7ad49c0e1 100644 --- a/hdr/pscore.hh +++ b/hdr/pscore.hh @@ -15,7 +15,7 @@ */ struct PScore { - Paperdef *paper_l_; + Paper_def *paper_l_; /// the columns, ordered left to right IPointerList 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); diff --git a/hdr/score.hh b/hdr/score.hh index bab7020ccc..a865ed02f3 100644 --- a/hdr/score.hh +++ b/hdr/score.hh @@ -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 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; diff --git a/hdr/staff.hh b/hdr/staff.hh index e45398e789..959859b6e4 100644 --- a/hdr/staff.hh +++ b/hdr/staff.hh @@ -35,7 +35,7 @@ public: void add(const PointerList &s); void add_voice(Voice *v); - Paperdef*paper()const; + Paper_def*paper()const; void setup_staffcols(); diff --git a/hdr/symbol.hh b/hdr/symbol.hh index 62de3be496..c166fa5bcf 100644 --- a/hdr/symbol.hh +++ b/hdr/symbol.hh @@ -11,6 +11,7 @@ struct Symbol { Symbol (String, Box); Symbol(); + String str()const; // for printing. }; #endif diff --git a/hdr/symtable.hh b/hdr/symtable.hh index 61dc38b42e..f96d02c1ec 100644 --- a/hdr/symtable.hh +++ b/hdr/symtable.hh @@ -9,7 +9,7 @@ struct Symtable : public Assoc { Symbol lookup(String)const; - + void print()const; }; @@ -20,6 +20,7 @@ struct Symtables : private Assoc { Symtables(); Symtables(Symtables const&); Assoc::add; + void print()const; }; diff --git a/hdr/text-def.hh b/hdr/text-def.hh new file mode 100644 index 0000000000..cc9c3c95b3 --- /dev/null +++ b/hdr/text-def.hh @@ -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 + diff --git a/src/bar.cc b/src/bar.cc index ad64e016a6..32a7cd5fe6 100644 --- a/src/bar.cc +++ b/src/bar.cc @@ -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) { diff --git a/src/break.cc b/src/break.cc index 6128fdd097..7d21918637 100644 --- a/src/break.cc +++ b/src/break.cc @@ -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" diff --git a/src/calcideal.cc b/src/calcideal.cc index 1a96243426..5ead08dd39 100644 --- a/src/calcideal.cc +++ b/src/calcideal.cc @@ -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 index 0000000000..528623eed6 --- /dev/null +++ b/src/clef-item.cc @@ -0,0 +1,54 @@ +/* + clef-item.cc -- implement Clef_item + + source file of the LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + +#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 index 0000000000..f39d47a4b1 --- /dev/null +++ b/src/input-score.cc @@ -0,0 +1,102 @@ +/* + input-score.cc -- implement Input_score + + source file of the LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + +#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 index 0000000000..963b1bc578 --- /dev/null +++ b/src/key-item.cc @@ -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 &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; +} diff --git a/src/lookup.cc b/src/lookup.cc index a87454e2d1..ffd668e75d 100644 --- a/src/lookup.cc +++ b/src/lookup.cc @@ -1,3 +1,11 @@ +/* + lookup.cc -- implement simple Lookup methods. + + source file of the LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + #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() diff --git a/src/meter.cc b/src/meter.cc index 4f06b6469e..94f6b6c5e9 100644 --- a/src/meter.cc +++ b/src/meter.cc @@ -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(Arraya) :args(a) { diff --git a/src/notehead.cc b/src/notehead.cc index a0c031c106..722b231e68 100644 --- a/src/notehead.cc +++ b/src/notehead.cc @@ -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 index 0000000000..b49a53fc8e --- /dev/null +++ b/src/paper-def.cc @@ -0,0 +1,91 @@ +#include +#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: " <print(); + mtor << "}\n"; +#endif +} diff --git a/src/pscore.cc b/src/pscore.cc index cebeb86f4c..73e57ce6f2 100644 --- a/src/pscore.cc +++ b/src/pscore.cc @@ -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; } diff --git a/src/rest.cc b/src/rest.cc index e334d17bac..0e4394a3c6 100644 --- a/src/rest.cc +++ b/src/rest.cc @@ -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); diff --git a/src/score.cc b/src/score.cc index 4d8ac63296..0dd16ecbf7 100644 --- a/src/score.cc +++ b/src/score.cc @@ -5,19 +5,19 @@ (c) 1997 Han-Wen Nienhuys */ -#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; diff --git a/src/scoreline.cc b/src/scoreline.cc index 505d7e79cf..2f8f0f3a4b 100644 --- a/src/scoreline.cc +++ b/src/scoreline.cc @@ -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" diff --git a/src/scores.cc b/src/scores.cc index b4019fd141..a6df7ead96 100644 --- a/src/scores.cc +++ b/src/scores.cc @@ -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 score_array_global; diff --git a/src/staff.cc b/src/staff.cc index d5c08487ab..4f72617f5e 100644 --- a/src/staff.cc +++ b/src/staff.cc @@ -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 const &l) @@ -17,7 +17,7 @@ Staff::add(PointerList 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++; } diff --git a/src/staffline.cc b/src/staffline.cc index 7b79f09212..5d18b219e6 100644 --- a/src/staffline.cc +++ b/src/staffline.cc @@ -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" diff --git a/src/staffsym.cc b/src/staffsym.cc index 49f559f2e8..631a5f3673 100644 --- a/src/staffsym.cc +++ b/src/staffsym.cc @@ -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 index 0000000000..d67622e141 --- /dev/null +++ b/src/text-def.cc @@ -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'; +} -- 2.39.5