]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.24
authorfred <fred>
Sun, 24 Mar 2002 19:28:29 +0000 (19:28 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:28:29 +0000 (19:28 +0000)
configure
hdr/textitem.hh
src/inputcommands.cc
src/lyricwalker.cc [new file with mode: 0644]
src/note.cc
src/textitem.cc

index 37d5742e10440d97b17c574cdaaf3b2776f74db9..603a202fe6531523786d42b1352dd7ce2cca31a3 100755 (executable)
--- 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
index ffeeafbb820fb305eae41538d31141d155486a07..bd4ea924d23134f2460f458eab556ee25e269ffe 100644 (file)
 #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);
index 968d29c9a9136cd09352f406dc3dbce876998f85..ef2014604c2a5a1f025189b580986f271c272077 100644 (file)
@@ -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<String,Moment> &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 (file)
index 0000000..bd8ac0e
--- /dev/null
@@ -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()
+{
+}
+
index 5c132038bcd529799aa437d7ab3932a7b3abbbc3..0cd2c478a60980d1367d5744988fe717a5b723bc 100644 (file)
@@ -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;
+}
index d19b4b813218acdc4b267ecaa4a08285b0b6e650..8be0d378cce2144fc1bac569b2a8367922bdc2ed 100644 (file)
@@ -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;
 }