#!/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
#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);
/****************/
+void
+Input_commands::find_moment(Moment m)
+{
+ ptr.find_moment(m);
+}
Input_commands::Input_commands(Input_commands const&src)
: ptr(src.ptr)
{
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") {
--- /dev/null
+//
+// 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()
+{
+}
+
#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?
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;
}
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 )
{
return new Script_req(d, def);
}
-
Request*
get_text_req(int d , Text_def*def)
{
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;
+}
#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()
{
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;
}