From: fred Date: Mon, 2 Dec 1996 00:45:14 +0000 (+0000) Subject: lilypond-0.0.13 X-Git-Tag: release/1.5.59~6699 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c259b109b7d042aa281d5a27d1bcc9d589263729;p=lilypond.git lilypond-0.0.13 --- diff --git a/Variables.make b/Variables.make index f8cd146ba4..87c92fc64d 100644 --- a/Variables.make +++ b/Variables.make @@ -18,7 +18,7 @@ EXTRACXXFLAGS=-pipe -Wall -W -pedantic # version info MAJVER=0 MINVER=0 -PATCHLEVEL=11 +PATCHLEVEL=13 VERSION=$(MAJVER).$(MINVER).$(PATCHLEVEL) # directories @@ -53,7 +53,7 @@ DNAME=$(PACKAGENAME)-$(VERSION) # distribution files. othersrc=lexer.l parser.y SCRIPTS=make_version make_patch genheader -IFILES=dimen.tex symbol.ini kortjakje.ly maartje.ly\ +IFILES=dimen.tex symbol.ini kortjakje.ly pavane.ly maartje.ly\ lilyponddefs.tex test.tex .dstreamrc OFILES=Makefile Variables.make Sources.make COPYING README DFILES=$(OFILES) $(IFILES) $(SCRIPTS) diff --git a/pavane.ly b/pavane.ly new file mode 100644 index 0000000000..e58508cb98 --- /dev/null +++ b/pavane.ly @@ -0,0 +1,58 @@ +% pavane pour une Infante d\'efunte +% +% M. Ravel +% +% (Ravel has been dead for over 50 years. This does not have copyright) +% + +horn = melodicstaff { + $ + \octave { 'c } + \duration { 8} + +% 1 + d2( [)d e cis `b] `a4 [`b cis] [cis `b] `b4 + fis2( [)fis g e d] cis4 [d e(] [)e fis d cis] + `b4 [cis d(] [)d e cis `b] cis2 r2 + r4 fis2 fis4 fis2()[fis e a fis] + fis4 e4 d4 e4 `b2()[`b `a( d cis] +% 11 + )`b [`fis `a `b] cis4 `b4 `fis2 r2 + cis4 d4()[d cis d e] +\octave { c } + a4 gis2. + a4 b4()[b a b cis] fis4 e4 cis2 + e4 fis4 () [fis e fis gis] cis4 `b4()`b8 r8 r4 + + r4 r4 'cis4 'd4 () ['d 'cis 'd 'e] + a4 gis2. a4 b4()[b a b cis] + fis4 e4 cis2 e4 fis4()[fis e fis gis] + cis4 `b4()`b8 r8 r4 r1 + r2 r4 r4 +%% cut 'n paste. + \octave { 'c } + d2( [)d e cis `b] `a4 [`b cis] [cis `b] `b4 + fis2( [)fis g e d] cis4 [d e(] [)e fis d cis] + `b4 [cis d(] [)d e cis `b] cis2 r2 + r4 fis2 fis4 fis2()[fis e a fis] + fis4 e4 d4 e4 `b2() [`b `a d cis] + `b [`fis `a `b] cis4 `b4 `fis2 r2 + $ + commands { + key $fis cis $ + } +} + +score { + staff { horn } + paper { unitspace 2.2 cm + geometric 1.5 + } + commands { meter 4 4 + skip 18:0 + meter 2 4 + skip 1:0 + meter 4 4 + skip 20:0 + } +} \ No newline at end of file diff --git a/src/calcideal.cc b/src/calcideal.cc index 03910ac561..3f9a7dca23 100644 --- a/src/calcideal.cc +++ b/src/calcideal.cc @@ -5,37 +5,33 @@ #include "paper.hh" #include "sccol.hh" #include "debug.hh" +#include "dimen.hh" void -Score::do_connect(PCol *c1, PCol *c2, Real d) +Score::do_connect(PCol *c1, PCol *c2, Real d, Real h) { + if (!c1 || !c2 ) + return; Idealspacing*sp=pscore_->get_spacing(c1,c2); if (!sp->hooke){ - sp->hooke = 1.0; + sp->hooke = h; sp->space =d; } } void -Score::connect_nonmus(PCol* c1, PCol *c2, Real d) +Score::connect(PCol* c1, PCol *c2, Real d, Real h) { if (c2->used() && c1->used()) { - do_connect(c1,c2,d); - - // alert! this is broken! - if (c1->breakable()) { - do_connect(c1->postbreak, c2,d); - } - if (c2->breakable()) { - do_connect(c1, c2->prebreak,d); - } - if (c1->breakable() &&c2->breakable()) { - do_connect(c1->postbreak, c2->prebreak,d); - } + do_connect(c1,c2,d,h); + do_connect(c1->postbreak, c2,d,h); + do_connect(c1, c2->prebreak,d,h); + do_connect(c1->postbreak, c2->prebreak,d,h); } } + /* this needs A LOT of rethinking. generate springs between columns. @@ -43,21 +39,41 @@ Score::connect_nonmus(PCol* c1, PCol *c2, Real d) void Score::calc_idealspacing() { - PCursor sc(cols_); + PCursor i(cols_); - for (; sc.ok(); sc++) { - if (sc->musical) - for (int i=0; i < sc->durations.sz(); i++) { - Real d = sc->durations[i]; + for (; i.ok(); i++) { + + PCursor j (i+1); + if (i->musical) { + for (int n=0; n < i->durations.sz(); n++) { + Real d = i->durations[n]; Real dist = paper_->duration_to_dist(d); - PCol * c2 = find_col(sc->when + d,true)->pcol_; - connect_nonmus(sc->pcol_, c2, dist); - c2 = find_col(sc->when + d,false)->pcol_; - connect_nonmus(sc->pcol_, c2, dist); + while (d + i->when > j->when) + j++; + + if (j->used()) + connect(i->pcol_, j->pcol_, dist); + if (!j->musical && (j+1)->used && (j+1)->when == j->when) { + j++; + connect(i->pcol_, j->pcol_, dist); + } + } + } else if (i->used()) { + + /* attach i to the next column in use. This exists, since + the last col is breakable, and therefore in use + */ + for (;j.ok(); j++) { + if (j->used()) { + Real d = j->when - i->when; + Real dist = (d) ? paper_->duration_to_dist(d) : + convert_dimen(2,"pt"); + + connect(i->pcol_, j->pcol_, dist, (d) ? 1.0:1.0); + break; + } } - else if (sc->used()) { // ignore empty columns - PCol * c2 = find_col(sc->when,true)->pcol_; - connect_nonmus(sc->pcol_, c2, 0.0); + // !j.ok() might hold if we're at the last col. } } }