From: fred Date: Sun, 24 Mar 2002 19:28:29 +0000 (+0000) Subject: lilypond-0.0.24 X-Git-Tag: release/1.5.59~5577 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=95fb895a8decaa02276375fb6df92e946578162e;p=lilypond.git lilypond-0.0.24 --- diff --git a/configure b/configure index 37d5742e10..603a202fe6 100755 --- a/configure +++ b/configure @@ -1,7 +1,29 @@ #!/bin/sh + +NEEDFLOWERVER=1.0.21 +flowertar=flower-$NEEDFLOWERVER +here=`pwd` +if [ -x ../flower ] +then + echo Found flowerdir +else + cd ../ + if [ ! -f $flowertar ] + then + echo can't find $flowertar + exit 1; + fi + rm flower + ln -s $flowertar flower + +fi +echo Compiling Library +cd flower; make +cd $here + PREFIX="." echo '#define LIBDIR "'$PREFIX'/"'> hdr/config.hh touch depend -make -f Initial.make \ No newline at end of file +make -f Initial.make diff --git a/hdr/textitem.hh b/hdr/textitem.hh index ffeeafbb82..bd4ea924d2 100644 --- a/hdr/textitem.hh +++ b/hdr/textitem.hh @@ -10,16 +10,16 @@ #include "textdef.hh" #include "item.hh" -struct Text_item : Item{ - int pos; - int staffsize; - int dir; - Text_def*specs; +struct Text_item : Item { + int pos_i_; + int staffsize_i_; + int dir_i_; + Text_def* tdef_l_; /****************/ - void set_default_pos(); - Molecule* brew_molecule()const; + virtual void set_default_pos(); + Molecule* brew_molecule_p() const; void do_pre_processing(); Text_item(Text_req*,int); diff --git a/src/inputcommands.cc b/src/inputcommands.cc index 968d29c9a9..ef2014604c 100644 --- a/src/inputcommands.cc +++ b/src/inputcommands.cc @@ -118,6 +118,11 @@ Input_cursor::find_moment(Moment w) /****************/ +void +Input_commands::find_moment(Moment m) +{ + ptr.find_moment(m); +} Input_commands::Input_commands(Input_commands const&src) : ptr(src.ptr) @@ -155,7 +160,7 @@ Input_commands::add(Input_command c, Assoc &marks_assoc_r) { String s(c.args[0]); if (s == "CADENZA") { - ptr->tdescription_.set_cadenza(c.args[1]); + ptr->tdescription_.set_cadenza((int)c.args[1]); } if (s == "PARTIAL") { ptr->setpartial(c.args[1]); } else if (s == "GROUPING") { diff --git a/src/lyricwalker.cc b/src/lyricwalker.cc new file mode 100644 index 0000000000..bd8ac0e40d --- /dev/null +++ b/src/lyricwalker.cc @@ -0,0 +1,72 @@ +// +// what about +// #include "flower.hh" +// #include "lily.hh" +// +// or should we first devide lily/src up ? +// HWN: huh? + +#include "textspanner.hh" +#include "script.hh" +#include "request.hh" +#include "voice.hh" +#include "pscore.hh" +#include "lyricstaff.hh" +#include "lyricwalker.hh" +#include "sccol.hh" +#include "debug.hh" +#include "lyricitem.hh" + +void +Lyric_walker::do_word(Word_info) +{ +} + +void +Lyric_walker::do_INTERPRET_command(Command* ) +{ +// WARN << "command for Lyrics found\n"; +} + +void +Lyric_walker::do_TYPESET_command(Command* ) +{ +// WARN << "command for Lyrics found\n"; +} + +void +Lyric_walker::process_requests() +{ + Lyric_column* lcol_l = Lyric_walker::lcol_l(); + + for (int i = 0; i < lcol_l->winfo_array_.size(); i++) { + lcol_l->typeset_item(new Lyric_item(lcol_l->winfo_array_[i].lreq_l_, i)); + } + +} + +Lyric_walker::Lyric_walker(Lyric_staff* lstaff_l) + : Staff_walker(lstaff_l, lstaff_l->line_pstaff_p_->pscore_l_) +{ + reset(); +} + + + +Lyric_staff* +Lyric_walker::lstaff_l() +{ + return (Lyric_staff*)staff_; +} + +Lyric_column* +Lyric_walker::lcol_l() +{ + return (Lyric_column*) *(*this); +} + +void +Lyric_walker::reset() +{ +} + diff --git a/src/note.cc b/src/note.cc index 5c132038bc..0cd2c478a6 100644 --- a/src/note.cc +++ b/src/note.cc @@ -10,6 +10,7 @@ #include "varray.hh" #include "textdef.hh" + int default_duration = 4, default_dots=0, default_octave=0; int default_plet_type = 1, default_plet_dur = 1; String textstyle="roman"; // in lexer? @@ -26,8 +27,8 @@ Text_def* get_text(String s) return t; { t= new Text_def; - t->text= s; - t->style = textstyle; + t->text_str_= s; + t->style_str_ = textstyle; return t; } @@ -106,6 +107,27 @@ get_note_element(String pitch, int * notename, int * duration ) return v; } +Voice_element* +get_word_element(Text_def* tdef_p, int* duration) +{ + Voice_element* velt_p = new Voice_element; + + + int dur = duration[0]; + int dots=duration[1]; + + Lyric_req* lreq_p = new Lyric_req(tdef_p); + + lreq_p->balltype = dur; + lreq_p->dots = dots; + lreq_p->plet_factor = Moment(default_plet_dur, default_plet_type); + lreq_p->print(); + + velt_p->add(lreq_p); + + return velt_p; +} + Voice_element * get_rest_element(String, int * duration ) { @@ -229,7 +251,6 @@ get_script_req(int d , Script_def*def) return new Script_req(d, def); } - Request* get_text_req(int d , Text_def*def) { @@ -244,3 +265,18 @@ get_mark_element(String s) return v_p; } +Voice_element* +get_command_element(Input_command*com_p) +{ + Voice_element *v_p = new Voice_element; + v_p->add(new Staff_command_req(com_p)); + return v_p; +} +Voice_element* +get_barcheck_element() +{ + Voice_element*v_p = new Voice_element; + v_p->add( new Barcheck_req); + + return v_p; +} diff --git a/src/textitem.cc b/src/textitem.cc index d19b4b8132..8be0d378cc 100644 --- a/src/textitem.cc +++ b/src/textitem.cc @@ -5,22 +5,21 @@ #include "molecule.hh" #include "lookup.hh" -Text_item::Text_item(Text_req * r, int s) +Text_item::Text_item(Text_req* treq_l, int staffsize_i) { - dir = r->dir; - if (!dir) - dir = -1; - - specs = r->spec; - staffsize = s; - pos = 0; + staffsize_i_ = staffsize_i; + dir_i_ = treq_l->dir_i_; + if (!dir_i_) + dir_i_ = -1; + tdef_l_ = treq_l->tdef_p_; } void Text_item::set_default_pos() { - pos = (dir > 0) ? staffsize + 2: -4; + pos_i_ = (dir_i_ > 0) ? staffsize_i_ + 2: -4; } + void Text_item::do_pre_processing() { @@ -29,12 +28,13 @@ Text_item::do_pre_processing() Molecule* -Text_item::brew_molecule() const +Text_item::brew_molecule_p() const { - Molecule* output = new Molecule(specs->create(paper())); - if(dir <0) - output->translate(Offset(0, -output->extent().y.length() )); + Molecule* mol_p = new Molecule(tdef_l_->create_atom(paper())); + mol_p->translate(Offset(0, pos_i_ * paper()->internote())); + + if(dir_i_<0) + mol_p->translate(Offset(0, -mol_p->extent().y.length() )); - output->translate(Offset(0, pos * paper()->internote())); - return output; + return mol_p; }