From: fred Date: Fri, 10 Jan 1997 00:35:29 +0000 (+0000) Subject: lilypond-0.0.22 X-Git-Tag: release/1.5.59~6419 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=09739c7ee5c1af69cd57cd8c3b49080ebe8504ca;p=lilypond.git lilypond-0.0.22 --- diff --git a/src/lexer.l b/src/lexer.l index 22bda7c92e..9f99dd2713 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -5,7 +5,7 @@ #include "string.hh" #include "notename.hh" #include "lexer.hh" -#include "vray.hh" +#include "varray.hh" #include "parser.hh" #include "debug.hh" @@ -31,7 +31,7 @@ AN {AA}|{N} WORD {A}{AN}* ALPHAWORD {A}+ INT -?{N}+ -REAL {INT}(\.{N}*)? +REAL {INT}?(\.{N}*)? OPTSIGN !? PITCHMOD ['`]*{OPTSIGN} @@ -95,8 +95,6 @@ DOTS \.+ yylval.i = String(YYText()).value(); return INT; } -\| { -} [%#].*\n { } @@ -110,21 +108,13 @@ DOTS \.+ return YYText()[0]; } -[\[)] { /* parens () are NO mistake */ - yylval.c = YYText()[0]; - return OPEN_REQUEST_PARENS; -} -[\](] { /* parens () are NO mistake */ - yylval.c = YYText()[0]; - return CLOSE_REQUEST_PARENS; -} \"[^\"]*\" { String s (YYText()+1); s = s.left(s.len()-1); yylval.string = new String(s); return STRING; } -[/.^>_-] { +[()\[\]|/.^>_-] { return yylval.c = YYText()[0]; } diff --git a/src/note.cc b/src/note.cc index 30ded730d4..4454e67727 100644 --- a/src/note.cc +++ b/src/note.cc @@ -7,7 +7,7 @@ #include "voice.hh" #include "notename.hh" #include "identparent.hh" -#include "vray.hh" +#include "varray.hh" #include "textdef.hh" int default_duration = 4, default_dots=0, default_octave=0; @@ -149,6 +149,9 @@ get_request(char c) { Request* ret=0; switch (c) { + case '|': + ret = new Barcheck_req; + break; case '[': case ']': { @@ -177,8 +180,9 @@ get_request(char c) case ']': ret->span()->spantype = Span_req::STOP; break; + default: - assert(false); + break; } @@ -186,9 +190,9 @@ get_request(char c) } void -add_requests(Voice_element *v, svec &req) +add_requests(Voice_element *v, Array &req) { - for (int i = 0; i < req.sz(); i++) { + for (int i = 0; i < req.size(); i++) { v->add(req[i]); } req.set_size(0); @@ -203,7 +207,7 @@ get_scriptdef(char c) break; case '+' : s = "stopped"; break; - case '-' : s = "portato"; + case '-' : s = "tenuto"; break; case '|': s = "staccatissimo"; break; diff --git a/src/timedescription.cc b/src/timedescription.cc index 459c15a06d..ce9b667aaf 100644 --- a/src/timedescription.cc +++ b/src/timedescription.cc @@ -1,23 +1,33 @@ #include "timedescription.hh" #include "debug.hh" +String +Time_description::str()const +{ + String s( "Time_description { at "); + s+=when; + s+="\nmeter " + String(whole_per_measure/one_beat) +":" +(1/one_beat); + s+= "\nposition "+String( bars) + ":"+ whole_in_measure +"\n}\n"; + return s; +} void Time_description::print() const { - mtor << "Time_description { at "<0); + assert(dt >= 0); *this = *prev; when += + dt; whole_in_measure += dt; @@ -51,8 +61,24 @@ Time_description::setpartial(Moment p) error_t ("Partial measure has incorrect size", when); whole_in_measure = whole_per_measure - p; } + Moment Time_description::barleft() { -return whole_per_measure-whole_in_measure; + return whole_per_measure-whole_in_measure; +} + +int +Time_description::compare(Time_description &t1, Time_description&t2) +{ + int i = sign(t1.when-t2.when); + + if (!i) { + assert(t1.bars==t2.bars); + assert(t1.one_beat == t2.one_beat); + assert(t1.whole_in_measure == t2.whole_in_measure); + assert(t1.whole_per_measure == t2.whole_per_measure); + } + + return i; } diff --git a/titledefs.tex b/titledefs.tex new file mode 100644 index 0000000000..33cf8133cc --- /dev/null +++ b/titledefs.tex @@ -0,0 +1,15 @@ +\def\thetitle{} +\def\thecomposer{} +\def\theinstrument{} +\def\title#1{\def\thetitle{#1}} +\def\composer#1{\def\thecomposer{#1}} +\def\instrument#1{\def\theinstrument{#1}} + +\def\maketit{ + \begin{center} + {\Large\bfseries\thetitle}\\ + \vskip12pt + {\bfseries\theinstrument}\hfill{\scshape\thecomposer} + \end{center} + \bigskip + } \ No newline at end of file