From: fred Date: Mon, 4 Nov 1996 21:21:01 +0000 (+0000) Subject: lilypond-0.0.7 X-Git-Tag: release/1.5.59~6914 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a778f886c7977c163177a3f58f83becd343803b9;p=lilypond.git lilypond-0.0.7 --- diff --git a/Sources.make b/Sources.make index deb1a524c4..fcc62df96c 100644 --- a/Sources.make +++ b/Sources.make @@ -10,7 +10,7 @@ hdr= qlp.hh linespace.hh qlpsolve.hh\ misc.hh score.hh notename.hh lexer.hh symtable.hh\ symbol.hh main.hh dimen.hh paper.hh lookupsyms.hh\ sccol.hh stcol.hh scommands.hh melodicstaff.hh\ - identifier.hh simplestaff.hh + identifier.hh simplestaff.hh spanner.hh stem.hh mycc= qlp.cc qlpsolve.cc \ break.cc linespace.cc molecule.cc line.cc\ @@ -19,9 +19,11 @@ mycc= qlp.cc qlpsolve.cc \ symbol.cc request.cc notename.cc voice.cc\ keyword.cc linestaff.cc table.cc command.cc\ warn.cc debug.cc symtable.cc boxes.cc\ - pstaff.cc tstream.cc version.cc\ + pstaff.cc tstream.cc\ calcideal.cc scores.cc identifier.cc \ dimen.cc paper.cc lookupsyms.cc scommands.cc\ sccol.cc stcol.cc getcommands.cc simplestaff.cc\ - melodicstaff.cc simpleprint.cc\ - template1.cc template2.cc template3.cc + melodicstaff.cc simpleprint.cc stem.cc\ + spanner.cc\ + template1.cc template2.cc template3.cc\ + version.cc \ No newline at end of file diff --git a/make_patch b/make_patch index c2a1e50f8a..2e9246f4d7 100755 --- a/make_patch +++ b/make_patch @@ -2,27 +2,30 @@ old=$1 new=$2 nm=$3- + newarc=$nm$new.tar.gz oldarc=$nm$old.tar.gz -if [ ! -f $newarc ] -then - echo cant find $newarc - exit -fi -if [ ! -f $oldarc ] -then - echo cant find oldarc - exit -fi + + if [ ! -x $nm$new ] then echo untarring .. tar zfxv $nm$new.tar.gz + if [ ! -f $newarc ] + then + echo cant find $newarc + exit + fi fi if [ ! -x $nm$old ] then echo untarring tar zfxv $nm$old.tar.gz + if [ ! -f $oldarc ] + then + echo cant find oldarc + exit + fi fi #(cd $nm$old; touch depend; make clean) diff --git a/stem.cc b/stem.cc new file mode 100644 index 0000000000..33198addde --- /dev/null +++ b/stem.cc @@ -0,0 +1,90 @@ +#include "stem.hh" +#include "dimen.hh" +#include "debug.hh" +#include "pstaff.hh" +#include "pscore.hh" +#include "paper.hh" +#include "lookupsyms.hh" +#include "molecule.hh" + +const int STEMLEN=7; + +Stem::Stem(int c) +{ + minnote = maxnote = 0; + bot = top = 0; + flag = 4; + staff_center=c; +} + +void +Stem::print()const +{ + mtor << "Stem minmax=["<< minnote<<","< stafftop + 2) { + top = maxnote; + bot = staff_center + staff_center/2; + flag = -flag; + }else { + Real mean = (minnote+maxnote)/2; + + top = (mean > staff_center) ? maxnote : maxnote+STEMLEN; + bot = (mean > staff_center) ? minnote-STEMLEN : minnote; + flag = (mean > staff_center) ? -flag : flag; + } +} + +Interval +Stem::width()const +{ + if (ABS(flag) <= 4) + return Interval(0,0); // TODO! + Paperdef*p= pstaff_->pscore_->paper_; + return p->lookup_->flag(flag).dim.x; +} + +void +Stem::brew_molecole() +{ + assert(pstaff_); + Paperdef *p = pstaff_->pscore_->paper_; + Parametric_symbol *stem = p->lookup_->stem(); + + assert(bot!=top); + assert(!output); + + Real dy = p->interline()/2; + String y1 =print_dimen( dy * bot); + String y2 = print_dimen(dy * top); + Symbol ss =stem->eval(y1,y2); + output = new Molecule(Atom(ss)); + + if (ABS(flag) > 4){ + Symbol fl = p->lookup_->flag(flag); + Molecule m(fl); + if (flag < -4){ + output->add_bot(m); + } else if (flag > 4) { + output->add_top(m); + } else + assert(false); + } + + if (flag > 0){ + Real dx = pstaff_->pscore_->paper_->note_width(); // ugh + output->translate(Offset(dx,0)); + } +}